@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Portiny\Doctrine\Cache; |
4 | 4 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | } |
71 | 71 | } |
72 | 72 | |
73 | - if (! empty($data)) { |
|
73 | + if ( ! empty($data)) { |
|
74 | 74 | $m = Strings::match($id, '#(?P<class>[^@$[\].]+)(?:\$(?P<prop>[^@$[\].]+))?\@\[Annot\]#i'); |
75 | 75 | if ($m !== null && class_exists($m['class'])) { |
76 | 76 | $files[] = self::getClassFilename($m['class']); |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Portiny\Doctrine\Cache; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Portiny\Doctrine\Behaviour; |
4 | 4 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Portiny\Doctrine\Adapter\Nette\Tracy; |
4 | 4 | |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | */ |
180 | 180 | public function bindToBar(): void |
181 | 181 | { |
182 | - if (! $this->isTracyEnabled()) { |
|
182 | + if ( ! $this->isTracyEnabled()) { |
|
183 | 183 | return; |
184 | 184 | } |
185 | 185 | |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | { |
208 | 208 | uasort( |
209 | 209 | $queries, |
210 | - function ($a, $b) use ($key) { |
|
210 | + function($a, $b) use ($key) { |
|
211 | 211 | if ($a[$key] === $b[$key]) { |
212 | 212 | return 0; |
213 | 213 | } |
@@ -264,23 +264,23 @@ discard block |
||
264 | 264 | } |
265 | 265 | |
266 | 266 | $config = $this->entityManager->getConfiguration(); |
267 | - if (! $config->isSecondLevelCacheEnabled()) { |
|
267 | + if ( ! $config->isSecondLevelCacheEnabled()) { |
|
268 | 268 | return ''; |
269 | 269 | } |
270 | 270 | |
271 | 271 | $cacheConfiguration = $config->getSecondLevelCacheConfiguration(); |
272 | - if (! $cacheConfiguration) { |
|
272 | + if ( ! $cacheConfiguration) { |
|
273 | 273 | return ''; |
274 | 274 | } |
275 | 275 | |
276 | 276 | $cacheLogger = $cacheConfiguration->getCacheLogger(); |
277 | - if (! $cacheLogger instanceof CacheLoggerChain) { |
|
277 | + if ( ! $cacheLogger instanceof CacheLoggerChain) { |
|
278 | 278 | return ''; |
279 | 279 | } |
280 | 280 | |
281 | 281 | /** @var StatisticsCacheLogger|null $statistics */ |
282 | 282 | $statistics = $cacheLogger->getLogger('statistics'); |
283 | - if (! $statistics) { |
|
283 | + if ( ! $statistics) { |
|
284 | 284 | return ''; |
285 | 285 | } |
286 | 286 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Portiny\Doctrine\Adapter\Nette\Tracy; |
4 | 4 | |
@@ -28,14 +28,14 @@ discard block |
||
28 | 28 | $sql = (string) preg_replace('#([ \t]*\r?\n){2,}#', "\n", $sql); |
29 | 29 | // syntax highlight |
30 | 30 | $sql = htmlspecialchars($sql, ENT_IGNORE, 'UTF-8'); |
31 | - $closure = function ($matches) { |
|
32 | - if (! empty($matches[1])) { // comment |
|
31 | + $closure = function($matches) { |
|
32 | + if ( ! empty($matches[1])) { // comment |
|
33 | 33 | return '<em style="color:gray">' . $matches[1] . '</em>'; |
34 | - } elseif (! empty($matches[2])) { // error |
|
34 | + } elseif ( ! empty($matches[2])) { // error |
|
35 | 35 | return '<strong style="color:red">' . $matches[2] . '</strong>'; |
36 | - } elseif (! empty($matches[3])) { // most important keywords |
|
36 | + } elseif ( ! empty($matches[3])) { // most important keywords |
|
37 | 37 | return '<strong style="color:blue">' . $matches[3] . '</strong>'; |
38 | - } elseif (! empty($matches[4])) { // other keywords |
|
38 | + } elseif ( ! empty($matches[4])) { // other keywords |
|
39 | 39 | return '<strong style="color:green">' . $matches[4] . '</strong>'; |
40 | 40 | } |
41 | 41 | }; |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | ); |
48 | 48 | |
49 | 49 | // parameters |
50 | - $sql = (string) preg_replace_callback('#\?#', function () use ($params, $connection) { |
|
50 | + $sql = (string) preg_replace_callback('#\?#', function() use ($params, $connection) { |
|
51 | 51 | static $i = 0; |
52 | - if (! isset($params[$i])) { |
|
52 | + if ( ! isset($params[$i])) { |
|
53 | 53 | return '?'; |
54 | 54 | } |
55 | 55 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Portiny\Doctrine\Tests\Source; |
4 | 4 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | return $value->format($platform->getDateTimeFormatString()); |
64 | 64 | } |
65 | 65 | |
66 | - if (! is_scalar($value)) { |
|
66 | + if ( ! is_scalar($value)) { |
|
67 | 67 | $value = sprintf('of type %s', gettype($value)); |
68 | 68 | } |
69 | 69 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Portiny\Doctrine\Tests\Source; |
4 | 4 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | return null; |
41 | 41 | } |
42 | 42 | |
43 | - if (! $value instanceof Interval) { |
|
43 | + if ( ! $value instanceof Interval) { |
|
44 | 44 | throw new InvalidArgumentException('Interval value must be instance of DateInterval'); |
45 | 45 | } |
46 | 46 | |
@@ -92,27 +92,27 @@ discard block |
||
92 | 92 | |
93 | 93 | $interval = new Interval('PT0S'); |
94 | 94 | |
95 | - if (! empty($matches['y'])) { |
|
95 | + if ( ! empty($matches['y'])) { |
|
96 | 96 | $interval->y = intval($matches['y']); |
97 | 97 | } |
98 | 98 | |
99 | - if (! empty($matches['m'])) { |
|
99 | + if ( ! empty($matches['m'])) { |
|
100 | 100 | $interval->m = intval($matches['m']); |
101 | 101 | } |
102 | 102 | |
103 | - if (! empty($matches['d'])) { |
|
103 | + if ( ! empty($matches['d'])) { |
|
104 | 104 | $interval->d = intval($matches['d']); |
105 | 105 | } |
106 | 106 | |
107 | - if (! empty($matches['h'])) { |
|
107 | + if ( ! empty($matches['h'])) { |
|
108 | 108 | $interval->h = intval($matches['h']); |
109 | 109 | } |
110 | 110 | |
111 | - if (! empty($matches['i'])) { |
|
111 | + if ( ! empty($matches['i'])) { |
|
112 | 112 | $interval->i = intval($matches['i']); |
113 | 113 | } |
114 | 114 | |
115 | - if (! empty($matches['s'])) { |
|
115 | + if ( ! empty($matches['s'])) { |
|
116 | 116 | $interval->s = intval($matches['s']); |
117 | 117 | } |
118 | 118 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Portiny\Doctrine\Tests\Source; |
4 | 4 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Portiny\Doctrine\Tests; |
4 | 4 | |
@@ -13,11 +13,11 @@ discard block |
||
13 | 13 | { |
14 | 14 | $tempDir = __DIR__ . '/temp/' . getmypid(); |
15 | 15 | |
16 | - if (! file_exists($tempDir . '/log')) { |
|
16 | + if ( ! file_exists($tempDir . '/log')) { |
|
17 | 17 | mkdir($tempDir . '/log', 0777, true); |
18 | 18 | } |
19 | 19 | |
20 | - register_shutdown_function(function (): void { |
|
20 | + register_shutdown_function(function(): void { |
|
21 | 21 | FileSystem::delete(__DIR__ . '/temp'); |
22 | 22 | }); |
23 | 23 |