Completed
Push — master ( 406ee6...c6d2a0 )
by
unknown
08:12
created
src/Charcoal/Admin/Template/AuthTemplateTrait.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,8 +93,7 @@
 block discarded – undo
93 93
      */
94 94
     public function avatarImage()
95 95
     {
96
-        $logo = $this->adminConfig('login.logo') ?:
97
-                $this->adminConfig('login_logo', 'assets/admin/images/avatar.jpg');
96
+        $logo = $this->adminConfig('login.logo') ?: $this->adminConfig('login_logo', 'assets/admin/images/avatar.jpg');
98 97
 
99 98
         if (empty($logo)) {
100 99
             return '';
Please login to merge, or discard this patch.
src/Charcoal/Admin/Template/LogoutTemplate.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,8 +84,7 @@
 block discarded – undo
84 84
      */
85 85
     public function avatarImage()
86 86
     {
87
-        $logo = $this->adminConfig('logout.logo') ?:
88
-                $this->adminConfig('logout_logo', 'assets/admin/images/avatar.jpg');
87
+        $logo = $this->adminConfig('logout.logo') ?: $this->adminConfig('logout_logo', 'assets/admin/images/avatar.jpg');
89 88
 
90 89
         if (empty($logo)) {
91 90
             return $this->loginLogo();
Please login to merge, or discard this patch.
src/Charcoal/Admin/AdminAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@
 block discarded – undo
256 256
             return false;
257 257
         }
258 258
 
259
-        return (!empty($recaptcha['public_key'])  || !empty($recaptcha['key'])) &&
259
+        return (!empty($recaptcha['public_key']) || !empty($recaptcha['key'])) &&
260 260
                (!empty($recaptcha['private_key']) || !empty($recaptcha['secret']));
261 261
     }
262 262
 
Please login to merge, or discard this patch.
src/Charcoal/Admin/Template/System/ClearCacheTemplate.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
             $item['ident']   = $this->formatApcCacheKey($item['key']);
298 298
             $item['size']    = $this->formatBytes($item['mem_size']);
299 299
             $item['created'] = date('Y-m-d H:i:s', $item['creation_time']);
300
-            $item['expiry']  = date('Y-m-d H:i:s', ($item['creation_time']+$item['ttl']));
300
+            $item['expiry']  = date('Y-m-d H:i:s', ($item['creation_time'] + $item['ttl']));
301 301
             yield $item;
302 302
         }
303 303
     }
@@ -373,8 +373,8 @@  discard block
 block discarded – undo
373 373
         if (preg_match($pattern, $key, $matches)) {
374 374
             $sns = $matches['stashNS'];
375 375
             $iid = trim($matches['itemID'], ':');
376
-            $iid = preg_replace([ '/:+/', '/\.+/' ], [ '⇒', '/' ], $iid);
377
-            $key = $matches['stashNS'] . '⇒' . $iid;
376
+            $iid = preg_replace(['/:+/', '/\.+/'], ['⇒', '/'], $iid);
377
+            $key = $matches['stashNS'].'⇒'.$iid;
378 378
         }
379 379
 
380 380
         return $key;
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
             return 0;
393 393
         }
394 394
 
395
-        $units = [ 'B', 'KB', 'MB', 'GB', 'TB' ];
395
+        $units = ['B', 'KB', 'MB', 'GB', 'TB'];
396 396
         $base  = log($bytes, 1024);
397 397
         $floor = floor($base);
398 398
         $unit  = $units[$floor];
Please login to merge, or discard this patch.
src/Charcoal/Admin/Ui/CollectionContainerTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
                 'Obj type must be a string'
267 267
             );
268 268
         }
269
-        $this->objType = str_replace([ '.', '_' ], '/', $objType);
269
+        $this->objType = str_replace(['.', '_'], '/', $objType);
270 270
 
271 271
         return $this;
272 272
     }
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
         $propertyIdent = $property->ident();
768 768
         $propertiesOptions = $this->propertiesOptions();
769 769
         if (isset($propertiesOptions[$propertyIdent])) {
770
-            $this->display->setData(array_diff_key($propertiesOptions[$propertyIdent], [ 'view_options' => true ]));
770
+            $this->display->setData(array_diff_key($propertiesOptions[$propertyIdent], ['view_options' => true]));
771 771
         }
