@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | /** |
| 183 | 183 | * @param $subject |
| 184 | 184 | * @param $findKey |
| 185 | - * @param $callback |
|
| 185 | + * @param \Closure $callback |
|
| 186 | 186 | * |
| 187 | 187 | * @return array |
| 188 | 188 | */ |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | /** |
| 209 | - * @param $search |
|
| 209 | + * @param string $search |
|
| 210 | 210 | * @param $subject |
| 211 | 211 | * |
| 212 | 212 | * @return mixed |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | /** |
| 228 | - * @param $needle |
|
| 228 | + * @param string $needle |
|
| 229 | 229 | * @param $haystack |
| 230 | 230 | * |
| 231 | 231 | * @return int |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | public function runEndpointsHashedIdsDecoder() |
| 30 | 30 | { |
| 31 | 31 | if (Config::get('hello.hash-id')) { |
| 32 | - Route::bind('id', function ($id, $route) { |
|
| 32 | + Route::bind('id', function($id, $route) { |
|
| 33 | 33 | // skip decoding some endpoints |
| 34 | 34 | if (!in_array($route->uri(), $this->skippedEndpoints)) { |
| 35 | 35 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | { |
| 59 | 59 | // hash the ID only if hash-id enabled in the config |
| 60 | 60 | if (Config::get('hello.hash-id')) { |
| 61 | - return $this->encoder(($key) ? : $this->getKey()); |
|
| 61 | + return $this->encoder(($key) ?: $this->getKey()); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | return $this->getKey(); |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | // get the last part of the key, which should be the ID that needs decoding |
| 144 | 144 | $idToDecode = substr($key, strrpos($key, '.*.') + 3); |
| 145 | 145 | |
| 146 | - array_walk_recursive($requestData, function (&$value, $key) use ($idToDecode) { |
|
| 146 | + array_walk_recursive($requestData, function(&$value, $key) use ($idToDecode) { |
|
| 147 | 147 | |
| 148 | 148 | if ($key == $idToDecode) { |
| 149 | 149 | |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | |
| 163 | 163 | $idToDecode = $this->removeLastOccurrenceFromString($key, '.*'); |
| 164 | 164 | |
| 165 | - $this->findKeyAndReturnValue($requestData, $idToDecode, function ($ids) { |
|
| 165 | + $this->findKeyAndReturnValue($requestData, $idToDecode, function($ids) { |
|
| 166 | 166 | |
| 167 | 167 | if (!is_array($ids)) { |
| 168 | 168 | throw new IncorrectIdException('Expected ID\'s to be in array. Please wrap your ID\'s in an Array and send them back.'); |