@@ -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 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | return [ |
| 23 | - MetaLinkContainer::CONTAINER_TYPE.LinkService::GENERAL_HANDLE => [ |
|
| 23 | + MetaLinkContainer::CONTAINER_TYPE . LinkService::GENERAL_HANDLE => [ |
|
| 24 | 24 | 'name' => 'General', |
| 25 | 25 | 'description' => 'Link Tags', |
| 26 | 26 | 'handle' => LinkService::GENERAL_HANDLE, |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | return [ |
| 23 | - MetaTagContainer::CONTAINER_TYPE.TagService::GENERAL_HANDLE => [ |
|
| 23 | + MetaTagContainer::CONTAINER_TYPE . TagService::GENERAL_HANDLE => [ |
|
| 24 | 24 | 'name' => 'General', |
| 25 | 25 | 'description' => 'General Meta Tags', |
| 26 | 26 | 'handle' => TagService::GENERAL_HANDLE, |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | 'data' => [ |
| 32 | 32 | ], |
| 33 | 33 | ], |
| 34 | - MetaTagContainer::CONTAINER_TYPE.TagService::FACEBOOK_HANDLE => [ |
|
| 34 | + MetaTagContainer::CONTAINER_TYPE . TagService::FACEBOOK_HANDLE => [ |
|
| 35 | 35 | 'name' => 'Facebook', |
| 36 | 36 | 'description' => 'Facebook OpenGraph Meta Tags', |
| 37 | 37 | 'handle' => TagService::FACEBOOK_HANDLE, |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | 'data' => [ |
| 43 | 43 | ], |
| 44 | 44 | ], |
| 45 | - MetaTagContainer::CONTAINER_TYPE.TagService::TWITTER_HANDLE => [ |
|
| 45 | + MetaTagContainer::CONTAINER_TYPE . TagService::TWITTER_HANDLE => [ |
|
| 46 | 46 | 'name' => 'Twitter', |
| 47 | 47 | 'description' => 'Twitter Card Meta Tags', |
| 48 | 48 | 'handle' => TagService::TWITTER_HANDLE, |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | 'data' => [ |
| 54 | 54 | ], |
| 55 | 55 | ], |
| 56 | - MetaTagContainer::CONTAINER_TYPE.TagService::MISC_HANDLE => [ |
|
| 56 | + MetaTagContainer::CONTAINER_TYPE . TagService::MISC_HANDLE => [ |
|
| 57 | 57 | 'name' => 'Miscellaneous', |
| 58 | 58 | 'description' => 'Miscellaneous Meta Tags', |
| 59 | 59 | 'handle' => TagService::MISC_HANDLE, |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | return [ |
| 23 | - MetaJsonLdContainer::CONTAINER_TYPE.JsonLdService::GENERAL_HANDLE => [ |
|
| 23 | + MetaJsonLdContainer::CONTAINER_TYPE . JsonLdService::GENERAL_HANDLE => [ |
|
| 24 | 24 | 'name' => 'General', |
| 25 | 25 | 'description' => 'JsonLd Tags', |
| 26 | 26 | 'handle' => JsonLdService::GENERAL_HANDLE, |
@@ -24,16 +24,16 @@ |
||
| 24 | 24 | 'sitemapPriority' => 0.5, |
| 25 | 25 | 'sitemapLimit' => null, |
| 26 | 26 | 'sitemapImageFieldMap' => [ |
| 27 | - ['property' => 'title', 'field' => 'title'], |
|
| 28 | - ['property' => 'caption', 'field' => ''], |
|
| 29 | - ['property' => 'geo_location', 'field' => ''], |
|
| 30 | - ['property' => 'license', 'field' => ''], |
|
| 27 | + [ 'property' => 'title', 'field' => 'title' ], |
|
| 28 | + [ 'property' => 'caption', 'field' => '' ], |
|
| 29 | + [ 'property' => 'geo_location', 'field' => '' ], |
|
| 30 | + [ 'property' => 'license', 'field' => '' ], |
|
| 31 | 31 | ], |
| 32 | 32 | 'sitemapVideoFieldMap' => [ |
| 33 | - ['property' => 'title', 'field' => 'title'], |
|
| 34 | - ['property' => 'description', 'field' => ''], |
|
| 35 | - ['property' => 'thumbnailLoc', 'field' => ''], |
|
| 36 | - ['property' => 'duration', 'field' => ''], |
|
| 37 | - ['property' => 'category', 'field' => ''], |
|
| 33 | + [ 'property' => 'title', 'field' => 'title' ], |
|
| 34 | + [ 'property' => 'description', 'field' => '' ], |
|
| 35 | + [ 'property' => 'thumbnailLoc', 'field' => '' ], |
|
| 36 | + [ 'property' => 'duration', 'field' => '' ], |
|
| 37 | + [ 'property' => 'category', 'field' => '' ], |
|
| 38 | 38 | ], |
| 39 | 39 | ]; |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | return [ |
| 23 | - MetaTitleContainer::CONTAINER_TYPE.TitleService::GENERAL_HANDLE => [ |
|
| 23 | + MetaTitleContainer::CONTAINER_TYPE . TitleService::GENERAL_HANDLE => [ |
|
| 24 | 24 | 'name' => 'General', |
| 25 | 25 | 'description' => 'Meta Title Tag', |
| 26 | 26 | 'handle' => TitleService::GENERAL_HANDLE, |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | 'seoDescriptionField' => '', |
| 24 | 24 | 'seoKeywordsSource' => 'fromCustom', |
| 25 | 25 | 'seoKeywordsField' => '', |
| 26 | - 'seoImageIds' => [], |
|
| 26 | + 'seoImageIds' => [ ], |
|
| 27 | 27 | 'seoImageSource' => 'fromAsset', |
| 28 | 28 | 'seoImageField' => '', |
| 29 | 29 | 'seoImageTransform' => true, |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | 'twitterSiteNamePositionSource' => 'fromCustom', |
| 38 | 38 | 'twitterDescriptionSource' => 'sameAsSeo', |
| 39 | 39 | 'twitterDescriptionField' => '', |
| 40 | - 'twitterImageIds' => [], |
|
| 40 | + 'twitterImageIds' => [ ], |
|
| 41 | 41 | 'twitterImageSource' => 'sameAsSeo', |
| 42 | 42 | 'twitterImageField' => '', |
| 43 | 43 | 'twitterImageTransform' => true, |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | 'ogSiteNamePositionSource' => 'fromCustom', |
| 50 | 50 | 'ogDescriptionSource' => 'sameAsSeo', |
| 51 | 51 | 'ogDescriptionField' => '', |
| 52 | - 'ogImageIds' => [], |
|
| 52 | + 'ogImageIds' => [ ], |
|
| 53 | 53 | 'ogImageSource' => 'sameAsSeo', |
| 54 | 54 | 'ogImageField' => '', |
| 55 | 55 | 'ogImageTransform' => true, |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | return [ |
| 23 | - MetaScriptContainer::CONTAINER_TYPE.ScriptService::GENERAL_HANDLE => [ |
|
| 23 | + MetaScriptContainer::CONTAINER_TYPE . ScriptService::GENERAL_HANDLE => [ |
|
| 24 | 24 | 'name' => 'General', |
| 25 | 25 | 'description' => 'Script Tags', |
| 26 | 26 | 'handle' => ScriptService::GENERAL_HANDLE, |