Skip to content

Commit 7df5bf1

Browse files
committed
refactor: collapse long form mixed to just mixed
1 parent c7aac15 commit 7df5bf1

25 files changed

Lines changed: 125 additions & 583 deletions

system/Common.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -403,9 +403,9 @@ function db_connect($db = null, bool $getShared = true)
403403
* retrieving values set from the .env file for
404404
* use in config files.
405405
*
406-
* @param array<int|string, mixed>|bool|float|int|object|string|null $default
406+
* @param mixed $default
407407
*
408-
* @return array<int|string, mixed>|bool|float|int|object|string|null
408+
* @return mixed
409409
*/
410410
function env(string $key, $default = null)
411411
{
@@ -1080,7 +1080,7 @@ function session(?string $val = null)
10801080
* - $timer = service('timer')
10811081
* - $timer = \CodeIgniter\Config\Services::timer();
10821082
*
1083-
* @param array|bool|float|int|object|string|null ...$params
1083+
* @param mixed ...$params
10841084
*/
10851085
function service(string $name, ...$params): ?object
10861086
{
@@ -1096,7 +1096,7 @@ function service(string $name, ...$params): ?object
10961096
/**
10971097
* Always returns a new instance of the class.
10981098
*
1099-
* @param array|bool|float|int|object|string|null ...$params
1099+
* @param mixed ...$params
11001100
*/
11011101
function single_service(string $name, ...$params): ?object
11021102
{

system/Config/BaseService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public static function override(string $key, object $value): void
244244
*
245245
* $key must be a name matching a service.
246246
*
247-
* @param array|bool|float|int|object|string|null ...$params
247+
* @param mixed ...$params
248248
*
249249
* @return object
250250
*/

system/Database/BaseConnection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,7 +1533,7 @@ abstract public function affectedRows(): int;
15331533
* Escapes data based on type.
15341534
* Sets boolean and null types
15351535
*
1536-
* @param array|bool|float|int|object|string|null $str
1536+
* @param mixed $str
15371537
*
15381538
* @return ($str is array ? array : float|int|string)
15391539
*/
@@ -2059,7 +2059,7 @@ protected function _enableForeignKeyChecks()
20592059
/**
20602060
* Accessor for properties if they exist.
20612061
*
2062-
* @return array|bool|float|int|object|resource|string|null
2062+
* @return mixed
20632063
*/
20642064
public function __get(string $key)
20652065
{

system/Database/ConnectionInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function getLastQuery();
137137
* Escapes data based on type.
138138
* Sets boolean and null types.
139139
*
140-
* @param array|bool|float|int|object|string|null $str
140+
* @param mixed $str
141141
*
142142
* @return ($str is array ? array : float|int|string)
143143
*/
@@ -149,7 +149,7 @@ public function escape($str);
149149
*
150150
* @param array ...$params
151151
*
152-
* @return array|bool|float|int|object|resource|string|null
152+
* @return mixed
153153
*/
154154
public function callFunction(string $functionName, ...$params);
155155

system/Database/Postgre/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public function affectedRows(): int
241241
*
242242
* Escapes data based on type
243243
*
244-
* @param array|bool|float|int|object|string|null $str
244+
* @param mixed $str
245245
*
246246
* @return ($str is array ? array : float|int|string)
247247
*/

system/Debug/Toolbar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ public function respond(): void
479479

480480
// Otherwise, if it includes ?debugbar_time, then
481481
// we should return the entire debugbar.
482-
if ($request->getGet('debugbar_time')) {
482+
if ($request->getGet('debugbar_time') !== null) {
483483
helper('security');
484484

485485
// Negotiate the content-type to format the output

system/Entity/Cast/CastInterface.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ interface CastInterface
2323
/**
2424
* Takes a raw value from Entity, returns its value for PHP.
2525
*
26-
* @param array|bool|float|int|object|string|null $value Data
27-
* @param array<int, string> $params Additional param
26+
* @param mixed $value Data
27+
* @param array<int, string> $params Additional param
2828
*
29-
* @return array|bool|float|int|object|string|null
29+
* @return mixed
3030
*/
3131
public static function get($value, array $params = []);
3232

3333
/**
3434
* Takes a PHP value, returns its raw value for Entity.
3535
*
36-
* @param array|bool|float|int|object|string|null $value Data
37-
* @param array<int, string> $params Additional param
36+
* @param mixed $value Data
37+
* @param array<int, string> $params Additional param
3838
*
39-
* @return array|bool|float|int|object|string|null
39+
* @return mixed
4040
*/
4141
public static function set($value, array $params = []);
4242
}

system/Entity/Entity.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public function __construct(?array $data = null)
157157
* properties, using any `setCamelCasedProperty()` methods
158158
* that may or may not exist.
159159
*
160-
* @param array<string, array<int|string, mixed>|bool|float|int|object|string|null> $data
160+
* @param array<string, mixed> $data
161161
*
162162
* @return $this
163163
*/
@@ -556,7 +556,7 @@ protected function mutateDate($value)
556556
* @param string $attribute Attribute name
557557
* @param string $method Allowed to "get" and "set"
558558
*
559-
* @return array<int|string, mixed>|bool|float|int|object|string|null
559+
* @return mixed
560560
*
561561
* @throws CastException
562562
*/
@@ -631,7 +631,7 @@ public function cast(?bool $cast = null)
631631
* $this->my_property = $p;
632632
* $this->setMyProperty() = $p;
633633
*
634-
* @param array<int|string, mixed>|bool|float|int|object|string|null $value
634+
* @param mixed $value
635635
*
636636
* @return void
637637
*
@@ -682,7 +682,7 @@ public function __set(string $key, $value = null)
682682
* $p = $this->my_property
683683
* $p = $this->getMyProperty()
684684
*
685-
* @return array<int|string, mixed>|bool|float|int|object|string|null
685+
* @return mixed
686686
*
687687
* @throws Exception
688688
*/

system/HTTP/CURLRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ public function setForm(array $params, bool $multipart = false)
289289
/**
290290
* Set JSON data to be sent.
291291
*
292-
* @param array|bool|float|int|object|string|null $data
292+
* @param mixed $data
293293
*
294294
* @return $this
295295
*/

system/HTTP/IncomingRequest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ public function getRawInput()
508508
* @param int|null $filter Filter Constant
509509
* @param array|int|null $flags Option
510510
*
511-
* @return array|bool|float|int|object|string|null
511+
* @return mixed
512512
*/
513513
public function getRawInputVar($index = null, ?int $filter = null, $flags = null)
514514
{
@@ -562,7 +562,7 @@ public function getRawInputVar($index = null, ?int $filter = null, $flags = null
562562
* @param int|null $filter A filter name to apply.
563563
* @param array|int|null $flags
564564
*
565-
* @return array|bool|float|int|object|string|null
565+
* @return mixed
566566
*/
567567
public function getGet($index = null, $filter = null, $flags = null)
568568
{
@@ -576,7 +576,7 @@ public function getGet($index = null, $filter = null, $flags = null)
576576
* @param int|null $filter A filter name to apply
577577
* @param array|int|null $flags
578578
*
579-
* @return array|bool|float|int|object|string|null
579+
* @return mixed
580580
*/
581581
public function getPost($index = null, $filter = null, $flags = null)
582582
{
@@ -590,7 +590,7 @@ public function getPost($index = null, $filter = null, $flags = null)
590590
* @param int|null $filter A filter name to apply
591591
* @param array|int|null $flags
592592
*
593-
* @return array|bool|float|int|object|string|null
593+
* @return mixed
594594
*/
595595
public function getPostGet($index = null, $filter = null, $flags = null)
596596
{
@@ -613,7 +613,7 @@ public function getPostGet($index = null, $filter = null, $flags = null)
613613
* @param int|null $filter A filter name to apply
614614
* @param array|int|null $flags
615615
*
616-
* @return array|bool|float|int|object|string|null
616+
* @return mixed
617617
*/
618618
public function getGetPost($index = null, $filter = null, $flags = null)
619619
{
@@ -636,7 +636,7 @@ public function getGetPost($index = null, $filter = null, $flags = null)
636636
* @param int|null $filter A filter name to be applied
637637
* @param array|int|null $flags
638638
*
639-
* @return array|bool|float|int|object|string|null
639+
* @return mixed
640640
*/
641641
public function getCookie($index = null, $filter = null, $flags = null)
642642
{

0 commit comments

Comments
 (0)