@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | private $description; |
| 48 | 48 | private $direction; |
| 49 | 49 | private $display; |
| 50 | - private $icons = [ ]; |
|
| 50 | + private $icons = []; |
|
| 51 | 51 | private $language; |
| 52 | 52 | private $name; |
| 53 | 53 | private $orientation; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | private $manifestUrl; |
| 60 | 60 | |
| 61 | - private $splashScreens = [ ]; |
|
| 61 | + private $splashScreens = []; |
|
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | 64 | * Returns the manifest URL. |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | public function get(AppConfiguration $configuration) |
| 34 | 34 | { |
| 35 | - $manifest = [ ]; |
|
| 35 | + $manifest = []; |
|
| 36 | 36 | |
| 37 | 37 | if (($backgroundColor = $configuration->getBackgroundColor()) !== null) { |
| 38 | 38 | $manifest["background_color"] = $backgroundColor; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | if (count($icons = $configuration->getIcons()) > 0) { |
| 54 | - $manifest["icons"] = [ ]; |
|
| 54 | + $manifest["icons"] = []; |
|
| 55 | 55 | |
| 56 | 56 | foreach ($icons as $icon) { |
| 57 | 57 | $manifest["icons"][] = $this->getImageData($icon); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | if (count($splashScreens = $configuration->getSplashScreens()) > 0) { |
| 90 | - $manifest["splash_screens"] = [ ]; |
|
| 90 | + $manifest["splash_screens"] = []; |
|
| 91 | 91 | |
| 92 | 92 | foreach ($splashScreens as $splashScreen) { |
| 93 | 93 | $manifest["splash_screens"][] = $this->getImageData($splashScreen); |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | $data["sizes"] = implode( |
| 116 | 116 | " ", |
| 117 | 117 | array_map( |
| 118 | - function (array $size) { |
|
| 118 | + function(array $size) { |
|
| 119 | 119 | return "{$size[0]}x{$size[1]}"; |
| 120 | 120 | }, |
| 121 | 121 | $sizes |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | const PURPOSE_BADGE = "badge"; |
| 24 | 24 | const PURPOSE_ANY = "any"; |
| 25 | 25 | |
| 26 | - private $purpose = [ ]; |
|
| 27 | - private $sizes = [ ]; |
|
| 26 | + private $purpose = []; |
|
| 27 | + private $sizes = []; |
|
| 28 | 28 | private $src; |
| 29 | 29 | private $type; |
| 30 | 30 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | public function addSize($width, $height) |
| 77 | 77 | { |
| 78 | - $this->sizes[] = [ (int)$width, (int)$height ]; |
|
| 78 | + $this->sizes[] = [(int)$width, (int)$height]; |
|
| 79 | 79 | return $this; |
| 80 | 80 | } |
| 81 | 81 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | return implode( |
| 46 | 46 | "\n", |
| 47 | 47 | array_map( |
| 48 | - function (array $tag) { |
|
| 48 | + function(array $tag) { |
|
| 49 | 49 | return $this->renderTag($tag); |
| 50 | 50 | }, |
| 51 | 51 | $this->getData($configuration, $standardTags, $legacyTags, $appleTags, $microsoftTags) |
@@ -113,16 +113,16 @@ discard block |
||
| 113 | 113 | private function getData(AppConfiguration $configuration, $standardTags, $legacyTags, $appleTags, $microsoftTags) |
| 114 | 114 | { |
| 115 | 115 | return array_merge( |
| 116 | - $standardTags ? $this->getStandardTags($configuration) : [ ], |
|
| 117 | - $legacyTags ? $this->getLegacyTags($configuration) : [ ], |
|
| 118 | - $appleTags ? $this->getAppleTags($configuration) : [ ], |
|
| 119 | - $microsoftTags ? $this->getMicrosoftTags($configuration) : [ ] |
|
| 116 | + $standardTags ? $this->getStandardTags($configuration) : [], |
|
| 117 | + $legacyTags ? $this->getLegacyTags($configuration) : [], |
|
| 118 | + $appleTags ? $this->getAppleTags($configuration) : [], |
|
| 119 | + $microsoftTags ? $this->getMicrosoftTags($configuration) : [] |
|
| 120 | 120 | ); |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | private function getStandardTags(AppConfiguration $configuration) |
| 124 | 124 | { |
| 125 | - $tags = [ ]; |
|
| 125 | + $tags = []; |
|
| 126 | 126 | |
| 127 | 127 | // Manifest |
| 128 | 128 | // https://www.w3.org/TR/appmanifest/#using-a-link-element-to-link-to-a-manifest |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | private function getLegacyTags(AppConfiguration $configuration) |
| 139 | 139 | { |
| 140 | - $tags = [ ]; |
|
| 140 | + $tags = []; |
|
| 141 | 141 | |
| 142 | 142 | // Application name |
| 143 | 143 | // https://html.spec.whatwg.org/multipage/semantics.html#meta-application-name |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | // https://html.spec.whatwg.org/multipage/semantics.html#rel-icon |
| 164 | 164 | foreach ($configuration->getIcons() as $icon) { |
| 165 | 165 | $sizes = array_map( |
| 166 | - function (array $size) { |
|
| 166 | + function(array $size) { |
|
| 167 | 167 | return "{$size[0]}x{$size[1]}"; |
| 168 | 168 | }, |
| 169 | 169 | $icon->getSizes() |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | |
| 183 | 183 | private function getAppleTags(AppConfiguration $configuration) |
| 184 | 184 | { |
| 185 | - $tags = [ ]; |
|
| 185 | + $tags = []; |
|
| 186 | 186 | |
| 187 | 187 | // format-detection |
| 188 | 188 | // https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html#//apple_ref/doc/uid/TP40008193-SW5 |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | // https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html#//apple_ref/doc/uid/TP40002051-CH3-SW4 |
| 206 | 206 | foreach ($configuration->getIcons() as $icon) { |
| 207 | 207 | $sizes = array_map( |
| 208 | - function (array $size) { |
|
| 208 | + function(array $size) { |
|
| 209 | 209 | return "{$size[0]}x{$size[1]}"; |
| 210 | 210 | }, |
| 211 | 211 | $icon->getSizes() |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | |
| 244 | 244 | private function getMicrosoftTags(AppConfiguration $configuration) |
| 245 | 245 | { |
| 246 | - $tags = [ ]; |
|
| 246 | + $tags = []; |
|
| 247 | 247 | |
| 248 | 248 | // Start URL |
| 249 | 249 | // https://msdn.microsoft.com/en-us/library/gg491732(v=vs.85).aspx#msapplication-starturl |