Passed
Branch master (1b390a)
by Nicolas
05:25
created
lib/Solidifier/ConfigurationHandler.php 4 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -117,6 +117,9 @@
 block discarded – undo
117 117
         return $this->addVisitors($analyzer, $this->visitors, 'analyze');
118 118
     }
119 119
     
120
+    /**
121
+     * @param string $traverse
122
+     */
120 123
     private function addVisitors(VisitableAnalyzer $analyzer, array $visitors, $traverse)
121 124
     {
122 125
         foreach($visitors as $key => $closure)
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
                     }            
104 104
                 }
105 105
                 
106
-               return $visitor;
106
+                return $visitor;
107 107
             },
108 108
             
109 109
             'dependency.interfaceSegregation' => function(array $config) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
                 $config = $this->configuration[$key];
128 128
             }
129 129
             
130
-            if(! isset($config['enabled']) || $config['enabled'] === true)
130
+            if( ! isset($config['enabled']) || $config['enabled'] === true)
131 131
             {
132 132
                 $analyzer->addVisitor($traverse, $closure($config));
133 133
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     }
46 46
     
47 47
     private function initializeVisitors()
48
-    {        
48
+    {
49 49
         $this->visitors = array(
50 50
                         
51 51
             'property.public' => function(array $config) {
Please login to merge, or discard this patch.
lib/Solidifier/Defects/DependencyUponImplementation.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -12,6 +12,9 @@
 block discarded – undo
12 12
         $parameterType,
13 13
         $method;
14 14
     
15
+    /**
16
+     * @param string $parameterTypeName
17
+     */
15 18
     public function __construct(Node $node, $parameterTypeName, $parameterType, $method)
16 19
     {
17 20
         parent::__construct($node);
Please login to merge, or discard this patch.
lib/Solidifier/Defects/PublicClass.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -3,9 +3,6 @@
 block discarded – undo
3 3
 namespace Solidifier\Defects;
4 4
 
5 5
 use Solidifier\Defect;
6
-use Solidifier\Visitors\ObjectType;
7
-use PhpParser\Node\Stmt\Property;
8
-use PhpParser\Node\Stmt\Class_;
9 6
 
10 7
 class PublicClass extends Defect
11 8
 {
Please login to merge, or discard this patch.
lib/Solidifier/Visitors/DependencyInjection/StrongCoupling.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -86,6 +86,9 @@
 block discarded – undo
86 86
         return $allowed;
87 87
     }
88 88
     
89
+    /**
90
+     * @return string
91
+     */
89 92
     private function extractClassNameFromFullName($classFullname)
90 93
     {
91 94
         $classname = $classFullname;
Please login to merge, or discard this patch.
lib/Solidifier/Analyzers/Analyzer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     
34 34
     public function addVisitor($traverseName, Visitor $visitor)
35 35
     {
36
-        if(! isset($this->nodeTraversers[$traverseName]))
36
+        if( ! isset($this->nodeTraversers[$traverseName]))
37 37
         {
38 38
             throw new \RuntimeException("$traverseName is not a valid traverse step");
39 39
         }
Please login to merge, or discard this patch.
lib/Solidifier/Analyzers/FakeAnalyzer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     
18 18
     public function addVisitor($traverseName, Visitor $visitor)
19 19
     {
20
-        if(! isset($this->visitors[$traverseName]))
20
+        if( ! isset($this->visitors[$traverseName]))
21 21
         {
22 22
             $this->visitors[$traverseName] = array();
23 23
         }
Please login to merge, or discard this patch.
lib/Solidifier/Reporters/HTMLReporter.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         $prettyPrint = new Standard();
22 22
         
23 23
         $this->content = $this->twig->render(
24
-           'report.html.twig',
24
+            'report.html.twig',
25 25
             array(
26 26
                 'project' => 'Solidifier',
27 27
                 'defects' => $this->sortDefectsByNamespace($defects),
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         {
41 41
             $namespace = implode('/', explode('/', $file, -1));
42 42
             
43
-            if(! isset($result[$namespace]))
43
+            if( ! isset($result[$namespace]))
44 44
             {
45 45
                 $result[$namespace] = array();
46 46
             }
Please login to merge, or discard this patch.
lib/Solidifier/Visitors/Encapsulation/EncapsulationViolation.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
             {
53 53
                 $correspondingAttribute = strtolower(substr($methodName, 3));
54 54
                 
55
-                if(! isset($this->publicMethods[$correspondingAttribute]))
55
+                if( ! isset($this->publicMethods[$correspondingAttribute]))
56 56
                 {
57 57
                     $this->publicMethods[$correspondingAttribute] = array();
58 58
                 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@
 block discarded – undo
20 20
         {
21 21
             $this->privateAttributes = array();
22 22
             $this->publicMethods = array();
23
-        } 
23
+        }
24 24
         elseif($node instanceof Property)
25 25
         {
26 26
             $this->enterProperty($node);
27
-        } 
27
+        }
28 28
         elseif($node instanceof ClassMethod)
29 29
         {
30 30
             $this->enterClassMethod($node);
Please login to merge, or discard this patch.
lib/Solidifier/Visitors/Encapsulation/PublicClass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
             {
84 84
                 $nbPublicMethods = count(array_filter($this->methods));
85 85
                 
86
-                if(((float)$nbPublicMethods / (float)$nbMethods) >= $this->threshold)
86
+                if(((float) $nbPublicMethods / (float) $nbMethods) >= $this->threshold)
87 87
                 {
88 88
                     $this->dispatch(new \Solidifier\Defects\PublicClass($node));
89 89
                 }
Please login to merge, or discard this patch.