@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | throw new Exception('Datatypes not found'); |
| 56 | 56 | } |
| 57 | 57 | $d = array_map( |
| 58 | - function ($x) { |
|
| 58 | + function($x) { |
|
| 59 | 59 | return str_replace('Datatype_', '', str_replace('.php', '', $x)); |
| 60 | 60 | }, |
| 61 | 61 | array_diff($files, array('.', '..')) |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | throw new Exception('Validators not found'); |
| 82 | 82 | } |
| 83 | 83 | $v = array_map( |
| 84 | - function ($x) { |
|
| 84 | + function($x) { |
|
| 85 | 85 | return str_replace('.php', '', $x); |
| 86 | 86 | }, |
| 87 | 87 | array_diff($files, array('.', '..')) |
@@ -252,7 +252,7 @@ |
||
| 252 | 252 | |
| 253 | 253 | $datatype = $codeData['datatype']; |
| 254 | 254 | $retval = []; |
| 255 | - $filename = $path . "/Datatype_{$codeData['datatypeLower']}.php"; |
|
| 255 | + $filename = $path . "/Datatype_{$codeData['datatypeLower']}.php"; |
|
| 256 | 256 | if (!file_exists($filename)) { |
| 257 | 257 | $retval['code'] = "Created {$datatype}."; |
| 258 | 258 | file_put_contents($filename, $codeData['code']); |
@@ -135,7 +135,7 @@ |
||
| 135 | 135 | |
| 136 | 136 | $name = $codeData['validator']; |
| 137 | 137 | $retval = []; |
| 138 | - $filename = $path . "/{$name}.php"; |
|
| 138 | + $filename = $path . "/{$name}.php"; |
|
| 139 | 139 | if (!file_exists($filename)) { |
| 140 | 140 | $retval['code'] = "Created validator {$name}."; |
| 141 | 141 | file_put_contents($filename, $codeData['code']); |
@@ -85,9 +85,9 @@ |
||
| 85 | 85 | 'Zero width or height' |
| 86 | 86 | ); |
| 87 | 87 | } |
| 88 | - $ratio = $width/$height; |
|
| 88 | + $ratio = $width / $height; |
|
| 89 | 89 | $expected = $ratio; |
| 90 | - if (abs(($ratio-$expected)/$expected) > 0.0001) { |
|
| 90 | + if (abs(($ratio - $expected) / $expected) > 0.0001) { |
|
| 91 | 91 | throw new ValidatorException( |
| 92 | 92 | 'Image width/height ratio should be ' . $ratio |
| 93 | 93 | ); |