src/JsonModel.php
public function validateProperty($property, $type, $value, $class = __CLASS__)
    {
        $aType = gettype($value);
        if ($aType !== $type) {
            throw new JsonModelException(
                JsonModelException::BAD_PROPERTY_TYPE,
                [$property, $type, $aType]
            );
        }

        if ($value === null) {
            throw new JsonModelException(
                JsonModelException::PROPERTY_EMPTY,
                [$class, $property, $aType]
            );
        }

        return true;
    }
public function validateProperty($property, $type, $value, $class = __CLASS__)
    {
        $aType = gettype($value);
        if ($aType !== $type) {
            throw new JsonModelException(
                JsonModelException::BAD_PROPERTY_TYPE,
                [$property, $type, $aType]
            );
        }

        if ($value === null) {
            throw new JsonModelException(
                JsonModelException::PROPERTY_EMPTY,
                [$class, $property, $aType]
            );
        }

        return true;
    }
public function validateProperty ( $ property , $ type , $ value , $ class = __CLASS__ ) { $ aType = gettype ( $ value ) ; if ( $ aType !== $ type ) { throw new JsonModelException ( JsonModelException :: BAD_PROPERTY_TYPE , [ $ property , $ type , $ aType ] ) ; } if ( $ value === null ) { throw new JsonModelException ( JsonModelException :: PROPERTY_EMPTY , [ $ class , $ property , $ aType ] ) ; } return true ; }
Verify that a property exists and its value is of a specified type.

@param string $property
@param string $type
@param mixed $value
@param string $class
@return true
@throws \Jtp\JtpException
Verify that a property exists and its value is of a specified type .