Completed
Push — master ( 8b6295...4c7c03 )
by Mahmoud
03:28
created
app/Ship/Engine/Traits/HashIdTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     public function runHashedIdsDecoder()
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
 block discarded – undo
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();
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         // get the last part of the key, which should be the ID that needs decoding
140 140
         $idToDecode = substr($key, strrpos($key, '.*.') + 3);
141 141
 
142
-        array_walk_recursive($requestData, function (&$value, $key) use ($idToDecode) {
142
+        array_walk_recursive($requestData, function(&$value, $key) use ($idToDecode) {
143 143
 
144 144
             if ($key == $idToDecode) {
145 145
                 $value = $this->decode($value, $key);
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     {
157 157
         $idToDecode = $this->removeLastOccurrenceFromString($key, '.*');
158 158
 
159
-        $this->findKeyAndReturnValue($requestData, $idToDecode, function ($ids) use ($key){
159
+        $this->findKeyAndReturnValue($requestData, $idToDecode, function($ids) use ($key){
160 160
 
161 161
             if (!is_array($ids)) {
162 162
                 throw new IncorrectIdException('Expected ID\'s to be in array. Please wrap your ID\'s in an Array and send them back.');
Please login to merge, or discard this patch.