public function mustBeTypeOf(string $type) : Slot
    {
        static $allowed_types = [
            'boolean',
            'bool',
            'integer',
            'int',
            'float',
            'double',
            'string',
            'array',
            'object',
            'resource',
            'NULL',
            'null',
        ];
        $this->type = in_array($type,$allowed_types) ? $type : self::TYPE_ANY;
        return $this;
    }
public function mustBeTypeOf(string $type) : Slot
    {
        static $allowed_types = [
            'boolean',
            'bool',
            'integer',
            'int',
            'float',
            'double',
            'string',
            'array',
            'object',
            'resource',
            'NULL',
            'null',
        ];
        $this->type = in_array($type,$allowed_types) ? $type : self::TYPE_ANY;
        return $this;
    }
public function mustBeTypeOf ( string $ type ) : Slot { static $ allowed_types = [ 'boolean' , 'bool' , 'integer' , 'int' , 'float' , 'double' , 'string' , 'array' , 'object' , 'resource' , 'NULL' , 'null' , ] ; $ this -> type = in_array ( $ type , $ allowed_types ) ? $ type : self :: TYPE_ANY ; return $ this ; }
Set type restriction

@param string $type

@return Slot
Set type restriction