public function castInteger()
    {
        $castFunction = function ($value) {
            return is_object($value) ? 1 : (int) $value;
        };

        if (is_numeric($this->value)) {
            return $castFunction($this->value);
        }

        return $this->handleMismatch($castFunction, 'integer');
    }
public function castInteger()
    {
        $castFunction = function ($value) {
            return is_object($value) ? 1 : (int) $value;
        };

        if (is_numeric($this->value)) {
            return $castFunction($this->value);
        }

        return $this->handleMismatch($castFunction, 'integer');
    }
public function castInteger ( ) { $ castFunction = function ( $ value ) { return is_object ( $ value ) ? 1 : ( int ) $ value ; } ; if ( is_numeric ( $ this -> value ) ) { return $ castFunction ( $ this -> value ) ; } return $ this -> handleMismatch ( $ castFunction , 'integer' ) ; }
Casts the value into an integer.

@return integer
Casts the value into an integer .