original_string: private function parsePagination(\SimpleXMLElement $xmldata)
      {
          $pagination = new Pagination();
          $paginated = false;
  
          foreach ($xmldata->children('opensearch', true) as $key => $value) {
              switch ($key) {
                  case 'totalResults':
                      $pagination->setNumberOfItem((int) $value);
                      $paginated = true;
                      break;
                  case 'itemsPerPage':
                      $pagination->setItemsPerPage((int) $value);
                      $paginated = true;
                      break;
              }
          }
  
          return $paginated ? $pagination : null;
      }
code: private function parsePagination(\SimpleXMLElement $xmldata)
      {
          $pagination = new Pagination();
          $paginated = false;
  
          foreach ($xmldata->children('opensearch', true) as $key => $value) {
              switch ($key) {
                  case 'totalResults':
                      $pagination->setNumberOfItem((int) $value);
                      $paginated = true;
                      break;
                  case 'itemsPerPage':
                      $pagination->setItemsPerPage((int) $value);
                      $paginated = true;
                      break;
              }
          }
  
          return $paginated ? $pagination : null;
      }
code_tokens: private function parsePagination ( \ SimpleXMLElement $ xmldata ) { $ pagination = new Pagination ( ) ; $ paginated = false ; foreach ( $ xmldata -> children ( 'opensearch' , true ) as $ key => $ value ) { switch ( $ key ) { case 'totalResults' : $ pagination -> setNumberOfItem ( ( int ) $ value ) ; $ paginated = true ; break ; case 'itemsPerPage' : $ pagination -> setItemsPerPage ( ( int ) $ value ) ; $ paginated = true ; break ; } } return $ paginated ? $ pagination : null ; }
docstring: Met en forme la pagination si elle existe
  
  @param \SimpleXMLElement $xmldata
  
  @return Pagination|null null si elle n'existe pas
docstring_tokens: Met en forme la pagination si elle existe