@@ -109,7 +109,7 @@ |
||
109 | 109 | |
110 | 110 | $params = str_replace(['+', '%7E'], ['%20', '~'], http_build_query($opt)); |
111 | 111 | |
112 | - return 'otpauth://totp/' . rawurlencode($this->label) . "?$params"; |
|
112 | + return 'otpauth://totp/'.rawurlencode($this->label)."?$params"; |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
@@ -75,7 +75,7 @@ |
||
75 | 75 | * @param string|null $role |
76 | 76 | * @return int|null |
77 | 77 | */ |
78 | - public function hasUserForRole(string $token, string $role = null) : ?int |
|
78 | + public function hasUserForRole(string $token, string $role = null) : ? int |
|
79 | 79 | { |
80 | 80 | $tokenData = $this->getToken($token); |
81 | 81 | if (empty($tokenData)) { |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | class CompilerPass implements CompilerPassInterface |
18 | 18 | { |
19 | 19 | |
20 | - const CACHE_FILE = ROOT . 'cache/translation_token'; |
|
20 | + const CACHE_FILE = ROOT.'cache/translation_token'; |
|
21 | 21 | const TAG = 'middleware'; |
22 | 22 | |
23 | 23 | use FileCacheTrait; |
@@ -93,15 +93,15 @@ discard block |
||
93 | 93 | { |
94 | 94 | ksort($tokens); |
95 | 95 | |
96 | - $contentPhp = sprintf("return [\n %s\n];\n", implode(",\n ", array_map(function (Token $token) { |
|
96 | + $contentPhp = sprintf("return [\n %s\n];\n", implode(",\n ", array_map(function(Token $token) { |
|
97 | 97 | return sprintf('_("%s")', addslashes($token->token)); |
98 | 98 | }, $tokens))); |
99 | 99 | |
100 | - $contentHtml = sprintf('%s', implode("\n", array_map(function (Token $token) { |
|
100 | + $contentHtml = sprintf('%s', implode("\n", array_map(function(Token $token) { |
|
101 | 101 | return sprintf('<span translate>%s</span>', addslashes($token->token)); |
102 | 102 | }, $tokens))); |
103 | 103 | |
104 | 104 | $this->dumpCacheFile(self::CACHE_FILE, $contentPhp); |
105 | - file_put_contents(self::CACHE_FILE . '.html', $contentHtml); |
|
105 | + file_put_contents(self::CACHE_FILE.'.html', $contentHtml); |
|
106 | 106 | } |
107 | 107 | } |
@@ -65,7 +65,7 @@ |
||
65 | 65 | $host = parse_url($url, PHP_URL_HOST) ?: $request->getHost(); |
66 | 66 | |
67 | 67 | if ($port) { |
68 | - $host .= ':' . $port; |
|
68 | + $host .= ':'.$port; |
|
69 | 69 | } |
70 | 70 | $connectSrc[] = $host; |
71 | 71 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public function addEvent(AbstractEvent $event, int $timestamp = 0) : Job |
61 | 61 | { |
62 | - $jobId = $this->generateUniqueId('jobid:' . $event->getEventName()); |
|
62 | + $jobId = $this->generateUniqueId('jobid:'.$event->getEventName()); |
|
63 | 63 | $jobId = sprintf('%s:%s', $event->getEventName(), $jobId); |
64 | 64 | |
65 | 65 | $job = new Job($event, $jobId, $timestamp); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $pipeline = $this->getRedis()->pipeline(['fire-and-forget' => true]); |
81 | 81 | if (empty($job->timestamp)) { |
82 | 82 | // immediate execution in background |
83 | - $pipeline->lpush(self::QUEUE_IMMEDIATE, $job->jobId . '#' . $serialized); |
|
83 | + $pipeline->lpush(self::QUEUE_IMMEDIATE, $job->jobId.'#'.$serialized); |
|
84 | 84 | } else { |
85 | 85 | // delayed execution |
86 | 86 | $pipeline->hset(self::META_DATA, $job->jobId, $serialized); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | $keys = []; |
122 | 122 | foreach ($resultRaw as $jobId => $timestamp) { |
123 | - if (empty($eventType) || strpos($jobId, $eventType . ':') === 0) { |
|
123 | + if (empty($eventType) || strpos($jobId, $eventType.':') === 0) { |
|
124 | 124 | $keys[$jobId] = $timestamp; |
125 | 125 | } |
126 | 126 | } |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $immediate = $this->getRedis()->lrange(self::QUEUE_IMMEDIATE, 0, 100); |
178 | 178 | foreach ($immediate as $rawJob) { |
179 | 179 | list($jobId, $rawJob) = explode('#', $rawJob, 2); |
180 | - if (empty($eventType) || strpos($jobId, $eventType . ':') === 0) { |
|
180 | + if (empty($eventType) || strpos($jobId, $eventType.':') === 0) { |
|
181 | 181 | /** @var Job $job */ |
182 | 182 | $job = unserialize(base64_decode($rawJob)); |
183 | 183 | yield $job->jobId => $job; |