@@ -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. |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | return implode( |
41 | 41 | "\n", |
42 | 42 | array_map( |
43 | - function (array $tag) { |
|
43 | + function(array $tag) { |
|
44 | 44 | return $this->renderTag($tag); |
45 | 45 | }, |
46 | 46 | $this->getData($configuration) |
@@ -104,16 +104,16 @@ discard block |
||
104 | 104 | private function getData(AppConfiguration $configuration) |
105 | 105 | { |
106 | 106 | return array_merge( |
107 | - $this->generateStandardTags ? $this->getStandardTags($configuration) : [ ], |
|
108 | - $this->generateLegacyStandardTags ? $this->getLegacyStandardTags($configuration) : [ ], |
|
109 | - $this->generateAppleSpecificTags ? $this->getAppleTags($configuration) : [ ], |
|
110 | - $this->generateMicrosoftSpecificTags ? $this->getMicrosoftTags($configuration) : [ ] |
|
107 | + $this->generateStandardTags ? $this->getStandardTags($configuration) : [], |
|
108 | + $this->generateLegacyStandardTags ? $this->getLegacyStandardTags($configuration) : [], |
|
109 | + $this->generateAppleSpecificTags ? $this->getAppleTags($configuration) : [], |
|
110 | + $this->generateMicrosoftSpecificTags ? $this->getMicrosoftTags($configuration) : [] |
|
111 | 111 | ); |
112 | 112 | } |
113 | 113 | |
114 | 114 | private function getStandardTags(AppConfiguration $configuration) |
115 | 115 | { |
116 | - $tags = [ ]; |
|
116 | + $tags = []; |
|
117 | 117 | |
118 | 118 | // Manifest |
119 | 119 | // https://www.w3.org/TR/appmanifest/#using-a-link-element-to-link-to-a-manifest |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | private function getLegacyStandardTags(AppConfiguration $configuration) |
130 | 130 | { |
131 | - $tags = [ ]; |
|
131 | + $tags = []; |
|
132 | 132 | |
133 | 133 | // Application name |
134 | 134 | // https://html.spec.whatwg.org/multipage/semantics.html#meta-application-name |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | // https://html.spec.whatwg.org/multipage/semantics.html#rel-icon |
155 | 155 | foreach ($configuration->getIcons() as $icon) { |
156 | 156 | $sizes = array_map( |
157 | - function (array $size) { |
|
157 | + function(array $size) { |
|
158 | 158 | return "{$size[0]}x{$size[1]}"; |
159 | 159 | }, |
160 | 160 | $icon->getSizes() |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | |
174 | 174 | private function getAppleTags(AppConfiguration $configuration) |
175 | 175 | { |
176 | - $tags = [ ]; |
|
176 | + $tags = []; |
|
177 | 177 | |
178 | 178 | // format-detection |
179 | 179 | // https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html#//apple_ref/doc/uid/TP40008193-SW5 |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | // https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html#//apple_ref/doc/uid/TP40002051-CH3-SW4 |
197 | 197 | foreach ($configuration->getIcons() as $icon) { |
198 | 198 | $sizes = array_map( |
199 | - function (array $size) { |
|
199 | + function(array $size) { |
|
200 | 200 | return "{$size[0]}x{$size[1]}"; |
201 | 201 | }, |
202 | 202 | $icon->getSizes() |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | |
235 | 235 | private function getMicrosoftTags(AppConfiguration $configuration) |
236 | 236 | { |
237 | - $tags = [ ]; |
|
237 | + $tags = []; |
|
238 | 238 | |
239 | 239 | // Start URL |
240 | 240 | // https://msdn.microsoft.com/en-us/library/gg491732(v=vs.85).aspx#msapplication-starturl |
@@ -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 |