Completed
Pull Request — master (#221)
by personal
04:09
created
src/Hal/Metrics/Complexity/Structural/CardAndAgresti/SystemComplexity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 
37 37
 
38 38
         $sy = $dc = $sc = array(); // in system
39
-        foreach($class->getMethods() as $method) {
39
+        foreach ($class->getMethods() as $method) {
40 40
             $fanout = sizeof($method->getDependencies(), COUNT_NORMAL);
41 41
             $v = sizeof($method->getArguments(), COUNT_NORMAL) + sizeof($method->getReturns(), COUNT_NORMAL);
42 42
 
Please login to merge, or discard this patch.
src/Hal/Metrics/Complexity/Text/Length/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
Hal/Metrics/Design/Component/MaintainabilityIndex/MaintainabilityIndex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 
50 50
 
51 51
         // comment weight
52
-        if($rLoc->getLoc() > 0) {
52
+        if ($rLoc->getLoc() > 0) {
53 53
             $CM = $rLoc->getCommentLoc() / $rLoc->getLoc();
54 54
             $result->setCommentWeight(
55 55
                 50 * sin(sqrt(2.4 * $CM))
Please login to merge, or discard this patch.
src/Hal/Metrics/Design/Component/MaintainabilityIndex/Result.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,10 +60,10 @@
 block discarded – undo
60 60
      */
61 61
     public function setMaintainabilityIndexWithoutComment($maintainabilityIndexWithoutComment)
62 62
     {
63
-        if(is_infinite($maintainabilityIndexWithoutComment)) {
63
+        if (is_infinite($maintainabilityIndexWithoutComment)) {
64 64
             $maintainabilityIndexWithoutComment = 171;
65 65
         }
66
-        $this->maintainabilityIndexWithoutComment = round($maintainabilityIndexWithoutComment,2);
66
+        $this->maintainabilityIndexWithoutComment = round($maintainabilityIndexWithoutComment, 2);
67 67
 
68 68
     }
69 69
     /**
Please login to merge, or discard this patch.
src/Hal/Metrics/Complexity/Component/McCabe/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
src/Hal/Metrics/Complexity/Component/Myer/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
src/Hal/Metrics/Complexity/Structural/LCOM/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
artifacts/phar/build.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Hal/Component/Token/Tokenizer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
         $code = preg_replace('!(\}|\)|;)\?!', '$1 ?', $code);
10 10
 
11 11
         // remove one line comments
12
-        $code = preg_replace('!((\/\/|#).*\n)!', Token::T_COMMENT . ' ', $code);
12
+        $code = preg_replace('!((\/\/|#).*\n)!', Token::T_COMMENT.' ', $code);
13 13
 
14 14
         // remove EOL
15 15
         $code = preg_replace('!(\s+)!', ' ', $code);
@@ -37,6 +37,6 @@  discard block
 block discarded – undo
37 37
         $code = preg_replace('!return;!i', Token::T_RETURN_VOID, $code);
38 38
 
39 39
         // split tokens
40
-        return preg_split('!\s|;|,|(\{|\}|\(|\))!', $code, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
40
+        return preg_split('!\s|;|,|(\{|\}|\(|\))!', $code, null, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY);
41 41
     }
42 42
 }
43 43
\ No newline at end of file
Please login to merge, or discard this patch.