Completed
Push — develop ( e113e0...77eb37 )
by Simon
05:59
created
src/Field.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 			$method = $validators[$type];
212 212
 			$clean = Validator::$method($v);
213 213
 		}
214
-		elseif( in_array($type, [Type::OBJECT, Type::ENTITY]) ){
214
+		elseif( in_array($type, [Type::OBJECT, Type::ENTITY]) ) {
215 215
 			$clean = Validator::validateObject($v, $this->rules['class'], $this->nullable);
216 216
 		}
217 217
 		elseif( $type == Type::BINARY ) {
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 		$this->required = $rules['required'];
292 292
 		$this->nullable = $rules['nullable'];
293 293
 		$this->default  = $rules['default'];
294
-        $this->label    = $rules['label'];
294
+        $this->label = $rules['label'];
295 295
 
296 296
 		unset(
297 297
 			$rules['required'],
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@
 block discarded – undo
211 211
 			$method = $validators[$type];
212 212
 			$clean = Validator::$method($v);
213 213
 		}
214
-		elseif( in_array($type, [Type::OBJECT, Type::ENTITY]) ){
214
+		elseif( in_array($type, [Type::OBJECT, Type::ENTITY]) ) {
215 215
 			$clean = Validator::validateObject($v, $this->rules['class'], $this->nullable);
216 216
 		}
217 217
 		elseif( $type == Type::BINARY ) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
 			return [$v, Error::REQUIRED];
164 164
 
165 165
 		elseif( !$this->nullable && ($v === null) )
166
-			return [$v, Error::NULL];
166
+			return [$v, Error::null];
167 167
 
168 168
 		list($clean, $error) = $this->validateType($v, $this->type);
169 169
 
Please login to merge, or discard this patch.
src/Validator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 	 */
27 27
 	public static function __callStatic( $name, $args ) {
28 28
 
29
-		$name = 'validate'. substr($name, 2);
29
+		$name = 'validate' . substr($name, 2);
30 30
 
31 31
 		if( !method_exists(__CLASS__, $name) )
32 32
 			throw new \BadMethodCallException(sprintf("%s::%s()", get_called_class(), $name));
Please login to merge, or discard this patch.