original_string: public static function instance($role)
      {
          // @codeCoverageIgnoreStart
          if (!self::$instances) {
              self::$instances = [
                  self::RESPONDER  => new self(self::RESPONDER),
                  self::AUTHORIZER => new self(self::AUTHORIZER),
                  self::FILTER     => new self(self::FILTER),
              ];
          }
          // @codeCoverageIgnoreEnd
  
          if (!array_key_exists($role, self::$instances)) {
              throw new \InvalidArgumentException("Invalid Role $role");
          }
  
          return self::$instances[$role];
      }
code: public static function instance($role)
      {
          // @codeCoverageIgnoreStart
          if (!self::$instances) {
              self::$instances = [
                  self::RESPONDER  => new self(self::RESPONDER),
                  self::AUTHORIZER => new self(self::AUTHORIZER),
                  self::FILTER     => new self(self::FILTER),
              ];
          }
          // @codeCoverageIgnoreEnd
  
          if (!array_key_exists($role, self::$instances)) {
              throw new \InvalidArgumentException("Invalid Role $role");
          }
  
          return self::$instances[$role];
      }
code_tokens: public static function instance ( $ role ) { // @codeCoverageIgnoreStart if ( ! self :: $ instances ) { self :: $ instances = [ self :: RESPONDER => new self ( self :: RESPONDER ) , self :: AUTHORIZER => new self ( self :: AUTHORIZER ) , self :: FILTER => new self ( self :: FILTER ) , ] ; } // @codeCoverageIgnoreEnd if ( ! array_key_exists ( $ role , self :: $ instances ) ) { throw new \ InvalidArgumentException ( "Invalid Role $role" ) ; } return self :: $ instances [ $ role ] ; }
docstring: Returns an instance of the given role.
  
  @param int $role
  
  @throws \InvalidArgumentException
  
  @return Role
docstring_tokens: Returns an instance of the given role .