@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | self::$values = []; |
38 | 38 | self::$sha = sha1_file($filename); |
39 | 39 | |
40 | - $mapFile = self::getCacheDir(). DIRECTORY_SEPARATOR .self::$sha.'.php'; |
|
40 | + $mapFile = self::getCacheDir() . DIRECTORY_SEPARATOR . self::$sha . '.php'; |
|
41 | 41 | |
42 | 42 | if (false === file_exists($mapFile)) { |
43 | 43 | if (false === is_dir(self::getCacheDir())) { |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | */ |
72 | 72 | private static function getCacheDir() |
73 | 73 | { |
74 | - return (!empty(self::$cacheDir)) ? self::$cacheDir : __DIR__.'/../_cache'; |
|
74 | + return (!empty(self::$cacheDir)) ? self::$cacheDir : __DIR__ . '/../_cache'; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | protected function execute(InputInterface $input, OutputInterface $output) |
26 | 26 | { |
27 | - $cacheDir = !empty($input->getArgument('cache_dir')) ? $input->getArgument('cache_dir') : __DIR__.'/../../_cache'; |
|
27 | + $cacheDir = !empty($input->getArgument('cache_dir')) ? $input->getArgument('cache_dir') : __DIR__ . '/../../_cache'; |
|
28 | 28 | |
29 | 29 | if (false === is_dir($cacheDir)) { |
30 | 30 | throw new \InvalidArgumentException($cacheDir . ' is not a valid dir'); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $array = include($filePath); |
40 | 40 | |
41 | 41 | foreach ($array as $id => $entry) { |
42 | - apcu_delete(md5(sha1_file($filePath). DIRECTORY_SEPARATOR .$id)); |
|
42 | + apcu_delete(md5(sha1_file($filePath) . DIRECTORY_SEPARATOR . $id)); |
|
43 | 43 | } |
44 | 44 | } |
45 | 45 |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | ini_set('display_startup_errors', 1); |
7 | 7 | error_reporting(E_ALL); |
8 | 8 | |
9 | -include __DIR__.'/../vendor/autoload.php'; |
|
9 | +include __DIR__ . '/../vendor/autoload.php'; |
|
10 | 10 | |
11 | 11 | $config = __DIR__ . '/../config/yaml/config.yaml'; |
12 | 12 | DIC::initFromFile($config); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | $start = microtime(true); |
17 | 17 | $memoryUsage = memory_get_usage(); |
18 | -for ($i=0;$i<$max;$i++) { |
|
18 | +for ($i = 0; $i < $max; $i++) { |
|
19 | 19 | DIC::get('acme-calculator'); |
20 | 20 | } |
21 | 21 | |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | echo PHP_EOL; |
27 | 27 | echo '----------------------------------'; |
28 | 28 | echo PHP_EOL; |
29 | -echo 'LOOPING '.$max.' ITEMS'; |
|
29 | +echo 'LOOPING ' . $max . ' ITEMS'; |
|
30 | 30 | echo PHP_EOL; |
31 | 31 | echo '----------------------------------'; |
32 | 32 | echo PHP_EOL; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | echo PHP_EOL; |
35 | 35 | echo '----------------------------------'; |
36 | 36 | echo PHP_EOL; |
37 | -echo 'MEMORY USAGE: '. (memory_get_usage() - $memoryUsage); |
|
37 | +echo 'MEMORY USAGE: ' . (memory_get_usage() - $memoryUsage); |
|
38 | 38 | echo PHP_EOL; |
39 | 39 | echo '----------------------------------'; |
40 | 40 | echo PHP_EOL; |