Passed
Branch master (6cbeb4)
by Matt
03:56
created
src/models/Post.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,8 +43,7 @@
 block discarded – undo
43 43
             if (PostHelper::isEncodedFile($this->_values[0]))
44 44
             {
45 45
                 $this->_format = 'BASE64_ENCODED_FILE_OBJECTS';
46
-            }
47
-            else
46
+            } else
48 47
             {
49 48
                 $this->_format = 'TRANSFER_IDS';
50 49
             }
Please login to merge, or discard this patch.
src/services/Server.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     {
99 99
         $asset = Craft::$app->getAssets()->getAssetById($assetId);
100 100
 
101
-        if (! $asset)
101
+        if ( ! $asset)
102 102
         {
103 103
             // doesn't exist
104 104
             return false;
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     {
125 125
         $asset = Craft::$app->getAssets()->getAssetById($assetId);
126 126
 
127
-        if (! $asset)
127
+        if ( ! $asset)
128 128
         {
129 129
             // doesn't exist
130 130
             return false;
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     {
142 142
         $asset = Craft::$app->getAssets()->getAssetById($assetId);
143 143
 
144
-        if (! $asset)
144
+        if ( ! $asset)
145 145
         {
146 146
             // doesn't exist
147 147
             return false;
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -78,8 +78,7 @@  discard block
 block discarded – undo
78 78
             }
79 79
 
80 80
             return $asset->id;
81
-        }
82
-        catch (\Throwable $e)
81
+        } catch (\Throwable $e)
83 82
         {
84 83
             Craft::error('An error occurred when saving an Asset: ' . $e->getMessage(), __METHOD__);
85 84
             Craft::$app->getErrorHandler()->logException($e);
@@ -217,8 +216,7 @@  discard block
 block discarded – undo
217 216
             {
218 217
                 return $asset;
219 218
             }
220
-        }
221
-        catch (\Throwable $e)
219
+        } catch (\Throwable $e)
222 220
         {
223 221
             Craft::error('An error occurred when saving an Asset: ' . $e->getMessage(), __METHOD__);
224 222
             Craft::$app->getErrorHandler()->logException($e);
Please login to merge, or discard this patch.
src/AssetPond.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         Event::on(
73 73
             UrlManager::class,
74 74
             UrlManager::EVENT_REGISTER_SITE_URL_RULES,
75
-            static function (RegisterUrlRulesEvent $event)
75
+            static function(RegisterUrlRulesEvent $event)
76 76
             {
77 77
                 $event->rules['assetpond'] = 'asset-pond/default';
78 78
                 $event->rules['assetpond/<volumeId:\d+>'] = 'asset-pond/default';
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         Event::on(
90 90
             CraftVariable::class,
91 91
             CraftVariable::EVENT_INIT,
92
-            static function (Event $event) {
92
+            static function(Event $event) {
93 93
                 /** @var CraftVariable $variable */
94 94
                 $variable = $event->sender;
95 95
                 $variable->set('assetpond', AssetPondVariable::class);
Please login to merge, or discard this patch.
src/controllers/DefaultController.php 1 patch
Spacing   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         // turn a single item into an array for uniformity
76 76
         if (is_string($inputs))
77 77
         {
78
-            $inputs = [ $inputs ];
78
+            $inputs = [$inputs];
79 79
         }
80 80
 
81 81
         // loop over all set entry fields to find posted values
@@ -174,8 +174,7 @@  discard block
 block discarded – undo
174 174
     private function _getFiles($input)
175 175
     {
176 176
         return isset($_FILES[$input]) ?
177
-            PostHelper::toArrayOfFiles($_FILES[$input]) :
178
-            [];
177
+            PostHelper::toArrayOfFiles($_FILES[$input]) : [];
179 178
     }
180 179
 
181 180
     /**
@@ -185,8 +184,7 @@  discard block
 block discarded – undo
185 184
     private function _getMeta($input)
186 185
     {
187 186
         return isset($_POST[$input]) ?
188
-            PostHelper::toArray($_POST[$input]) :
189
-            [];
187
+            PostHelper::toArray($_POST[$input]) : [];
190 188
     }
191 189
 
192 190
     /**
Please login to merge, or discard this patch.
src/helpers/PostHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         {
59 59
             $results = [];
60 60
 
61
-            foreach($value['tmp_name'] as $index => $tmpName)
61
+            foreach ($value['tmp_name'] as $index => $tmpName)
62 62
             {
63 63
                 $file = [
64 64
                     'tmp_name' => $value['tmp_name'][$index],
Please login to merge, or discard this patch.