src/Validators/MiscValidators/TypeValidator.php
public function validate($subject): bool
    {
        switch ($this->schema['type']) {
            case 'boolean':
                return $this->validateTypBoolean($subject);
            case 'number':
            case 'integer':
            case 'float':
                return $this->validateTypeNumeric($subject);
            case 'string':
                return $this->validateTypeString($subject);
            case 'array':
                return $this->validateTypeArray($subject);
            case 'object':
                return $this->validateTypeObject($subject);
            case 'null':
                return $this->validateTypeNull($subject);
        }
        return false;
    }
public function validate($subject): bool
    {
        switch ($this->schema['type']) {
            case 'boolean':
                return $this->validateTypBoolean($subject);
            case 'number':
            case 'integer':
            case 'float':
                return $this->validateTypeNumeric($subject);
            case 'string':
                return $this->validateTypeString($subject);
            case 'array':
                return $this->validateTypeArray($subject);
            case 'object':
                return $this->validateTypeObject($subject);
            case 'null':
                return $this->validateTypeNull($subject);
        }
        return false;
    }
public function validate ( $ subject ) : bool { switch ( $ this -> schema [ 'type' ] ) { case 'boolean' : return $ this -> validateTypBoolean ( $ subject ) ; case 'number' : case 'integer' : case 'float' : return $ this -> validateTypeNumeric ( $ subject ) ; case 'string' : return $ this -> validateTypeString ( $ subject ) ; case 'array' : return $ this -> validateTypeArray ( $ subject ) ; case 'object' : return $ this -> validateTypeObject ( $ subject ) ; case 'null' : return $ this -> validateTypeNull ( $ subject ) ; } return false ; }
Validates subject against type

@param $subject
@return bool
Validates subject against type