@@ -99,7 +99,7 @@ |
||
| 99 | 99 | // in case a named parameter appears multiple times in the format string |
| 100 | 100 | if ($paramKeys[$paramName] === -1) { |
| 101 | 101 | // no - it needs a home |
| 102 | - $messageData[$nextData] =& $args[$paramName]; |
|
| 102 | + $messageData[$nextData] = & $args[$paramName]; |
|
| 103 | 103 | $paramKeys[$paramName] = $nextData; |
| 104 | 104 | $nextData++; |
| 105 | 105 | } |
@@ -127,7 +127,7 @@ |
||
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | // $data contains an <object, method> pair |
| 130 | - return "callable<" . get_class($data[0]). "::" . $data[1] . ">"; |
|
| 130 | + return "callable<" . get_class($data[0]) . "::" . $data[1] . ">"; |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /** |
@@ -118,14 +118,14 @@ |
||
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | // if we get here, then $item will coerce to a PHP numeric type :) |
| 121 | - return [ $retval => $retval ]; |
|
| 121 | + return [$retval => $retval]; |
|
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | private static function fromObject($item) |
| 125 | 125 | { |
| 126 | 126 | // does this object support being converted to a string? |
| 127 | 127 | if (method_exists($item, '__toString')) { |
| 128 | - return [ 'string' => 'string' ]; |
|
| 128 | + return ['string' => 'string']; |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | // no, it does not |
@@ -49,9 +49,9 @@ discard block |
||
| 49 | 49 | class GetStrictTypes |
| 50 | 50 | { |
| 51 | 51 | private static $dispatchMap = [ |
| 52 | - 'array' => [ GetArrayTypes::class, 'from' ], |
|
| 53 | - 'object' => [ GetObjectTypes::class, 'from' ], |
|
| 54 | - 'string' => [ GetStringTypes::class, 'from' ], |
|
| 52 | + 'array' => [GetArrayTypes::class, 'from'], |
|
| 53 | + 'object' => [GetObjectTypes::class, 'from'], |
|
| 54 | + 'string' => [GetStringTypes::class, 'from'], |
|
| 55 | 55 | ]; |
| 56 | 56 | |
| 57 | 57 | /** |
@@ -84,6 +84,6 @@ discard block |
||
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | // if we get here, then we just return the PHP scalar type |
| 87 | - return [ $type => $type ]; |
|
| 87 | + return [$type => $type]; |
|
| 88 | 88 | } |
| 89 | 89 | } |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | |
| 89 | 89 | // PHP's stack trace is a little esoteric. To find all the details about |
| 90 | 90 | // a caller, we have to combine information from two stack frames. |
| 91 | - $prevFrame = $backtrace[max($index - 1,0)]; |
|
| 91 | + $prevFrame = $backtrace[max($index - 1, 0)]; |
|
| 92 | 92 | |
| 93 | 93 | // find the first backtrace entry that passes our filters |
| 94 | 94 | for ($i = $index; $i <= $maxIndex; $i++) { |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | // if we get here, then we just return the PHP scalar type |
| 94 | - return [ $type => $type ]; |
|
| 94 | + return [$type => $type]; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | $retval = array_merge( |
| 131 | 131 | GetObjectTypes::from($item), |
| 132 | 132 | self::getObjectSpecialTypes($item), |
| 133 | - [ 'object' => 'object' ] |
|
| 133 | + ['object' => 'object'] |
|
| 134 | 134 | ); |
| 135 | 135 | |
| 136 | 136 | return $retval; |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | * |
| 60 | 60 | * @param mixed $item |
| 61 | 61 | * the item to examine |
| 62 | - * @return array |
|
| 62 | + * @return string[] |
|
| 63 | 63 | * the list of type(s) that this item can be |
| 64 | 64 | */ |
| 65 | 65 | public function __invoke($item) |
@@ -157,7 +157,7 @@ |
||
| 157 | 157 | { |
| 158 | 158 | // does this object support being converted to a string? |
| 159 | 159 | if (method_exists($item, '__toString')) { |
| 160 | - return [ 'string' => 'string' ]; |
|
| 160 | + return ['string' => 'string']; |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | // no, it does not |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | * @param int $filter |
| 58 | 58 | * the kind of properties to look for |
| 59 | 59 | * default is to look for public properties only |
| 60 | - * @return array |
|
| 60 | + * @return boolean |
|
| 61 | 61 | * a (possibly empty) read-only list of the class's static properties |
| 62 | 62 | * @throws InvalidArgumentException |
| 63 | 63 | * if $target is not a valid class name |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | * @param int $filter |
| 58 | 58 | * the kind of properties to look for |
| 59 | 59 | * default is to look for public properties only |
| 60 | - * @return array |
|
| 60 | + * @return boolean |
|
| 61 | 61 | * a (possibly empty) read-only list of the object's |
| 62 | 62 | * non-static properties |
| 63 | 63 | * @throws InvalidArgumentException |