Passed
Push — master ( dce18f...ffae54 )
by Omar
02:09
created
src/UndirectedGraph.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
         // read in the edges
112 112
         for ($i = 0; $i < $edges; $i++) {
113 113
             // fet from source
114
-            $raw = $lines[$i+2];
114
+            $raw = $lines[$i + 2];
115 115
             // parse data
116 116
             list (
117 117
                 $v,
Please login to merge, or discard this patch.
src/GraphClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,6 +70,6 @@
 block discarded – undo
70 70
             }
71 71
         }
72 72
         // self loop appears in adjacency list twice
73
-        return $count/2;   
73
+        return $count / 2;   
74 74
     }
75 75
 }
Please login to merge, or discard this patch.
src/Graph.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         // get the ne
47 47
         if (!empty($adjacencyList)) {
48 48
             // set it
49
-            $this->adjacencyList= $adjacencyList;
49
+            $this->adjacencyList = $adjacencyList;
50 50
         } else {
51 51
             // init
52 52
             $this->adjacencyList = [];
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      * @param bool $weight
161 161
      * @return array
162 162
      */
163
-    protected static function parseEdge(string $input,int $vertices, bool $weight = false)
163
+    protected static function parseEdge(string $input, int $vertices, bool $weight = false)
164 164
     {
165 165
         // clean
166 166
         $trimmed = trim($input);
Please login to merge, or discard this patch.
src/EdgeWeightedGraph.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@
 block discarded – undo
171 171
         // init
172 172
         $taken = [];
173 173
         // iterate over the edges
174
-        for ($i = 0; $i <$edges; $i++) {
174
+        for ($i = 0; $i < $edges; $i++) {
175 175
             // generate an edge
176 176
             do {
177 177
                 // generate
Please login to merge, or discard this patch.
src/Edge.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
         if ($weight < $otherWeight) {
118 118
             // return less than
119 119
             return -1;
120
-        } else if ($weight == $otherWeight){
120
+        } else if ($weight == $otherWeight) {
121 121
             // return equal
122 122
             return 0;
123 123
         } else {
Please login to merge, or discard this patch.
src/Digraph.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
         // read in the edges
112 112
         for ($i = 0; $i < $edges; $i++) {
113 113
             // fet from source
114
-            $raw = $lines[$i+2];
114
+            $raw = $lines[$i + 2];
115 115
             // parse data
116 116
             list (
117 117
                 $v,
Please login to merge, or discard this patch.