Completed
Push — 0.2 ( f8cb44 )
by Luis
09:01 queued 03:35
created
src/classes/processor/options.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,20 +8,20 @@  discard block
 block discarded – undo
8 8
 
9 9
     protected $properties = array();    
10 10
 
11
-    public function __get( $key )
11
+    public function __get($key)
12 12
     {
13
-        if ( !array_key_exists( $key, $this->properties ) )
13
+        if (!array_key_exists($key, $this->properties))
14 14
         {
15
-            throw new plProcessorOptionException( $key, plProcessorOptionException::READ );
15
+            throw new plProcessorOptionException($key, plProcessorOptionException::READ);
16 16
         }
17 17
         return $this->properties[$key]['data'];
18 18
     }
19 19
 
20
-    public function __set( $key, $val )
20
+    public function __set($key, $val)
21 21
     {
22
-        if ( !array_key_exists( $key, $this->properties ) )
22
+        if (!array_key_exists($key, $this->properties))
23 23
         {
24
-            throw new plProcessorOptionException( $key, plProcessorOptionException::WRITE );
24
+            throw new plProcessorOptionException($key, plProcessorOptionException::WRITE);
25 25
         }
26 26
         $this->properties[$key]['data'] = $val;            
27 27
     }
@@ -29,27 +29,27 @@  discard block
 block discarded – undo
29 29
     public function getOptions() 
30 30
     {
31 31
         $options = array();
32
-        foreach( $this->properties as $key => $property ) 
32
+        foreach ($this->properties as $key => $property) 
33 33
         {
34 34
             $options[] = $key;
35 35
         }
36 36
         return $options;
37 37
     }
38 38
 
39
-    public function getOptionDescription( $option ) 
39
+    public function getOptionDescription($option) 
40 40
     {
41
-        if ( !array_key_exists( $option, $this->properties ) ) 
41
+        if (!array_key_exists($option, $this->properties)) 
42 42
         {
43
-            throw new plProcessorOptionException( $option, plProcessorOptionException::UNKNOWN );
43
+            throw new plProcessorOptionException($option, plProcessorOptionException::UNKNOWN);
44 44
         }
45 45
         return $this->properties[$option]['description'];
46 46
     }
47 47
 
48
-    public function getOptionType( $option ) 
48
+    public function getOptionType($option) 
49 49
     {
50
-        if ( !array_key_exists( $option, $this->properties ) ) 
50
+        if (!array_key_exists($option, $this->properties)) 
51 51
         {
52
-            throw new plProcessorOptionException( $option, plProcessorOptionException::UNKNOWN );
52
+            throw new plProcessorOptionException($option, plProcessorOptionException::UNKNOWN);
53 53
         }
54 54
         return $this->properties[$option]['type'];
55 55
     }
Please login to merge, or discard this patch.
src/classes/processor/graphviz.php 2 patches
Spacing   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -30,24 +30,24 @@  discard block
 block discarded – undo
30 30
         return 'text/dot';
31 31
     }
32 32
 
33
-    public function process( $input, $type ) 
33
+    public function process($input, $type) 
34 34
     {
35 35
         $this->structure = $input;
36 36
 
37
-        $this->output  = 'digraph "' . sha1( mt_rand() ) . '" {' . "\n";
37
+        $this->output  = 'digraph "' . sha1(mt_rand()) . '" {' . "\n";
38 38
         $this->output .= 'splines = true;' . "\n";
39 39
         $this->output .= 'overlap = false;' . "\n";
40 40
         $this->output .= 'mindist = 0.6;' . "\n";
41 41
 
42
-        foreach( $this->structure as $object ) 
42
+        foreach ($this->structure as $object) 
43 43
         {
44
-            if ( $object instanceof plPhpClass ) 
44
+            if ($object instanceof plPhpClass) 
45 45
             {
46
-                $this->output .= $this->getClassDefinition( $object );
46
+                $this->output .= $this->getClassDefinition($object);
47 47
             } 
48
-            else if ( $object instanceof plPhpInterface ) 
48
+            else if ($object instanceof plPhpInterface) 
49 49
             {
50
-                $this->output .= $this->getInterfaceDefinition( $object );
50
+                $this->output .= $this->getInterfaceDefinition($object);
51 51
             }
52 52
         }
53 53
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         return $this->output;
57 57
     }
58 58
 
