@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | class CompilerPass implements CompilerPassInterface |
| 16 | 16 | { |
| 17 | 17 | |
| 18 | - const CACHE_FILE = ROOT . 'cache/translation_token'; |
|
| 18 | + const CACHE_FILE = ROOT.'cache/translation_token'; |
|
| 19 | 19 | |
| 20 | 20 | use FileCacheTrait; |
| 21 | 21 | |
@@ -55,16 +55,16 @@ discard block |
||
| 55 | 55 | { |
| 56 | 56 | sort($tokens); |
| 57 | 57 | |
| 58 | - $contentPhp = sprintf("return [\n %s\n];\n", implode(",\n ", array_map(function ($token) { |
|
| 58 | + $contentPhp = sprintf("return [\n %s\n];\n", implode(",\n ", array_map(function($token) { |
|
| 59 | 59 | return sprintf('_("%s")', addslashes($token)); |
| 60 | 60 | }, $tokens))); |
| 61 | 61 | |
| 62 | - $contentHtml = sprintf("%s", implode("\n", array_map(function ($token) { |
|
| 62 | + $contentHtml = sprintf("%s", implode("\n", array_map(function($token) { |
|
| 63 | 63 | return sprintf('<span translate>%s</span>', addslashes($token)); |
| 64 | 64 | }, $tokens))); |
| 65 | 65 | |
| 66 | 66 | $this->dumpCacheFile(self::CACHE_FILE, $contentPhp); |
| 67 | - file_put_contents(self::CACHE_FILE . '.html', $contentHtml); |
|
| 68 | - chmod(self::CACHE_FILE . '.html', 0777); |
|
| 67 | + file_put_contents(self::CACHE_FILE.'.html', $contentHtml); |
|
| 68 | + chmod(self::CACHE_FILE.'.html', 0777); |
|
| 69 | 69 | } |
| 70 | 70 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | public function addEvent(AbstractEvent $event, int $timestamp = 0) |
| 63 | 63 | { |
| 64 | - $jobId = $this->generateUniqueId('jobid:' . $event->eventName); |
|
| 64 | + $jobId = $this->generateUniqueId('jobid:'.$event->eventName); |
|
| 65 | 65 | $jobId = sprintf('%s:%s', $event->eventName, $jobId); |
| 66 | 66 | |
| 67 | 67 | $job = new Job($event, $jobId, $timestamp); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $pipeline = $this->getRedis()->pipeline(['fire-and-forget' => true]); |
| 80 | 80 | if (empty($job->timestamp)) { |
| 81 | 81 | // immediate execution in background |
| 82 | - $pipeline->lpush(self::QUEUE_IMMEDIATE, $job->jobId . '#' . $serialized); |
|
| 82 | + $pipeline->lpush(self::QUEUE_IMMEDIATE, $job->jobId.'#'.$serialized); |
|
| 83 | 83 | } else { |
| 84 | 84 | // delayed execution |
| 85 | 85 | $pipeline->hset(self::META_DATA, $job->jobId, $serialized); |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | |
| 120 | 120 | $keys = []; |
| 121 | 121 | foreach ($resultRaw as $jobId => $timestamp) { |
| 122 | - if (empty($eventType) || strpos($jobId, $eventType . ":") === 0) { |
|
| 122 | + if (empty($eventType) || strpos($jobId, $eventType.":") === 0) { |
|
| 123 | 123 | $keys[$jobId] = $timestamp; |
| 124 | 124 | } |
| 125 | 125 | } |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | $immediate = $this->getRedis()->lrange(self::QUEUE_IMMEDIATE, 0, 100); |
| 177 | 177 | foreach ($immediate as $rawJob) { |
| 178 | 178 | list($jobId, $rawJob) = explode('#', $rawJob, 2); |
| 179 | - if (empty($eventType) || strpos($jobId, $eventType . ":") === 0) { |
|
| 179 | + if (empty($eventType) || strpos($jobId, $eventType.":") === 0) { |
|
| 180 | 180 | /** @var Job $job */ |
| 181 | 181 | $job = unserialize(base64_decode($rawJob)); |
| 182 | 182 | yield $job->jobId => $job; |
@@ -50,11 +50,11 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | $appFinder = new Finder(); |
| 52 | 52 | $appFinder->directories() |
| 53 | - ->in([ROOT . 'vendor/brainexe/']) |
|
| 53 | + ->in([ROOT.'vendor/brainexe/']) |
|
| 54 | 54 | ->depth("<=1") |
| 55 | 55 | ->name('src'); |
| 56 | 56 | |
| 57 | - $annotationLoader->load(ROOT . 'src/'); |
|
| 57 | + $annotationLoader->load(ROOT.'src/'); |
|
| 58 | 58 | |
| 59 | 59 | foreach ($appFinder as $dir) { |
| 60 | 60 | /** @var SplFileInfo $dir */ |
@@ -70,9 +70,9 @@ discard block |
||
| 70 | 70 | $debug = $container->getParameter('debug'); |
| 71 | 71 | $randomId = mt_rand(); |
| 72 | 72 | $className = sprintf('dic_%d', $randomId); |
| 73 | - $containerFile = ROOT . 'cache/dic.php'; |
|
| 74 | - $versionFile = ROOT . 'cache/dic.txt'; |
|
| 75 | - $configFile = ROOT . 'cache/config.json'; |
|
| 73 | + $containerFile = ROOT.'cache/dic.php'; |
|
| 74 | + $versionFile = ROOT.'cache/dic.txt'; |
|
| 75 | + $configFile = ROOT.'cache/config.json'; |
|
| 76 | 76 | |
| 77 | 77 | $dumper = new PhpDumper($container); |
| 78 | 78 | $dumper->setProxyDumper(new ProxyDumper()); |