original_string: protected function parseAllowCredentials(ServerRequestInterface $request) : bool
      {
          // read in the current setting
          $item = $this->settings['allowCredentials'];
          // we allow callables to be set (along with strings) so we can vary things upon requests.
          if (true === is_callable($item)) {
              // all callbacks are made with the request as the second parameter.
              $item = call_user_func($item, $request);
          }
  
          // if the credentials are still not a boolean, abort.
          if (false === is_bool($item)) {
              throw new \InvalidArgumentException('allowCredentials should be a boolean value');
          }
  
          // return the boolean credentials setting
          return $item;
      }
code: protected function parseAllowCredentials(ServerRequestInterface $request) : bool
      {
          // read in the current setting
          $item = $this->settings['allowCredentials'];
          // we allow callables to be set (along with strings) so we can vary things upon requests.
          if (true === is_callable($item)) {
              // all callbacks are made with the request as the second parameter.
              $item = call_user_func($item, $request);
          }
  
          // if the credentials are still not a boolean, abort.
          if (false === is_bool($item)) {
              throw new \InvalidArgumentException('allowCredentials should be a boolean value');
          }
  
          // return the boolean credentials setting
          return $item;
      }
code_tokens: protected function parseAllowCredentials ( ServerRequestInterface $ request ) : bool { // read in the current setting $ item = $ this -> settings [ 'allowCredentials' ] ; // we allow callables to be set (along with strings) so we can vary things upon requests. if ( true === is_callable ( $ item ) ) { // all callbacks are made with the request as the second parameter. $ item = call_user_func ( $ item , $ request ) ; } // if the credentials are still not a boolean, abort. if ( false === is_bool ( $ item ) ) { throw new \ InvalidArgumentException ( 'allowCredentials should be a boolean value' ) ; } // return the boolean credentials setting return $ item ; }
docstring: Parse the allow credentials setting.
  
  @param ServerRequestInterface $request What is the request object? (for callables).
  
  @throws \InvalidArgumentException If the item is missing from settings or is invalid.
  @return boolean
docstring_tokens: Parse the allow credentials setting .