59
-    private function getClassDefinition( $o ) 
59
+    private function getClassDefinition($o) 
60 60
     {
61 61
         $def = '';
62 62
 
@@ -65,61 +65,61 @@  discard block
 block discarded – undo
65 65
         
66 66
         $attributes = array();
67 67
         $associations = array();
68
-        foreach( $o->attributes as $attribute ) 
68
+        foreach ($o->attributes as $attribute) 
69 69
         {
70
-            $attributes[] = $this->getModifierRepresentation( $attribute->modifier ) . $attribute->name;
70
+            $attributes[] = $this->getModifierRepresentation($attribute->modifier) . $attribute->name;
71 71
 
72 72
             // Association creation is optional
73
-            if ( $this->options->createAssociations === false ) 
73
+            if ($this->options->createAssociations === false) 
74 74
             {
75 75
                 continue;
76 76
             }
77 77
 
78 78
             // Create associations if the attribute type is set
79
-            if ( $attribute->type !== null && array_key_exists( $attribute->type, $this->structure ) && !array_key_exists( strtolower( $attribute->type ), $associations ) ) 
79
+            if ($attribute->type !== null && array_key_exists($attribute->type, $this->structure) && !array_key_exists(strtolower($attribute->type), $associations)) 
80 80
             {
81 81
                 $def .= $this->createNodeRelation( 
82
-                    $this->getUniqueId( $this->structure[$attribute->type] ),
83
-                    $this->getUniqueId( $o ),
82
+                    $this->getUniqueId($this->structure[$attribute->type]),
83
+                    $this->getUniqueId($o),
84 84
                     array( 
85 85
                         'dir'       => 'back',
86 86
                         'arrowtail' => 'none',
87 87
                         'style'     => 'dashed',
88 88
                     )
89 89
                 );
90
-                $associations[strtolower( $attribute->type )] = true;
90
+                $associations[strtolower($attribute->type)] = true;
91 91
             }
92 92
         }
93 93
 
94 94
         $functions = array();
95
-        foreach( $o->functions as $function ) 
95
+        foreach ($o->functions as $function) 
96 96
         {
97
-            $functions[] = $this->getModifierRepresentation( $function->modifier ) . $function->name . $this->getParamRepresentation( $function->params );
97
+            $functions[] = $this->getModifierRepresentation($function->modifier) . $function->name . $this->getParamRepresentation($function->params);
98 98
 
99 99
             // Association creation is optional
100
-            if ( $this->options->createAssociations === false ) 
100
+            if ($this->options->createAssociations === false) 
101 101
             {
102 102
                 continue;
103 103
             }
104 104
 
105 105
             // Create association if the function is the constructor and takes
106 106
             // other classes as parameters
107
-            if ( strtolower( $function->name ) === '__construct' ) 
107
+            if (strtolower($function->name) === '__construct') 
108 108
             {
109
-                foreach( $function->params as $param ) 
109
+                foreach ($function->params as $param) 
110 110
                 {
111
-                    if ( $param->type !== null && array_key_exists( $param->type, $this->structure ) && !array_key_exists( strtolower( $param->type ), $associations ) ) 
111
+                    if ($param->type !== null && array_key_exists($param->type, $this->structure) && !array_key_exists(strtolower($param->type), $associations)) 
112 112
                     {
113 113
                         $def .= $this->createNodeRelation( 
114
-                            $this->getUniqueId( $this->structure[$param->type] ),
115
-                            $this->getUniqueId( $o ),
114
+                            $this->getUniqueId($this->structure[$param->type]),
115
+                            $this->getUniqueId($o),
116 116
                             array( 
117 117
                                 'dir'       => 'back',
118 118
                                 'arrowtail' => 'none',
119 119
                                 'style'     => 'dashed',
120 120
                             )
121 121
                         );
122
-                        $associations[strtolower( $param->type )] = true;
122
+                        $associations[strtolower($param->type)] = true;
123 123
                     }
124 124
                 }
125 125
             }
@@ -127,25 +127,25 @@  discard block
 block discarded – undo
127 127
         
128 128
         // Create the node
129 129
         $def .= $this->createNode( 
130
-            $this->getUniqueId( $o ),
130
+            $this->getUniqueId($o),
131 131
             array(
132
-                'label' => $this->createClassLabel( $name, $attributes, $functions ),
132
+                'label' => $this->createClassLabel($name, $attributes, $functions),
133 133
                 'shape' => 'plaintext',
134 134
             )
135 135
         );
136 136
 
137 137
         // Create class inheritance relation
138
-        if ( $o->extends !== null ) 
138
+        if ($o->extends !== null) 
139 139
         {
140 140
             // Check if we need an "external" class node
141
-            if ( in_array( $o->extends, $this->structure ) !== true ) 
141
+            if (in_array($o->extends, $this->structure) !== true) 
142 142
             {
143
-                $def .= $this->getClassDefinition( $o->extends );
143
+                $def .= $this->getClassDefinition($o->extends);
144 144
             }
145 145
 
146 146
             $def .= $this->createNodeRelation( 
147
-                $this->getUniqueId( $o->extends ),
148
-                $this->getUniqueId( $o ),
147
+                $this->getUniqueId($o->extends),
148
+                $this->getUniqueId($o),
149 149
                 array( 
150 150
                     'dir'       => 'back',
151 151
                     'arrowtail' => 'empty',
@@ -155,17 +155,17 @@  discard block
 block discarded – undo
155 155
         }
156 156
 
157 157
         // Create class implements relation
158
-        foreach( $o->implements as $interface ) 
158
+        foreach ($o->implements as $interface) 
159 159
         {
160 160
             // Check if we need an "external" interface node
161
-            if ( in_array( $interface, $this->structure ) !== true ) 
161
+            if (in_array($interface, $this->structure) !== true) 
162 162
             {
163
-                $def .= $this->getInterfaceDefinition( $interface );
163
+                $def .= $this->getInterfaceDefinition($interface);
164 164
             }
165 165
 
166 166
             $def .= $this->createNodeRelation( 
167
-                $this->getUniqueId( $interface ),
168
-                $this->getUniqueId( $o ),
167
+                $this->getUniqueId($interface),
168
+                $this->getUniqueId($o),
169 169
                 array( 
170 170
                     'dir'       => 'back',
171 171
                     'arrowtail' => 'normal',
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
         return $def;
178 178
     }
179 179
 
180
-    private function getInterfaceDefinition( $o ) 
180
+    private function getInterfaceDefinition($o) 
181 181
     {
182 182
         $def = '';
183 183
 
@@ -185,32 +185,32 @@  discard block
 block discarded – undo
185 185
         $name = $o->name;
186 186
         
187 187
         $functions = array();
188
-        foreach( $o->functions as $function ) 
188
+        foreach ($o->functions as $function) 
189 189
         {
190
-            $functions[] = $this->getModifierRepresentation( $function->modifier ) . $function->name . $this->getParamRepresentation( $function->params );
190
+            $functions[] = $this->getModifierRepresentation($function->modifier) . $function->name . $this->getParamRepresentation($function->params);
191 191
         }
192 192
         
193 193
         // Create the node
194 194
         $def .= $this->createNode( 
195
-            $this->getUniqueId( $o ),
195
+            $this->getUniqueId($o),
196 196
             array(
197
-                'label' => $this->createInterfaceLabel( $name, array(), $functions ),
197
+                'label' => $this->createInterfaceLabel($name, array(), $functions),
198 198
                 'shape' => 'plaintext',
199 199
             )
200 200
         );
201 201
 
202 202
         // Create interface inheritance relation        
203
-        if ( $o->extends !== null ) 
203
+        if ($o->extends !== null) 
204 204
         {
205 205
             // Check if we need an "external" interface node
206
-            if ( in_array( $o->extends, $this->structure ) !== true ) 
206
+            if (in_array($o->extends, $this->structure) !== true) 
207 207
             {
208
-                $def .= $this->getInterfaceDefinition( $o->extends );
208
+                $def .= $this->getInterfaceDefinition($o->extends);
209 209
             }
210 210
 
211 211
             $def .= $this->createNodeRelation( 
212
-                $this->getUniqueId( $o->extends ),
213
-                $this->getUniqueId( $o ),
212
+                $this->getUniqueId($o->extends),
213
+                $this->getUniqueId($o),
214 214
                 array( 
215 215
                     'dir'       => 'back',
216 216
                     'arrowtail' => 'empty',
@@ -222,32 +222,32 @@  discard block
 block discarded – undo
222 222
         return $def;
223 223
     }
224 224
 
225
-    private function getModifierRepresentation( $modifier ) 
225
+    private function getModifierRepresentation($modifier) 
226 226
     {
227
-        return ( $modifier === 'public' )
228
-               ? ( '+' )
229
-               : ( ( $modifier === 'protected' )
230
-                 ? ( '#' )
231
-                 : ( '-' ) );
227
+        return ($modifier === 'public')
228
+               ? ('+')
229
+               : (($modifier === 'protected')
230
+                 ? ('#')
231
+                 : ('-'));
232 232
     }
233 233
 
234
-    private function getParamRepresentation( $params ) 
234
+    private function getParamRepresentation($params) 
235 235
     {
236
-        if ( count( $params ) === 0 ) 
236
+        if (count($params) === 0) 
237 237
         {
238 238
             return '()';
239 239
         }
240 240
 
241 241
         $representation = '( ';
242
-        for( $i = 0; $i<count( $params ); $i++ ) 
242
+        for ($i = 0; $i < count($params); $i++) 
243 243
         {
244
-            if ( $params[$i]->type !== null ) 
244
+            if ($params[$i]->type !== null) 
245 245
             {
246 246
                 $representation .= $params[$i]->type . ' ';
247 247
             }
248 248
 
249 249
             $representation .= $params[$i]->name;
250
-            if ( $i < count( $params ) - 1 ) 
250
+            if ($i < count($params) - 1) 
251 251
             {
252 252
                 $representation .= ', ';
253 253
             }
@@ -257,15 +257,15 @@  discard block
 block discarded – undo
257 257
         return $representation;
258 258
     }
259 259
 
260
-    private function getUniqueId( $object ) 
260
+    private function getUniqueId($object) 
261 261
     {
262
-        return '"' . spl_object_hash( $object ) . '"';
262
+        return '"' . spl_object_hash($object) . '"';
263 263
     }
264 264
 
265
-    private function createNode( $name, $options ) 
265
+    private function createNode($name, $options) 
266 266
     {
267 267
         $node = $name . " [";
268
-        foreach( $options as $key => $value ) 
268
+        foreach ($options as $key => $value) 
269 269
         {
270 270
             $node .= $key . '=' . $value . ' ';
271 271
         }
@@ -273,10 +273,10 @@  discard block
 block discarded – undo
273 273
         return $node;
274 274
     }
275 275
 
276
-    private function createNodeRelation( $node1, $node2, $options ) 
276
+    private function createNodeRelation($node1, $node2, $options) 
277 277
     {
278 278
         $relation = $node1 . ' -> ' . $node2 . ' [';
279
-        foreach( $options as $key => $value ) 
279
+        foreach ($options as $key => $value) 
280 280
         {
281 281
             $relation .= $key . '=' . $value . ' ';
282 282
         }
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
         return $relation;
285 285
     }
286 286
 
287
-    private function createInterfaceLabel( $name, $attributes, $functions )     
287
+    private function createInterfaceLabel($name, $attributes, $functions)     
288 288
     {
289 289
         // Start the table
290 290
         $label = '<<TABLE CELLSPACING="0" BORDER="0" ALIGN="LEFT">';
@@ -294,11 +294,11 @@  discard block
 block discarded – undo
294 294
 
295 295
         // The attributes block
296 296
         $label .= '<TR><TD BORDER="' . $this->options->style->interfaceTableBorder . '" ALIGN="LEFT" BGCOLOR="' . $this->options->style->interfaceAttributesBackground . '">';
297
-        if ( count( $attributes ) === 0 ) 
297
+        if (count($attributes) === 0) 
298 298
         {
299 299
             $label .= ' ';
300 300
         }
301
-        foreach( $attributes as $attribute ) 
301
+        foreach ($attributes as $attribute) 
302 302
         {
303 303
             $label .= '<FONT COLOR="' . $this->options->style->interfaceAttributesColor . '" FACE="' . $this->options->style->interfaceAttributesFont . '" POINT-SIZE="' . $this->options->style->interfaceAttributesFontsize . '">' . $attribute . '</FONT><BR ALIGN="LEFT"/>';
304 304
         }
@@ -306,11 +306,11 @@  discard block
 block discarded – undo
306 306
 
307 307
         // The function block
308 308
         $label .= '<TR><TD BORDER="' . $this->options->style->interfaceTableBorder . '" ALIGN="LEFT" BGCOLOR="' . $this->options->style->interfaceFunctionsBackground . '">';
309
-        if ( count( $functions ) === 0 ) 
309
+        if (count($functions) === 0) 
310 310
         {
311 311
             $label .= ' ';
312 312
         }
313
-        foreach( $functions as $function ) 
313
+        foreach ($functions as $function) 
314 314
         {
315 315
             $label .= '<FONT COLOR="' . $this->options->style->interfaceFunctionsColor . '" FACE="' . $this->options->style->interfaceFunctionsFont . '" POINT-SIZE="' . $this->options->style->interfaceFunctionsFontsize . '">' . $function . '</FONT><BR ALIGN="LEFT"/>';
316 316
         }
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
         return $label;
323 323
     }
324 324
 
325
-    private function createClassLabel( $name, $attributes, $functions )     
325
+    private function createClassLabel($name, $attributes, $functions)     
326 326
     {
327 327
         // Start the table
328 328
         $label = '<<TABLE CELLSPACING="0" BORDER="0" ALIGN="LEFT">';
@@ -332,11 +332,11 @@  discard block
 block discarded – undo
332 332
 
333 333
         // The attributes block
334 334
         $label .= '<TR><TD BORDER="' . $this->options->style->classTableBorder . '" ALIGN="LEFT" BGCOLOR="' . $this->options->style->classAttributesBackground . '">';
335
-        if ( count( $attributes ) === 0 ) 
335
+        if (count($attributes) === 0) 
336 336
         {
337 337
             $label .= ' ';
338 338
         }
339
-        foreach( $attributes as $attribute ) 
339
+        foreach ($attributes as $attribute) 
340 340
         {
341 341
             $label .= '<FONT COLOR="' . $this->options->style->classAttributesColor . '" FACE="' . $this->options->style->classAttributesFont . '" POINT-SIZE="' . $this->options->style->classAttributesFontsize . '">' . $attribute . '</FONT><BR ALIGN="LEFT"/>';
342 342
         }
@@ -344,11 +344,11 @@  discard block
 block discarded – undo
344 344
 
345 345
         // The function block
346 346
         $label .= '<TR><TD BORDER="' . $this->options->style->classTableBorder . '" ALIGN="LEFT" BGCOLOR="' . $this->options->style->classFunctionsBackground . '">';
347
-        if ( count( $functions ) === 0 ) 
347
+        if (count($functions) === 0) 
348 348
         {
349 349
             $label .= ' ';
350 350
         }
351
-        foreach( $functions as $function ) 
351
+        foreach ($functions as $function) 
352 352
         {
353 353
             $label .= '<FONT COLOR="' . $this->options->style->classFunctionsColor . '" FACE="' . $this->options->style->classFunctionsFont . '" POINT-SIZE="' . $this->options->style->classFunctionsFontsize . '">' . $function . '</FONT><BR ALIGN="LEFT"/>';
354 354
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,7 @@
 block discarded – undo
44 44
             if ( $object instanceof plPhpClass ) 
45 45
             {
46 46
                 $this->output .= $this->getClassDefinition( $object );
47
-            } 
48
-            else if ( $object instanceof plPhpInterface ) 
47
+            } else if ( $object instanceof plPhpInterface ) 
49 48
             {
50 49
                 $this->output .= $this->getInterfaceDefinition( $object );
51 50
             }
Please login to merge, or discard this patch.
src/classes/processor/neato.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,17 +21,17 @@
 block discarded – undo
21 21
         return 'image/png';
22 22
     }
23 23
 
24
-    public function execute( $infile, $outfile, $type ) 
24
+    public function execute($infile, $outfile, $type) 
25 25
     {
26 26
         exec(
27
-            'neato -Tpng -o ' . escapeshellarg( $outfile ) . ' ' . escapeshellarg( $infile ),
27
+            'neato -Tpng -o ' . escapeshellarg($outfile) . ' ' . escapeshellarg($infile),
28 28
             $output,
29 29
             $return
30 30
         );
31 31
 
32
-        if ( $return !== 0 ) 
32
+        if ($return !== 0) 
33 33
         {
34
-            throw new plProcessorExternalExecutionException( $output );
34
+            throw new plProcessorExternalExecutionException($output);
35 35
         }
36 36
     }
37 37
 }
Please login to merge, or discard this patch.
src/classes/php/attribute.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 {
5 5
     private $properties;
6 6
 
7
-    public function __construct( $name, $modifier = 'public', $type = null ) 
7
+    public function __construct($name, $modifier = 'public', $type = null) 
8 8
     {
9 9
         $this->properties = array( 
10 10
             'name'      =>  $name,
@@ -13,20 +13,20 @@  discard block
 block discarded – undo
13 13
         );
14 14
     }
15 15
 
16
-    public function __get( $key )
16
+    public function __get($key)
17 17
     {
18
-        if ( !array_key_exists( $key, $this->properties ) )
18
+        if (!array_key_exists($key, $this->properties))
19 19
         {
20
-            throw new plBasePropertyException( $key, plBasePropertyException::READ );
20
+            throw new plBasePropertyException($key, plBasePropertyException::READ);
21 21
         }
22 22
         return $this->properties[$key];
23 23
     }
24 24
 
25
-    public function __set( $key, $val )
25
+    public function __set($key, $val)
26 26
     {
27
-        if ( !array_key_exists( $key, $this->properties ) )
27
+        if (!array_key_exists($key, $this->properties))
28 28
         {
29
-            throw new plBasePropertyException( $key, plBasePropertyException::WRITE );
29
+            throw new plBasePropertyException($key, plBasePropertyException::WRITE);
30 30
         }
31 31
         $this->properties[$key] = $val;            
32 32
     }
Please login to merge, or discard this patch.
src/classes/php/class.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 {
5 5
     private $properties;
6 6
 
7
-    public function __construct( $name, $attributes = array(), $functions = array(), $implements = array(), $extends = null ) 
7
+    public function __construct($name, $attributes = array(), $functions = array(), $implements = array(), $extends = null) 
8 8
     {
9 9
         $this->properties = array( 
10 10
             'name'          =>  $name,
@@ -15,20 +15,20 @@  discard block
 block discarded – undo
15 15
         );
16 16
     }
17 17
 
18
-    public function __get( $key )
18
+    public function __get($key)
19 19
     {
20
-        if ( !array_key_exists( $key, $this->properties ) )
20
+        if (!array_key_exists($key, $this->properties))
21 21
         {
22
-            throw new plBasePropertyException( $key, plBasePropertyException::READ );
22
+            throw new plBasePropertyException($key, plBasePropertyException::READ);
23 23
         }
24 24
         return $this->properties[$key];
25 25
     }
26 26
 
27
-    public function __set( $key, $val )
27
+    public function __set($key, $val)
28 28
     {
29
-        if ( !array_key_exists( $key, $this->properties ) )
29
+        if (!array_key_exists($key, $this->properties))
30 30
         {
31
-            throw new plBasePropertyException( $key, plBasePropertyException::WRITE );
31
+            throw new plBasePropertyException($key, plBasePropertyException::WRITE);
32 32
         }
33 33
         $this->properties[$key] = $val;            
34 34
     }
Please login to merge, or discard this patch.
src/classes/php/function.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 {
5 5
     private $properties;
6 6
 
7
-    public function __construct( $name, $modifier = 'public', $params = array() ) 
7
+    public function __construct($name, $modifier = 'public', $params = array()) 
8 8
     {
9 9
         $this->properties = array( 
10 10
             'name'      =>  $name,
@@ -13,20 +13,20 @@  discard block
 block discarded – undo
13 13
         );
14 14
     }
15 15
 
16
-    public function __get( $key )
16
+    public function __get($key)
17 17
     {
18
-        if ( !array_key_exists( $key, $this->properties ) )
18
+        if (!array_key_exists($key, $this->properties))
19 19
         {
20
-            throw new plBasePropertyException( $key, plBasePropertyException::READ );
20
+            throw new plBasePropertyException($key, plBasePropertyException::READ);
21 21
         }
22 22
         return $this->properties[$key];
23 23
     }
24 24
 
25
-    public function __set( $key, $val )
25
+    public function __set($key, $val)
26 26
     {
27
-        if ( !array_key_exists( $key, $this->properties ) )
27
+        if (!array_key_exists($key, $this->properties))
28 28
         {
29
-            throw new plBasePropertyException( $key, plBasePropertyException::WRITE );
29
+            throw new plBasePropertyException($key, plBasePropertyException::WRITE);
30 30
         }
31 31
         $this->properties[$key] = $val;            
32 32
     }
Please login to merge, or discard this patch.
src/classes/php/functionParameter.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 {
5 5
     private $properties;
6 6
 
7
-    public function __construct( $name, $type = null ) 
7
+    public function __construct($name, $type = null) 
8 8
     {
9 9
         $this->properties = array( 
10 10
             'name'      =>  $name,
@@ -12,20 +12,20 @@  discard block
 block discarded – undo
12 12
         );
13 13
     }
14 14
 
15
-    public function __get( $key )
15
+    public function __get($key)
16 16
     {
17
-        if ( !array_key_exists( $key, $this->properties ) )
17
+        if (!array_key_exists($key, $this->properties))
18 18
         {
19
-            throw new plBasePropertyException( $key, plBasePropertyException::READ );
19
+            throw new plBasePropertyException($key, plBasePropertyException::READ);
20 20
         }
21 21
         return $this->properties[$key];
22 22
     }
23 23
 
24
-    public function __set( $key, $val )
24
+    public function __set($key, $val)
25 25
     {
26
-        if ( !array_key_exists( $key, $this->properties ) )
26
+        if (!array_key_exists($key, $this->properties))
27 27
         {
28
-            throw new plBasePropertyException( $key, plBasePropertyException::WRITE );
28
+            throw new plBasePropertyException($key, plBasePropertyException::WRITE);
29 29
         }
30 30
         $this->properties[$key] = $val;            
31 31
     }
Please login to merge, or discard this patch.
src/classes/php/interface.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 {
5 5
     private $properties;
6 6
 
7
-    public function __construct( $name, $functions = array(), $extends = null ) 
7
+    public function __construct($name, $functions = array(), $extends = null) 
8 8
     {
9 9
         $this->properties = array( 
10 10
             'name'      =>  $name,
@@ -13,20 +13,20 @@  discard block
 block discarded – undo
13 13
         );
14 14
     }
15 15
 
16
-    public function __get( $key )
16
+    public function __get($key)
17 17
     {
18
-        if ( !array_key_exists( $key, $this->properties ) )
18
+        if (!array_key_exists($key, $this->properties))
19 19
         {
20
-            throw new plBasePropertyException( $key, plBasePropertyException::READ );
20
+            throw new plBasePropertyException($key, plBasePropertyException::READ);
21 21
         }
22 22
         return $this->properties[$key];
23 23
     }
24 24
 
25
-    public function __set( $key, $val )
25
+    public function __set($key, $val)
26 26
     {
27
-        if ( !array_key_exists( $key, $this->properties ) )
27
+        if (!array_key_exists($key, $this->properties))
28 28
         {
29
-            throw new plBasePropertyException( $key, plBasePropertyException::WRITE );
29
+            throw new plBasePropertyException($key, plBasePropertyException::WRITE);
30 30
         }
31 31
         $this->properties[$key] = $val;            
32 32
     }
Please login to merge, or discard this patch.
src/classes/base.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -5,24 +5,24 @@  discard block
 block discarded – undo
5 5
     private static $autoload = array();
6 6
     private static $autoloadDirectory = array();
7 7
 
8
-    public static function autoload( $classname )
8
+    public static function autoload($classname)
9 9
     {
10
-        if ( isset( self::$autoload[$classname] ) ) 
10
+        if (isset(self::$autoload[$classname])) 
11 11
         {
12
-            include_once( self::$autoload[$classname] );
12
+            include_once(self::$autoload[$classname]);
13 13
         }
14 14
     }
15 15
 
16
-    public static function addAutoloadDirectory( $directory ) 
16
+    public static function addAutoloadDirectory($directory) 
17 17
     {
18
-        if ( !in_array( $directory, self::$autoloadDirectory ) && is_dir( $directory ) && is_readable( $directory ) )
18
+        if (!in_array($directory, self::$autoloadDirectory) && is_dir($directory) && is_readable($directory))
19 19
         {
20 20
             self::$autoloadDirectory[] = $directory;
21
-            foreach( $glob = glob( $directory."/*.php" ) as $file )
21
+            foreach ($glob = glob($directory . "/*.php") as $file)
22 22
             {
23
-                if ( is_array( $autoload = include( $file ) ) ) 
23
+                if (is_array($autoload = include($file))) 
24 24
                 {
25
-                    self::$autoload = array_merge( $autoload, self::$autoload );
25
+                    self::$autoload = array_merge($autoload, self::$autoload);
26 26
                 }
27 27
             }
28 28
         }
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     public static function getAutoloadClasses() 
32 32
     {
33
-        return array_keys( self::$autoload );
33
+        return array_keys(self::$autoload);
34 34
     }
35 35
 }
36 36
 
Please login to merge, or discard this patch.