@@ -26,5 +26,5 @@ |
||
| 26 | 26 | * |
| 27 | 27 | * @var MetaItem |
| 28 | 28 | */ |
| 29 | - public $data = []; |
|
| 29 | + public $data = [ ]; |
|
| 30 | 30 | } |
@@ -56,5 +56,5 @@ |
||
| 56 | 56 | * |
| 57 | 57 | * @var array |
| 58 | 58 | */ |
| 59 | - public $data = []; |
|
| 59 | + public $data = [ ]; |
|
| 60 | 60 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * |
| 44 | 44 | * @return string The rendered meta item |
| 45 | 45 | */ |
| 46 | - public function render($params = []): string; |
|
| 46 | + public function render($params = [ ]): string; |
|
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * Render the meta item as an array of attributes |
@@ -52,6 +52,6 @@ discard block |
||
| 52 | 52 | * |
| 53 | 53 | * @return array |
| 54 | 54 | */ |
| 55 | - public function renderAttributes($params = []): array; |
|
| 55 | + public function renderAttributes($params = [ ]): array; |
|
| 56 | 56 | |
| 57 | 57 | } |
@@ -38,8 +38,8 @@ discard block |
||
| 38 | 38 | { |
| 39 | 39 | $rules = parent::rules(); |
| 40 | 40 | $rules = array_merge($rules, [ |
| 41 | - [['path', 'controller', 'action'], 'required'], |
|
| 42 | - [['path', 'controller', 'action'], 'string'], |
|
| 41 | + [ [ 'path', 'controller', 'action' ], 'required' ], |
|
| 42 | + [ [ 'path', 'controller', 'action' ], 'string' ], |
|
| 43 | 43 | ]); |
| 44 | 44 | |
| 45 | 45 | return $rules; |
@@ -50,14 +50,14 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | public function routeRules(): array |
| 52 | 52 | { |
| 53 | - $rules = []; |
|
| 53 | + $rules = [ ]; |
|
| 54 | 54 | $route = |
| 55 | 55 | Seomatic::$plugin->handle |
| 56 | 56 | . '/' |
| 57 | 57 | . $this->controller |
| 58 | 58 | . '/' |
| 59 | 59 | . $this->action; |
| 60 | - $rules[$this->path] = ['route' => $route]; |
|
| 60 | + $rules[ $this->path ] = [ 'route' => $route ]; |
|
| 61 | 61 | |
| 62 | 62 | return $rules; |
| 63 | 63 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | /** |
| 66 | 66 | * @inheritdoc |
| 67 | 67 | */ |
| 68 | - public function render($params = []): string |
|
| 68 | + public function render($params = [ ]): string |
|
| 69 | 69 | { |
| 70 | 70 | $html = PluginTemplate::renderPluginTemplate($this->path, $params); |
| 71 | 71 | |
@@ -41,5 +41,5 @@ |
||
| 41 | 41 | * |
| 42 | 42 | * @return string |
| 43 | 43 | */ |
| 44 | - public function render($params = []): string; |
|
| 44 | + public function render($params = [ ]): string; |
|
| 45 | 45 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | * |
| 40 | 40 | * @return MetaItem |
| 41 | 41 | */ |
| 42 | - public function create($config = [], $add = true); |
|
| 42 | + public function create($config = [ ], $add = true); |
|
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | 45 | * Add a meta item to its appropriate container |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | // Static Methods |
| 28 | 28 | // ========================================================================= |
| 29 | 29 | |
| 30 | - public static function create($config = []); |
|
| 30 | + public static function create($config = [ ]); |
|
| 31 | 31 | |
| 32 | 32 | // Public Methods |
| 33 | 33 | // ========================================================================= |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | * |
| 64 | 64 | * @return string |
| 65 | 65 | */ |
| 66 | - public function render($params = []): string; |
|
| 66 | + public function render($params = [ ]): string; |
|
| 67 | 67 | |
| 68 | 68 | /** |
| 69 | 69 | * Normalizes the containers’s data for use. |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | * |
| 39 | 39 | * @return null|Container |
| 40 | 40 | */ |
| 41 | - public static function create($config = []) |
|
| 41 | + public static function create($config = [ ]) |
|
| 42 | 42 | { |
| 43 | 43 | $className = get_called_class(); |
| 44 | 44 | /** @var $model Container */ |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | * |
| 59 | 59 | * @var array |
| 60 | 60 | */ |
| 61 | - public $data = []; |
|
| 61 | + public $data = [ ]; |
|
| 62 | 62 | |
| 63 | 63 | // Public Methods |
| 64 | 64 | // ========================================================================= |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | */ |
| 69 | 69 | public function addData($data, string $key) |
| 70 | 70 | { |
| 71 | - $this->data[$key] = $data; |
|
| 71 | + $this->data[ $key ] = $data; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -76,8 +76,8 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | public function getData(string $key) |
| 78 | 78 | { |
| 79 | - if (!empty($this->data[$key])) { |
|
| 80 | - return $this->data[$key]; |
|
| 79 | + if (!empty($this->data[ $key ])) { |
|
| 80 | + return $this->data[ $key ]; |
|
| 81 | 81 | } else { |
| 82 | 82 | return null; |
| 83 | 83 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | /** |
| 95 | 95 | * @inheritdoc |
| 96 | 96 | */ |
| 97 | - public function render($params = []): string |
|
| 97 | + public function render($params = [ ]): string |
|
| 98 | 98 | { |
| 99 | 99 | return ''; |
| 100 | 100 | } |
@@ -115,11 +115,11 @@ discard block |
||
| 115 | 115 | { |
| 116 | 116 | $rules = parent::rules(); |
| 117 | 117 | $rules = array_merge($rules, [ |
| 118 | - [['name', 'description', 'handle', 'class'], 'required'], |
|
| 119 | - [['include'], 'boolean'], |
|
| 120 | - [['name', 'description', 'handle', 'class'], 'string'], |
|
| 121 | - [['dependencies'], 'safe'], |
|
| 122 | - [['data'], ArrayValidator::class], |
|
| 118 | + [ [ 'name', 'description', 'handle', 'class' ], 'required' ], |
|
| 119 | + [ [ 'include' ], 'boolean' ], |
|
| 120 | + [ [ 'name', 'description', 'handle', 'class' ], 'string' ], |
|
| 121 | + [ [ 'dependencies' ], 'safe' ], |
|
| 122 | + [ [ 'data' ], ArrayValidator::class ], |
|
| 123 | 123 | ]); |
| 124 | 124 | |
| 125 | 125 | return $rules; |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * |
| 35 | 35 | * @var MetaItem |
| 36 | 36 | */ |
| 37 | - public $data = []; |
|
| 37 | + public $data = [ ]; |
|
| 38 | 38 | |
| 39 | 39 | // Public Methods |
| 40 | 40 | // ========================================================================= |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | /** |
| 43 | 43 | * @inheritdoc |
| 44 | 44 | */ |
| 45 | - public function render($params = []): string |
|
| 45 | + public function render($params = [ ]): string |
|
| 46 | 46 | { |
| 47 | 47 | $html = ''; |
| 48 | 48 | |
@@ -61,15 +61,15 @@ discard block |
||
| 61 | 61 | /** |
| 62 | 62 | * @inheritdoc |
| 63 | 63 | */ |
| 64 | - public function renderArray($params = []): array |
|
| 64 | + public function renderArray($params = [ ]): array |
|
| 65 | 65 | { |
| 66 | - $htmlArray = []; |
|
| 66 | + $htmlArray = [ ]; |
|
| 67 | 67 | |
| 68 | 68 | if ($this->prepForInclusion()) { |
| 69 | 69 | /** @var $metaItemModel MetaItem */ |
| 70 | 70 | foreach ($this->data as $metaItemModel) { |
| 71 | 71 | if ($metaItemModel->include) { |
| 72 | - $htmlArray[$metaItemModel->key] = $metaItemModel->renderAttributes($params); |
|
| 72 | + $htmlArray[ $metaItemModel->key ] = $metaItemModel->renderAttributes($params); |
|
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | } |