@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | <input required="required" value="<?=isset($document) ? $document->title : '' ?>"<?= isset($document, $document->title) && !empty($document->title) ? ' readonly="readonly"' : '' ?> type="text" id="title" name="title" placeholder="Title" /> |
18 | 18 | </div> |
19 | 19 | <?php endif ?> |
20 | - <?php $fieldPrefix='fields';?> |
|
20 | + <?php $fieldPrefix = 'fields'; ?> |
|
21 | 21 | <?php foreach ($documentType->fields as $field) : ?> |
22 | 22 | <div class="form-element"> |
23 | 23 | <label for="<?=$field->slug?>"><?=$field->title?></label> |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | </div> |
74 | 74 | </div> |
75 | 75 | </li> |
76 | - <?php $value='';?> |
|
76 | + <?php $value = ''; ?> |
|
77 | 77 | <?php endforeach ?> |
78 | 78 | <?php endif ?> |
79 | 79 | </ul> |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | <?php include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?> |
94 | 94 | </div> |
95 | 95 | </li> |
96 | - <?php $value='';?> |
|
96 | + <?php $value = ''; ?> |
|
97 | 97 | <?php endforeach ?> |
98 | 98 | <?php endif ?> |
99 | 99 | </div> |
@@ -102,17 +102,17 @@ discard block |
||
102 | 102 | <a class="btn js-addrtemultiple">+</a> |
103 | 103 | <?php endif ?> |
104 | 104 | </div> |
105 | - <?php $value='';?> |
|
105 | + <?php $value = ''; ?> |
|
106 | 106 | <?php endforeach ?> |
107 | 107 | <hr /> |
108 | - <?php $static_brick_nr = 0;?> |
|
108 | + <?php $static_brick_nr = 0; ?> |
|
109 | 109 | <?php foreach ($documentType->bricks as $brick) : ?> |
110 | 110 | <div class="brick"> |
111 | 111 | <label><?=$brick->title?></label> |
112 | 112 | <?php if ($brick->multiple == 'true') : ?> |
113 | 113 | <input type="hidden" value="<?=$brick->brickSlug?>"/> |
114 | 114 | <input type="hidden" value="<?=$brick->slug?>"/> |
115 | - <?php $myBrickSlug=$brick->slug;?> |
|
115 | + <?php $myBrickSlug = $brick->slug; ?> |
|
116 | 116 | <ul id="newBrickDropzone_<?=$static_brick_nr?>" class="dynamicBricks sortable"> |
117 | 117 | <?php if (isset($document)) : ?> |
118 | 118 | <?php foreach ($document->bricks as $currentBrickSlug => $brickArray) : ?> |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | <a class="btn" onclick="addDynamicBrick(this, 'true', 'newBrickDropzone_<?=$static_brick_nr?>');">+</a> |
137 | 137 | <?php $static_brick_nr += 1?> |
138 | 138 | <?php else : ?> |
139 | - <?php $fieldPrefix='bricks[' . $brick->slug . '][fields]';?> |
|
139 | + <?php $fieldPrefix = 'bricks[' . $brick->slug . '][fields]'; ?> |
|
140 | 140 | <input type="hidden" name="bricks[<?=$brick->slug?>][type]" value="<?=$brick->brickSlug?>" /> |
141 | 141 | <?php foreach ($brick->structure->fields as $field) : ?> |
142 | 142 | <div class="form-element"> |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | </div> |
196 | 196 | </div> |
197 | 197 | </li> |
198 | - <?php $value='';?> |
|
198 | + <?php $value = ''; ?> |
|
199 | 199 | <?php endforeach ?> |
200 | 200 | <?php endif ?> |
201 | 201 | </ul> |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | <?php include(__DIR__ . '/fieldTypes/' . str_replace(' ', '-', $field->type) . '.php') ?> |
217 | 217 | </div> |
218 | 218 | </li> |
219 | - <?php $value='';?> |
|
219 | + <?php $value = ''; ?> |
|
220 | 220 | <?php endforeach ?> |
221 | 221 | <?php endif ?> |
222 | 222 | </div> |
@@ -225,12 +225,12 @@ discard block |
||
225 | 225 | <a class="btn js-addrtemultiple">+</a> |
226 | 226 | <?php endif ?> |
227 | 227 | </div> |
228 | - <?php $value='';?> |
|
228 | + <?php $value = ''; ?> |
|
229 | 229 | <?php endforeach ?> |
230 | 230 | <?php endif ?> |
231 | 231 | </div> |
232 | 232 | <hr /> |
233 | - <?php endforeach;?> |
|
233 | + <?php endforeach; ?> |
|
234 | 234 | |
235 | 235 | |
236 | 236 |
@@ -55,7 +55,7 @@ |
||
55 | 55 | */ |
56 | 56 | public function __toString() |
57 | 57 | { |
58 | - return (string)print_r(self::$instance, true); |
|
58 | + return (string) print_r(self::$instance, true); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | public function __toString() |
37 | 37 | { |
38 | - return (string)$this->filteredString; |
|
38 | + return (string) $this->filteredString; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -43,7 +43,7 @@ |
||
43 | 43 | { |
44 | 44 | if (!isset($this->set->{$imageVariant})) { |
45 | 45 | throw new \Exception('Image variant `' . $imageVariant . '` does not exist. Existing variants are ' . implode(', ', |
46 | - array_keys((array)$this->set))); |
|
46 | + array_keys((array) $this->set))); |
|
47 | 47 | } |
48 | 48 | return Request::$subfolders . $this->imagePath . '/' . $this->set->{$imageVariant}; |
49 | 49 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function __construct($template = '', Request $request, $parameters = array(), $matchedSitemapItem) |
26 | 26 | { |
27 | - $this->parameters = (array)$matchedSitemapItem->parameters; |
|
27 | + $this->parameters = (array) $matchedSitemapItem->parameters; |
|
28 | 28 | $selfParameters = $this->getParametersForNameSpace('self'); |
29 | 29 | $this->parameters = array_merge($this->parameters, $selfParameters); |
30 | 30 | parent::__construct($template, $request, $this->parameters, $matchedSitemapItem); |
@@ -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 | } |
@@ -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); |
@@ -108,7 +108,7 @@ |
||
108 | 108 | $g = hexdec($bitmapBodyModel->body[$iPos + 2] . $bitmapBodyModel->body[$iPos + 3]); |
109 | 109 | $b = hexdec($bitmapBodyModel->body[$iPos] . $bitmapBodyModel->body[$iPos + 1]); |
110 | 110 | // Calculate and draw the pixel |
111 | - $color = imagecolorallocate($bitmapBodyModel->image, (int)$r, (int)$g, (int)$b); |
|
111 | + $color = imagecolorallocate($bitmapBodyModel->image, (int) $r, (int) $g, (int) $b); |
|
112 | 112 | imagesetpixel($bitmapBodyModel->image, $bitmapBodyModel->x, $bitmapBodyModel->height - $bitmapBodyModel->y, $color); |
113 | 113 | // Raise the horizontal position |
114 | 114 | $bitmapBodyModel->x++; |