private function hasRequest($params, $variables, $i = null) : array
  {
    foreach($params as $key => $param) {
      $class = '\\' . $param->getType();
      if (class_exists($class) && new $class() instanceof Request) {
        $i = $key;
      }
    }

    if ($i !== null) $variables = $this->insert($variables, $i, 'Request');
    return $variables;
  }
private function hasRequest($params, $variables, $i = null) : array
  {
    foreach($params as $key => $param) {
      $class = '\\' . $param->getType();
      if (class_exists($class) && new $class() instanceof Request) {
        $i = $key;
      }
    }

    if ($i !== null) $variables = $this->insert($variables, $i, 'Request');
    return $variables;
  }
private function hasRequest ( $ params , $ variables , $ i = null ) : array { foreach ( $ params as $ key => $ param ) { $ class = '\\' . $ param -> getType ( ) ; if ( class_exists ( $ class ) && new $ class ( ) instanceof Request ) { $ i = $ key ; } } if ( $ i !== null ) $ variables = $ this -> insert ( $ variables , $ i , 'Request' ) ; return $ variables ; }
Check if the request class exists and insert it if it doesn't

@param mixed $params
@param mixed $variables
@param mixed $i
@return array
Check if the request class exists and insert it if it doesn t