original_string: protected function getWorksheetFromExternalSheet($sheet)
      {
          $worksheetFound = null;
  
          foreach ($this->worksheets as $worksheet) {
              if ($worksheet->getExternalSheet() === $sheet) {
                  $worksheetFound = $worksheet;
                  break;
              }
          }
  
          return $worksheetFound;
      }
code: protected function getWorksheetFromExternalSheet($sheet)
      {
          $worksheetFound = null;
  
          foreach ($this->worksheets as $worksheet) {
              if ($worksheet->getExternalSheet() === $sheet) {
                  $worksheetFound = $worksheet;
                  break;
              }
          }
  
          return $worksheetFound;
      }
code_tokens: protected function getWorksheetFromExternalSheet ( $ sheet ) { $ worksheetFound = null ; foreach ( $ this -> worksheets as $ worksheet ) { if ( $ worksheet -> getExternalSheet ( ) === $ sheet ) { $ worksheetFound = $ worksheet ; break ; } } return $ worksheetFound ; }
docstring: Returns the worksheet associated to the given external sheet.
  
  @param \Box\Spout\Writer\Common\Sheet $sheet
  @return WorksheetInterface|null The worksheet associated to the given external sheet or null if not found.
docstring_tokens: Returns the worksheet associated to the given external sheet .