Completed
Push — master ( b7052b...e758c6 )
by Luis
05:32 queued 02:56
created
src/exceptions/processor/option.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
               : ( ( $type === self::UNKNOWN )
18 18
                 ? ( 'existent' )
19 19
                 : ( 'writable')
20
-              ) 
20
+                ) 
21 21
             . ' in this context.'
22 22
         );
23 23
     }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,17 +6,17 @@
 block discarded – undo
6 6
     const WRITE = 2;
7 7
     const UNKNOWN = 3;
8 8
     
9
-    public function __construct( $key, $type ) 
9
+    public function __construct($key, $type) 
10 10
     {
11 11
         parent::__construct( 
12 12
             'The option "' 
13 13
             . $key 
14 14
             . '" is not '
15
-            . ( $type === self::READ ) 
16
-              ? ( 'readable' )
17
-              : ( ( $type === self::UNKNOWN )
18
-                ? ( 'existent' )
19
-                : ( 'writable')
15
+            . ($type === self::READ) 
16
+              ? ('readable')
17
+              : (($type === self::UNKNOWN)
18
+                ? ('existent')
19
+                : ('writable')
20 20
               ) 
21 21
             . ' in this context.'
22 22
         );
Please login to merge, or discard this patch.
src/exceptions/processor/notFound.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 class plProcessorNotFoundException extends Exception
4 4
 {
5
-    public function __construct( $processor ) 
5
+    public function __construct($processor) 
6 6
     {
7
-        parent::__construct( 'The needed processor class "' . $processor . '" could not be found.' );
7
+        parent::__construct('The needed processor class "' . $processor . '" could not be found.');
8 8
     }
9 9
 }
10 10
 
Please login to merge, or discard this patch.
src/interfaces/processor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2,12 +2,12 @@  discard block
 block discarded – undo
2 2
 
3 3
 abstract class plProcessor
4 4
 {
5
-    public static function factory( $processor )
5
+    public static function factory($processor)
6 6
     {
7
-        $classname = 'pl' . ucfirst( $processor ) . 'Processor';
8
-        if ( class_exists( $classname ) === false )
7
+        $classname = 'pl' . ucfirst($processor) . 'Processor';
8
+        if (class_exists($classname) === false)
9 9
         {
10
-            throw new plProcessorNotFoundException( $processor );
10
+            throw new plProcessorNotFoundException($processor);
11 11
         }
12 12
         return new $classname();
13 13
     }
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
23 23
         return $processors;
24 24
     }
25 25
 
26
-    public function writeToDisk( $input, $output )
26
+    public function writeToDisk($input, $output)
27 27
     {
28
-        file_put_contents( $output, $input );
28
+        file_put_contents($output, $input);
29 29
     }
30 30
 
31 31
     abstract public function getInputTypes();
32 32
     abstract public function getOutputType();
33
-    abstract public function process( $input, $type );
33
+    abstract public function process($input, $type);
34 34
 
35 35
 }
Please login to merge, or discard this patch.
src/Graphviz/Digraph.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 
63 63
     private function elementsToDotLanguage(): string
64 64
     {
65
-        $dotFormat = array_map(function (HasDotRepresentation $element) {
65
+        $dotFormat = array_map(function(HasDotRepresentation $element) {
66 66
             return $element->toDotLanguage();
67 67
         }, $this->dotElements);
68 68
 
Please login to merge, or discard this patch.
src/classes/processor/graphviz.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     public function __construct(Digraph $digraph = null)
19 19
     {
20 20
         $this->options = new plGraphvizProcessorOptions();
21
-        $labelBuilder =  new NodeLabelBuilder(new TemplateEngine(
21
+        $labelBuilder = new NodeLabelBuilder(new TemplateEngine(
22 22
             new FileSystem(__DIR__ . '/../../Graphviz/templates')
23 23
         ), new HtmlLabelStyle());
24 24
         $classElements = new ClassGraphElements($this->options->createAssociations, $labelBuilder);
Please login to merge, or discard this patch.
src/Code/ClassDefinition.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     public function hasConstructor(): bool
47 47
     {
48
-        return \count(array_filter($this->functions, function (Method $function) {
48
+        return \count(array_filter($this->functions, function(Method $function) {
49 49
             return $function->isConstructor();
50 50
         })) === 1;
51 51
     }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             return [];
58 58
         }
59 59
 
60
-        $constructors = array_filter($this->functions, function (Method $function) {
60
+        $constructors = array_filter($this->functions, function(Method $function) {
61 61
             return $function->isConstructor();
62 62
         });
63 63
 
Please login to merge, or discard this patch.
src/classes/processor/statistics.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
     public function __construct()
12 12
     {
13
-        $this->options   = new plProcessorOptions();
13
+        $this->options = new plProcessorOptions();
14 14
         $this->information = array();
15 15
     }
16 16
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         return 'text/plain';
27 27
     }
28 28
 
29
-    public function process( $input, $type )
29
+    public function process($input, $type)
30 30
     {
31 31
         // Initialize the values
32 32
         $this->information['interfaceCount']           = 0;
@@ -42,38 +42,38 @@  discard block
 block discarded – undo
42 42
         $this->information['privateTypedAttributes']   = 0;
43 43
 
44 44
         // Loop through the classes and interfaces
45
-        foreach ( $input->definitions() as $definition )
45
+        foreach ($input->definitions() as $definition)
46 46
         {
47
-            if ( $definition instanceof InterfaceDefinition )
47
+            if ($definition instanceof InterfaceDefinition)
48 48
             {
49 49
                 $this->information['interfaceCount']++;
50 50
             }
51 51
 
52
-            if ( $definition instanceof ClassDefinition )
52
+            if ($definition instanceof ClassDefinition)
53 53
             {
54 54
                 $this->information['classCount']++;
55 55
 
56
-                foreach( $definition->attributes as $attribute )
56
+                foreach ($definition->attributes as $attribute)
57 57
                 {
58
-                    switch ( $attribute->modifier )
58
+                    switch ($attribute->modifier)
59 59
                     {
60 60
                         case 'public':
61 61
                             $this->information['publicAttributeCount']++;
62
-                            if ( $attribute->type->isPresent() )
62
+                            if ($attribute->type->isPresent())
63 63
                             {
64 64
                                 $this->information['publicTypedAttributes']++;
65 65
                             }
66 66
                         break;
67 67
                         case 'protected':
68 68
                             $this->information['protectedAttributeCount']++;
69
-                            if ( $attribute->type->isPresent() )
69
+                            if ($attribute->type->isPresent())
70 70
                             {
71 71
                                 $this->information['protectedTypedAttributes']++;
72 72
                             }
73 73
                         break;
74 74
                         case 'private':
75 75
                             $this->information['privateAttributeCount']++;
76
-                            if ( $attribute->type->isPresent() )
76
+                            if ($attribute->type->isPresent())
77 77
                             {
78 78
                                 $this->information['privateTypedAttributes']++;
79 79
                             }
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
                 }
83 83
             }
84 84
 
85
-            foreach( $definition->functions as $function )
85
+            foreach ($definition->functions as $function)
86 86
             {
87
-                switch ( $function->modifier )
87
+                switch ($function->modifier)
88 88
                 {
89 89
                     case 'public':
90 90
                         $this->information['publicFunctionCount']++;
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
         $this->information['functionCount']       = $this->information['publicFunctionCount'] + $this->information['protectedFunctionCount'] + $this->information['privateFunctionCount'];
103 103
         $this->information['attributeCount']      = $this->information['publicAttributeCount'] + $this->information['protectedAttributeCount'] + $this->information['privateAttributeCount'];
104 104
         $this->information['typedAttributeCount'] = $this->information['publicTypedAttributes'] + $this->information['protectedTypedAttributes'] + $this->information['privateTypedAttributes'];
105
-        $this->information['attributesPerClass']  = round( $this->information['attributeCount'] / $this->information['classCount'], 2 );
106
-        $this->information['functionsPerClass']   = round( $this->information['functionCount'] / $this->information['classCount'], 2 );
105
+        $this->information['attributesPerClass']  = round($this->information['attributeCount'] / $this->information['classCount'], 2);
106
+        $this->information['functionsPerClass']   = round($this->information['functionCount'] / $this->information['classCount'], 2);
107 107
 
108 108
         // Generate the needed text output
109 109
         return <<<END
Please login to merge, or discard this patch.