Passed
Push — master ( c7360f...12b8a1 )
by Gino
07:11
created
models/Settings.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     const LINK_TARGET_PARENT = '_parent';
23 23
     const LINK_TARGET_TOP = '_top';
24 24
 
25
-    public $implement = [SettingsModel::class];
25
+    public $implement = [ SettingsModel::class ];
26 26
 
27 27
     public $settingsCode = self::SETTINGS_CODE;
28 28
 
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public function getLinks(): array
46 46
     {
47
-        $links = [];
47
+        $links = [ ];
48 48
 
49 49
         if (!empty($this->links) && \is_array($this->links)) {
50 50
             foreach ($this->links as $link) {
51
-                $links[] = (new LinkItem())->fillFromArray((array) $link);
51
+                $links[ ] = (new LinkItem())->fillFromArray((array)$link);
52 52
             }
53 53
         }
54 54
 
Please login to merge, or discard this patch.
models/LinkItem.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -85,16 +85,16 @@
 block discarded – undo
85 85
      */
86 86
     public function fillFromArray(array $data): LinkItem
87 87
     {
88
-        if (isset($data['icon'])) {
89
-            $this->setIcon((string) $data['icon']);
88
+        if (isset($data[ 'icon' ])) {
89
+            $this->setIcon((string)$data[ 'icon' ]);
90 90
         }
91 91
 
92
-        if (isset($data['link'])) {
93
-            $this->setLink((string) $data['link']);
92
+        if (isset($data[ 'link' ])) {
93
+            $this->setLink((string)$data[ 'link' ]);
94 94
         }
95 95
 
96
-        if (isset($data['name'])) {
97
-            $this->setName((string) $data['name']);
96
+        if (isset($data[ 'name' ])) {
97
+            $this->setName((string)$data[ 'name' ]);
98 98
         }
99 99
 
100 100
         return $this;
Please login to merge, or discard this patch.
components/LinkList.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@  discard block
 block discarded – undo
19 19
      *
20 20
      * @var array
21 21
      */
22
-    private static $definedProperties = [];
22
+    private static $definedProperties = [ ];
23 23
 
24 24
     const NAME = 'linkList';
25 25
 
26 26
     /**
27 27
      * @var LinkItem[]
28 28
      */
29
-    public $links = [];
29
+    public $links = [ ];
30 30
 
31 31
     /**
32 32
      * @var string
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
 
63 63
         $links = $settings->getLinks();
64 64
 
65
-        $properties = [];
65
+        $properties = [ ];
66 66
 
67 67
         foreach ($links as $link) {
68 68
             $name = $link->getName();
69 69
 
70
-            $properties[$name] = [
70
+            $properties[ $name ] = [
71 71
                 'title' => ucwords($name),
72 72
                 'type'  => 'checkbox',
73 73
                 'default' => false,
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             ];
76 76
         }
77 77
 
78
-        $properties['linkTarget'] = [
78
+        $properties[ 'linkTarget' ] = [
79 79
             'group'       => Plugin::LOCALIZATION_KEY . 'components.link_list.link_settings_group',
80 80
             'title'       => Plugin::LOCALIZATION_KEY . 'components.link_list.link_target_title',
81 81
             'description' => Plugin::LOCALIZATION_KEY . 'components.link_list.link_target_description',
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
         foreach ($links as $index => $link) {
119 119
             if (!$this->property($link->getName())) {
120
-                unset($links[$index]);
120
+                unset($links[ $index ]);
121 121
             }
122 122
         }
123 123
 
Please login to merge, or discard this patch.