@@ -47,7 +47,7 @@ |
||
47 | 47 | |
48 | 48 | public function execute(array $files) { |
49 | 49 | $fileCoupling = new FileLackOfCohesionOfMethods($this->classMap); |
50 | - foreach($files as $filename) { |
|
50 | + foreach ($files as $filename) { |
|
51 | 51 | $result = $fileCoupling->calculate($filename); |
52 | 52 | $this->collection->get($filename)->setLcom($result); |
53 | 53 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | |
48 | 48 | public function execute(array $files) { |
49 | 49 | $fileCoupling = new FileLackOfCohesionOfMethods($this->classMap); |
50 | - foreach($files as $filename) { |
|
50 | + foreach ($files as $filename) { |
|
51 | 51 | $result = $fileCoupling->calculate($filename); |
52 | 52 | $this->collection->get($filename)->setLcom($result); |
53 | 53 | } |
@@ -49,7 +49,7 @@ |
||
49 | 49 | * @inheritdoc |
50 | 50 | */ |
51 | 51 | public function asArray() { |
52 | - return array ( |
|
52 | + return array( |
|
53 | 53 | 'loc' => $this->getLoc() |
54 | 54 | ,'logicalLoc' => $this->getLogicalLoc() |
55 | 55 | ); |
@@ -49,7 +49,7 @@ |
||
49 | 49 | * @inheritdoc |
50 | 50 | */ |
51 | 51 | public function asArray() { |
52 | - return array ( |
|
52 | + return array( |
|
53 | 53 | 'loc' => $this->getLoc() |
54 | 54 | ,'logicalLoc' => $this->getLogicalLoc() |
55 | 55 | ); |
@@ -49,7 +49,7 @@ |
||
49 | 49 | * @inheritdoc |
50 | 50 | */ |
51 | 51 | public function asArray() { |
52 | - return array ( |
|
52 | + return array( |
|
53 | 53 | 'loc' => $this->getLoc() |
54 | 54 | ,'logicalLoc' => $this->getLogicalLoc() |
55 | 55 | ); |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | chdir(__DIR__); |
3 | 3 | |
4 | 4 | if (!file_exists('vendor/autoload.php')) { |
5 | - echo '[ERROR] It\'s required to run "composer install" before building PhpMetrics!' . PHP_EOL; |
|
5 | + echo '[ERROR] It\'s required to run "composer install" before building PhpMetrics!'.PHP_EOL; |
|
6 | 6 | exit(1); |
7 | 7 | } |
8 | 8 | |
@@ -18,8 +18,8 @@ discard block |
||
18 | 18 | |
19 | 19 | $files = array_merge(rglob('*.php'), rglob('*.twig'), rglob('*.json'), rglob('*.pp')); |
20 | 20 | $exclude = '!(.git)|(.svn)|(bin)|(tests)|(Tests)|(phpmetrics)!'; |
21 | -foreach($files as $file) { |
|
22 | - if(preg_match($exclude, $file)) continue; |
|
21 | +foreach ($files as $file) { |
|
22 | + if (preg_match($exclude, $file)) continue; |
|
23 | 23 | $path = str_replace(__DIR__.'/', '', $file); |
24 | 24 | $phar->addFromString($path, file_get_contents($file)); |
25 | 25 | } |
@@ -50,10 +50,10 @@ discard block |
||
50 | 50 | |
51 | 51 | chmod($filename, 0755); |
52 | 52 | |
53 | -function rglob($pattern='*', $flags = 0, $path='') |
|
53 | +function rglob($pattern = '*', $flags = 0, $path = '') |
|
54 | 54 | { |
55 | - $paths=glob($path.'*', GLOB_MARK|GLOB_ONLYDIR|GLOB_NOSORT); |
|
56 | - $files=glob($path.$pattern, $flags); |
|
57 | - foreach ($paths as $path) { $files=array_merge($files,rglob($pattern, $flags, $path)); } |
|
55 | + $paths = glob($path.'*', GLOB_MARK|GLOB_ONLYDIR|GLOB_NOSORT); |
|
56 | + $files = glob($path.$pattern, $flags); |
|
57 | + foreach ($paths as $path) { $files = array_merge($files, rglob($pattern, $flags, $path)); } |
|
58 | 58 | return $files; |
59 | 59 | } |
60 | 60 | \ No newline at end of file |