Completed
Branch master (01736a)
by personal
03:20
created
src/Hal/Metrics/Complexity/Text/Length/Loc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@
 block discarded – undo
48 48
         $content = file_get_contents($filename);
49 49
 
50 50
         $cloc = $lloc = 0;
51
-        foreach($tokens as $token) {
51
+        foreach ($tokens as $token) {
52 52
 
53
-            switch($token->getType()) {
53
+            switch ($token->getType()) {
54 54
                 case T_STRING:
55
-                    if(';' == $token->getValue()) {
55
+                    if (';' == $token->getValue()) {
56 56
                         $lloc++;
57 57
                     }
58 58
                     break;
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 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,12 +40,12 @@
 block discarded – undo
40 40
     {
41 41
         $result = new Result;
42 42
         $result->setMaintainabilityIndexWithoutComment(max(
43
-             (171
43
+                (171
44 44
              - (5.2 * \log($rHalstead->getVolume()))
45 45
              - (0.23 * $rMcCabe->getCyclomaticComplexityNumber())
46 46
              - (16.2 * \log($rLoc->getLogicalLoc()))
47
-             ) * 100 / 171
48
-             ,0));
47
+                ) * 100 / 171
48
+                ,0));
49 49
 
50 50
 
51 51
         // comment weight
Please login to merge, or discard this 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/Mood/Abstractness/Abstractness.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,16 +28,16 @@
 block discarded – undo
28 28
 
29 29
         $ac = $cc = $abstractness = 0;
30 30
 
31
-        foreach($results as $result) {
31
+        foreach ($results as $result) {
32 32
             $rOOP = $result->getOOP();
33
-            if(is_object($rOOP)) {
33
+            if (is_object($rOOP)) {
34 34
                 $cc += sizeof($rOOP->getConcreteClasses(), COUNT_NORMAL);
35 35
                 $ac += sizeof($rOOP->getAbstractClasses(), COUNT_NORMAL);
36 36
             }
37 37
         }
38 38
 
39 39
         $result = new Result;
40
-        if($ac + $cc > 0) {
40
+        if ($ac + $cc > 0) {
41 41
             $abstractness = round($ac / ($ac + $cc), 2);
42 42
         }
43 43
         $result->setAbstractness($abstractness);
Please login to merge, or discard this patch.
src/Hal/Metrics/Mood/Instability/Instability.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,16 +28,16 @@
 block discarded – undo
28 28
 
29 29
         $ca = $ce = $i = 0;
30 30
 
31
-        foreach($results as $result) {
31
+        foreach ($results as $result) {
32 32
             $r = $result->getCoupling();
33
-            if(is_object($r)) {
33
+            if (is_object($r)) {
34 34
                 $ce += $r->getEfferentCoupling();
35 35
                 $ca += $r->getAfferentCoupling();
36 36
             }
37 37
         }
38 38
 
39 39
         $result = new Result;
40
-        if($ca + $ce > 0) {
40
+        if ($ca + $ce > 0) {
41 41
             $i = round($ce / ($ca + $ce), 2);
42 42
         }
43 43
         $result->setInstability($i);
Please login to merge, or discard this patch.