@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | /** |
43 | 43 | * @return string |
44 | 44 | */ |
45 | - public function getOneTimeToken() : ?string |
|
45 | + public function getOneTimeToken() : ? string |
|
46 | 46 | { |
47 | 47 | return $this->oneTimeToken; |
48 | 48 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * @return string |
52 | 52 | */ |
53 | - public function getPassword() : ?string |
|
53 | + public function getPassword() : ? string |
|
54 | 54 | { |
55 | 55 | return $this->password; |
56 | 56 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | */ |
45 | 45 | public function generateRandomId(int $length = self::ID_LENGTH) : string |
46 | 46 | { |
47 | - $randomId = md5(microtime() . mt_rand()) . mt_rand(); |
|
47 | + $randomId = md5(microtime().mt_rand()).mt_rand(); |
|
48 | 48 | |
49 | 49 | return substr(base_convert($randomId, 10, 36), 0, $length); |
50 | 50 | } |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | { |
31 | 31 | $fileName = $this->getCacheFileName($name); |
32 | 32 | |
33 | - file_put_contents($fileName, "<?php \n//@codingStandardsIgnoreFile" . PHP_EOL . $content); |
|
33 | + file_put_contents($fileName, "<?php \n//@codingStandardsIgnoreFile".PHP_EOL.$content); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | protected function dumpVariableToCache(string $name, $variable) |
41 | 41 | { |
42 | - $this->dumpCacheFile($name, 'return ' . var_export($variable, true) . ';'); |
|
42 | + $this->dumpCacheFile($name, 'return '.var_export($variable, true).';'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -48,6 +48,6 @@ discard block |
||
48 | 48 | */ |
49 | 49 | private function getCacheFileName(string $name) : string |
50 | 50 | { |
51 | - return ROOT . 'cache/' . basename($name, '.php') . '.php'; |
|
51 | + return ROOT.'cache/'.basename($name, '.php').'.php'; |
|
52 | 52 | } |
53 | 53 | } |
@@ -38,15 +38,15 @@ discard block |
||
38 | 38 | protected function readAnnotations(ContainerBuilder $container) : void |
39 | 39 | { |
40 | 40 | $annotationLoader = new AnnotationLoader($container); |
41 | - $annotationLoader->load(ROOT . 'src'); |
|
41 | + $annotationLoader->load(ROOT.'src'); |
|
42 | 42 | |
43 | - if (!is_dir(ROOT . 'vendor/brainexe/')) { |
|
43 | + if (!is_dir(ROOT.'vendor/brainexe/')) { |
|
44 | 44 | return; |
45 | 45 | } |
46 | 46 | |
47 | 47 | $appFinder = new Finder(); |
48 | 48 | $appFinder->directories() |
49 | - ->in([ROOT . 'vendor/brainexe/']) |
|
49 | + ->in([ROOT.'vendor/brainexe/']) |
|
50 | 50 | ->depth('<=1') |
51 | 51 | ->name('src'); |
52 | 52 | |
@@ -62,8 +62,8 @@ discard block |
||
62 | 62 | protected function dumpContainer(ContainerBuilder $container) : void |
63 | 63 | { |
64 | 64 | $debug = $container->getParameter('debug'); |
65 | - $containerFile = ROOT . 'cache/dic.php'; |
|
66 | - $configFile = ROOT . 'cache/config.json'; |
|
65 | + $containerFile = ROOT.'cache/dic.php'; |
|
66 | + $configFile = ROOT.'cache/config.json'; |
|
67 | 67 | |
68 | 68 | $dumper = new PhpDumper($container); |
69 | 69 | $dumper->setProxyDumper(new ProxyDumper()); |
@@ -17,7 +17,7 @@ |
||
17 | 17 | * @param ReflectionClass $reflectionClass |
18 | 18 | * @param Service|CompilerPassAnnotation $annotation |
19 | 19 | * @param Definition $definition |
20 | - * @return array |
|
20 | + * @return Definition[] |
|
21 | 21 | * |
22 | 22 | * @throws Exception |
23 | 23 | */ |
@@ -23,8 +23,8 @@ |
||
23 | 23 | /** @var Glob $glob */ |
24 | 24 | $glob = $container->get(Glob::class); |
25 | 25 | |
26 | - $locales = $glob->execGlob(ROOT . 'lang/*.po'); |
|
27 | - $locales = array_map(function ($file) { |
|
26 | + $locales = $glob->execGlob(ROOT.'lang/*.po'); |
|
27 | + $locales = array_map(function($file) { |
|
28 | 28 | return basename($file, '.po'); |
29 | 29 | }, $locales); |
30 | 30 |
@@ -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 | /** |
@@ -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 | } |