original_string: protected function getCurrentPage(array $pages, array $slugsArray): Page
      {
          if (count($pages) === count($slugsArray)) {
              $currentPage = $this->getFinalTreeElement($slugsArray, $pages);
          } else {
              $currentPage = current($pages);
          }
  
          return $currentPage;
      }
code: protected function getCurrentPage(array $pages, array $slugsArray): Page
      {
          if (count($pages) === count($slugsArray)) {
              $currentPage = $this->getFinalTreeElement($slugsArray, $pages);
          } else {
              $currentPage = current($pages);
          }
  
          return $currentPage;
      }
code_tokens: protected function getCurrentPage ( array $ pages , array $ slugsArray ) : Page { if ( count ( $ pages ) === count ( $ slugsArray ) ) { $ currentPage = $ this -> getFinalTreeElement ( $ slugsArray , $ pages ) ; } else { $ currentPage = current ( $ pages ) ; } return $ currentPage ; }
docstring: Retrieves the current page based on page list and entered slugs.
  
  @param Page[] $pages
  @param array  $slugsArray
  
  @return Page
docstring_tokens: Retrieves the current page based on page list and entered slugs .