@@ -22,7 +22,7 @@ discard block |
||
| 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 |
||
| 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 | |
@@ -85,16 +85,16 @@ |
||
| 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; |
@@ -19,14 +19,14 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |