original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Set type restriction
  
  @param string $type
  
  @return Slot
docstring_tokens: Set type restriction