@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function __construct($template, Request $request, $parameters, $matchedSitemapItem) |
41 | 41 | { |
42 | - $this->parameters = (array)$parameters; |
|
42 | + $this->parameters = (array) $parameters; |
|
43 | 43 | $this->checkParameters(); |
44 | 44 | |
45 | 45 | $lang = substr(isset($_SERVER[self::HTTP_ACCEPT_LANGUAGE]) ? $_SERVER[self::HTTP_ACCEPT_LANGUAGE] : self::$DEFAULT_LANGUAGE, |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | unset($this->parameters[self::PARAMETER_LANGUAGE_PARAMETER_NAME]); |
79 | 79 | } |
80 | 80 | if (isset($this->parameters[self::PARAMETER_FORCE_REDIRECT])) { |
81 | - $this->forceRedirect = (bool)$this->parameters[self::PARAMETER_FORCE_REDIRECT]; |
|
81 | + $this->forceRedirect = (bool) $this->parameters[self::PARAMETER_FORCE_REDIRECT]; |
|
82 | 82 | unset($this->parameters[self::PARAMETER_FORCE_REDIRECT]); |
83 | 83 | } |
84 | 84 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | if (preg_match('/\.(?:js|ico|txt|gif|jpg|jpeg|png|bmp|css|html|htm|php|pdf|exe|eot|svg|ttf|woff|ogg|mp3|xml|map|scss)$/', |
48 | 48 | $_SERVER['REQUEST_URI'])) { |
49 | 49 | if (file_exists($dir . $_SERVER["REQUEST_URI"])) { |
50 | - return true; // serve the requested resource as-is. |
|
50 | + return true; // serve the requested resource as-is. |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function SetTransparency($transparency) |
39 | 39 | { |
40 | - $this->_transparency = (int)$transparency; |
|
40 | + $this->_transparency = (int) $transparency; |
|
41 | 41 | return $this; |
42 | 42 | } |
43 | 43 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | */ |
65 | 65 | protected function calculateX($imageResource) |
66 | 66 | { |
67 | - if ((int)$this->_x === $this->_x) { |
|
67 | + if ((int) $this->_x === $this->_x) { |
|
68 | 68 | return $this->_x; |
69 | 69 | } |
70 | 70 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | } elseif ($x == 'right') { |
81 | 81 | $x = $imageWidth - $watermarkWidth; |
82 | 82 | } |
83 | - return (int)$x; |
|
83 | + return (int) $x; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function calculateY($imageResource) |
94 | 94 | { |
95 | - if ((int)$this->_y === $this->_y) { |
|
95 | + if ((int) $this->_y === $this->_y) { |
|
96 | 96 | return $this->_y; |
97 | 97 | } |
98 | 98 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | } elseif ($y == 'bottom') { |
109 | 109 | $y = $imageHeight - $watermarkHeight; |
110 | 110 | } |
111 | - return (int)$y; |
|
111 | + return (int) $y; |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $cacheExists = $this->cache !== false; |
102 | 102 | $cacheExpired = false; |
103 | 103 | if ($cacheExists) { |
104 | - $cacheCreationStamp = (int)$this->cache->creationStamp; |
|
104 | + $cacheCreationStamp = (int) $this->cache->creationStamp; |
|
105 | 105 | $currentTime = time(); |
106 | 106 | $cacheAge = $currentTime - $cacheCreationStamp; |
107 | 107 | $maxAgeInterval = new \DateInterval($this->maxAge); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | private function setHeadersFromCache() |
129 | 129 | { |
130 | 130 | if (isset($this->cache->headers)) { |
131 | - $headers = (array)json_decode($this->cache->headers); |
|
131 | + $headers = (array) json_decode($this->cache->headers); |
|
132 | 132 | /** @var array $headers */ |
133 | 133 | foreach ($headers as $headerName => $headerContent) { |
134 | 134 | ResponseHeaders::add($headerName, $headerContent); |