772 772
     }
773 773
 
@@ -878,7 +878,7 @@  discard block
 block discarded – undo
878 878
             $objMetadata = $proto->metadata();
879 879
             if (isset($objMetadata['labels']) && !empty($objMetadata['labels'])) {
880 880
                 $objLabels = $objMetadata['labels'];
881
-                array_walk($objLabels, function(&$value) {
881
+                array_walk($objLabels, function (&$value) {
882 882
                     $value = $this->translator()->translation($value);
883 883
                 });
884 884
                 $this->objLabels = $objLabels;
Please login to merge, or discard this patch.
src/Charcoal/Admin/AdminTemplate.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
             return false;
559 559
         }
560 560
 
561
-        return (!empty($recaptcha['public_key'])  || !empty($recaptcha['key'])) &&
561
+        return (!empty($recaptcha['public_key']) || !empty($recaptcha['key'])) &&
562 562
                (!empty($recaptcha['private_key']) || !empty($recaptcha['secret']));
563 563
     }
564 564
 
@@ -788,7 +788,7 @@  discard block
 block discarded – undo
788 788
             $mainMenu = $mainMenuFromRequest;
789 789
         }
790 790
 
791
-        $menu  = $this->menuBuilder->build([]);
791
+        $menu = $this->menuBuilder->build([]);
792 792
         foreach ($headerMenu['items'] as $menuIdent => $menuItem) {
793 793
             $menuItem['menu'] = $menu;
794 794
             $test = $this->menuItemBuilder->build($menuItem);
@@ -948,7 +948,7 @@  discard block
 block discarded – undo
948 948
 
949 949
         if (!empty($menuItem['url'])) {
950 950
             $url = $menuItem['url'];
951
-            if ($url && strpos($url, ':') === false && !in_array($url[0], [ '/', '#', '?' ])) {
951
+            if ($url && strpos($url, ':') === false && !in_array($url[0], ['/', '#', '?'])) {
952 952
                 $url = $this->adminUrl().$url;
953 953
             }
954 954
         } else {
@@ -959,7 +959,7 @@  discard block
 block discarded – undo
959 959
 
960 960
         if (isset($menuItem['icon'])) {
961 961
             $icon = $menuItem['icon'];
962
-            if ($icon && strpos($icon, ':') === false && !in_array($icon[0], [ '/', '#', '?' ])) {
962
+            if ($icon && strpos($icon, ':') === false && !in_array($icon[0], ['/', '#', '?'])) {
963 963
                 $icon = $svgUri.$icon;
964 964
             }
965 965
         } else {
@@ -999,7 +999,7 @@  discard block
 block discarded – undo
999 999
 
1000 1000
         if (!empty($menuItem['url'])) {
1001 1001
             $url = $menuItem['url'];
1002
-            if ($url && strpos($url, ':') === false && !in_array($url[0], [ '/', '#', '?' ])) {
1002
+            if ($url && strpos($url, ':') === false && !in_array($url[0], ['/', '#', '?'])) {
1003 1003
                 $url = $this->adminUrl().$url;
1004 1004
             }
1005 1005
         } else {
@@ -1044,7 +1044,7 @@  discard block
 block discarded – undo
1044 1044
             }
1045 1045
 
1046 1046
             $value = str_replace(
1047
-                [ 'abstract', 'trait', 'interface', 'template', '\\' ],
1047
+                ['abstract', 'trait', 'interface', 'template', '\\'],
1048 1048
                 '',
1049 1049
                 $value
1050 1050
             );
Please login to merge, or discard this patch.
src/Charcoal/Admin/Property/Input/SelectInput.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
     {
151 151
         return [
152 152
             // 'iconBase' => 'fa', // Error in plugin?
153
-            'style'    => '',   // Neutralize any Bootstrap .btn styling
153
+            'style'    => '', // Neutralize any Bootstrap .btn styling
154 154
             'template' => [
155 155
                 'caret' => ''   // No need for .caret markup since Bootstrap 4
156 156
             ]
Please login to merge, or discard this patch.