src/Axolotl/Type.php
private function determine( $type, $key_type = false ) {
		if ( ! $key_type && $this->non_scalar_type_exists( $type ) ) {
			return $type;
		}

		if ( $scalar_type = $this->determine_scalar( $type ) ) {
			if ( $key_type && (in_array( $scalar_type, array( 'double', 'boolean' ) )) ) {
				throw new InvalidArgumentException( 'This type is not supported as a key.' );
			}

			return $scalar_type;
		}

		throw new InvalidArgumentException( 'This type does not exist.' );
	}
private function determine( $type, $key_type = false ) {
		if ( ! $key_type && $this->non_scalar_type_exists( $type ) ) {
			return $type;
		}

		if ( $scalar_type = $this->determine_scalar( $type ) ) {
			if ( $key_type && (in_array( $scalar_type, array( 'double', 'boolean' ) )) ) {
				throw new InvalidArgumentException( 'This type is not supported as a key.' );
			}

			return $scalar_type;
		}

		throw new InvalidArgumentException( 'This type does not exist.' );
	}
private function determine ( $ type , $ key_type = false ) { if ( ! $ key_type && $ this -> non_scalar_type_exists ( $ type ) ) { return $ type ; } if ( $ scalar_type = $ this -> determine_scalar ( $ type ) ) { if ( $ key_type && ( in_array ( $ scalar_type , array ( 'double' , 'boolean' ) ) ) ) { throw new InvalidArgumentException ( 'This type is not supported as a key.' ) ; } return $ scalar_type ; } throw new InvalidArgumentException ( 'This type does not exist.' ) ; }
Determine the type to validate against.

@param string $type     Type to determine.
@param bool   $key_type Whether the type is for keys.

@return string

@throws InvalidArgumentException
Determine the type to validate against .