@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public static function fromEMail($email) |
28 | 28 | { |
29 | - $userId = (int) sql_value("SELECT `user_id` FROM `user` WHERE `email`='&1'", 0, $email); |
|
29 | + $userId = (int)sql_value("SELECT `user_id` FROM `user` WHERE `email`='&1'", 0, $email); |
|
30 | 30 | if ($userId === 0) { |
31 | 31 | return null; |
32 | 32 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public static function fromUsername($username) |
43 | 43 | { |
44 | - $userId = (int) sql_value("SELECT `user_id` FROM `user` WHERE `username`='&1'", 0, $username); |
|
44 | + $userId = (int)sql_value("SELECT `user_id` FROM `user` WHERE `username`='&1'", 0, $username); |
|
45 | 45 | if ($userId === 0) { |
46 | 46 | return null; |
47 | 47 | } |
@@ -28,14 +28,14 @@ |
||
28 | 28 | [':wp' => $_REQUEST['wp']] |
29 | 29 | ); |
30 | 30 | } else { |
31 | - $cacheId = isset($_REQUEST['cacheid']) ? (int) $_REQUEST['cacheid'] : -1; |
|
31 | + $cacheId = isset($_REQUEST['cacheid']) ? (int)$_REQUEST['cacheid'] : -1; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | $showHistory = false; |
35 | 35 | $error = ''; |
36 | 36 | |
37 | 37 | if ($cacheId >= 0 && |
38 | - $connection->fetchColumn('SELECT COUNT(*) FROM `caches` WHERE `cache_id`=:id',[':id' => $cacheId]) <> 1) |
|
38 | + $connection->fetchColumn('SELECT COUNT(*) FROM `caches` WHERE `cache_id`=:id', [':id' => $cacheId]) <> 1) |
|
39 | 39 | { |
40 | 40 | $error = $translate->t('Cache not found', '', '', 0); |
41 | 41 | } elseif ($cacheId > 0) { |
@@ -66,16 +66,16 @@ discard block |
||
66 | 66 | // current cache and log-counters |
67 | 67 | $tpl->assign( |
68 | 68 | 'count_hiddens', |
69 | - number1000((int) $connection->fetchColumn('SELECT COUNT(*) AS `hiddens` FROM `caches` WHERE `status` = 1')) |
|
69 | + number1000((int)$connection->fetchColumn('SELECT COUNT(*) AS `hiddens` FROM `caches` WHERE `status` = 1')) |
|
70 | 70 | ); |
71 | 71 | $tpl->assign( |
72 | 72 | 'count_founds', |
73 | - number1000((int) $connection->fetchColumn('SELECT COUNT(*) AS `founds` FROM `cache_logs` WHERE `type` = 1')) |
|
73 | + number1000((int)$connection->fetchColumn('SELECT COUNT(*) AS `founds` FROM `cache_logs` WHERE `type` = 1')) |
|
74 | 74 | ); |
75 | 75 | $tpl->assign( |
76 | 76 | 'count_users', |
77 | 77 | number1000( |
78 | - (int) $connection->fetchColumn( |
|
78 | + (int)$connection->fetchColumn( |
|
79 | 79 | 'SELECT COUNT(*) AS `users` |
80 | 80 | FROM ( |
81 | 81 | SELECT DISTINCT `user_id` |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | // get total event count for all countries |
94 | 94 | $tpl->assign( |
95 | 95 | 'total_events', |
96 | - (int) $connection->fetchColumn( |
|
96 | + (int)$connection->fetchColumn( |
|
97 | 97 | 'SELECT COUNT(*) |
98 | 98 | FROM `caches` |
99 | 99 | WHERE `type` = 6 |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | { |
51 | 51 | $options = array_merge($this->defaultOptions, $options); |
52 | 52 | |
53 | - $childrenClass = (array) $item->getChildrenAttribute('class'); |
|
53 | + $childrenClass = (array)$item->getChildrenAttribute('class'); |
|
54 | 54 | |
55 | 55 | if ($options['listClass']) { |
56 | 56 | $childrenClass[] = $options['listClass']; |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | } |
143 | 143 | |
144 | 144 | // create an array than can be imploded as a class list |
145 | - $class = (array) $item->getAttribute('class'); |
|
145 | + $class = (array)$item->getAttribute('class'); |
|
146 | 146 | |
147 | 147 | if ($options['itemClass']) { |
148 | 148 | $class[] = $options['itemClass']; |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $html .= $this->renderLink($item, $options); |
184 | 184 | |
185 | 185 | // renders the embedded ul |
186 | - $childrenClass = (array) $item->getChildrenAttribute('class'); |
|
186 | + $childrenClass = (array)$item->getChildrenAttribute('class'); |
|
187 | 187 | if ($options['listClass']) { |
188 | 188 | $childrenClass[] = $options['listClass']; |
189 | 189 | } |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | |
230 | 230 | protected function renderLinkElement(ItemInterface $item, array $options) |
231 | 231 | { |
232 | - $childrenClass = (array) $item->getChildrenAttribute('class'); |
|
232 | + $childrenClass = (array)$item->getChildrenAttribute('class'); |
|
233 | 233 | |
234 | 234 | if ($options['linkClass']) { |
235 | 235 | $childrenClass[] = $options['linkClass']; |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | |
244 | 244 | protected function renderSpanElement(ItemInterface $item, array $options) |
245 | 245 | { |
246 | - $childrenClass = (array) $item->getChildrenAttribute('class'); |
|
246 | + $childrenClass = (array)$item->getChildrenAttribute('class'); |
|
247 | 247 | |
248 | 248 | if ($options['textClass']) { |
249 | 249 | $childrenClass[] = $options['textClass']; |
@@ -37,6 +37,6 @@ |
||
37 | 37 | { |
38 | 38 | $value = str_replace(',', '.', $value); |
39 | 39 | |
40 | - return (float) $value; |
|
40 | + return (float)$value; |
|
41 | 41 | } |
42 | 42 | } |
@@ -126,7 +126,7 @@ |
||
126 | 126 | $scss = new Compiler(); |
127 | 127 | $scss->setIgnoreErrors(true); |
128 | 128 | $scss->addImportPath($applicationScssPath); |
129 | - $scss->addImportPath(function ($path) use ($projectDir) { |
|
129 | + $scss->addImportPath(function($path) use ($projectDir) { |
|
130 | 130 | //Check for tilde as this refers to the node_modules dir |
131 | 131 | if (strpos($path, '~') === 0) { |
132 | 132 | $path = str_replace( |
@@ -7,15 +7,12 @@ |
||
7 | 7 | |
8 | 8 | use Exception; |
9 | 9 | use Leafo\ScssPhp\Compiler; |
10 | -use RecursiveDirectoryIterator; |
|
11 | -use RecursiveIteratorIterator; |
|
12 | 10 | use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; |
13 | 11 | use Symfony\Component\Console\Exception\InvalidArgumentException; |
14 | 12 | use Symfony\Component\Console\Input\InputInterface; |
15 | 13 | use Symfony\Component\Console\Output\OutputInterface; |
16 | 14 | use Symfony\Component\Filesystem\Filesystem; |
17 | 15 | use Symfony\Component\Finder\Finder; |
18 | -use Symfony\Component\Finder\SplFileInfo; |
|
19 | 16 | |
20 | 17 | /** |
21 | 18 | * Class CreateWebCacheCommand |
@@ -56,8 +56,8 @@ |
||
56 | 56 | $checkedElements = 0; |
57 | 57 | |
58 | 58 | foreach ($metrics as $metric) { |
59 | - $totalElements += (int) $metric['elements']; |
|
60 | - $checkedElements += (int) $metric['coveredelements']; |
|
59 | + $totalElements += (int)$metric['elements']; |
|
60 | + $checkedElements += (int)$metric['coveredelements']; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | $coverage = ($checkedElements / $totalElements) * 100; |
@@ -118,7 +118,7 @@ |
||
118 | 118 | */ |
119 | 119 | $expressionAst = (new ExpressionLanguage())->parse($violation->getPropertyPath(), [])->getNodes(); |
120 | 120 | |
121 | - $line = ((int) $expressionAst->nodes['node']->nodes[1]->attributes['value']) + 1; |
|
121 | + $line = ((int)$expressionAst->nodes['node']->nodes[1]->attributes['value']) + 1; |
|
122 | 122 | |
123 | 123 | $linePrefix = $this->translator->trans('field_notes.error.line_prefix', [ |
124 | 124 | '%line%' => $line, |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $databaseArray |
189 | 189 | ); |
190 | 190 | |
191 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
191 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
192 | 192 | |
193 | 193 | return $entity; |
194 | 194 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | ['id' => $entity->id] |
216 | 216 | ); |
217 | 217 | |
218 | - $entity->id = (int) $this->connection->lastInsertId(); |
|
218 | + $entity->id = (int)$this->connection->lastInsertId(); |
|
219 | 219 | |
220 | 220 | return $entity; |
221 | 221 | } |