original_string: public function getChartByName($chartName = '')
      {
          $chartCount = count($this->chartCollection);
          if ($chartCount == 0) {
              return false;
          }
          foreach ($this->chartCollection as $index => $chart) {
              if ($chart->getName() == $chartName) {
                  return $this->chartCollection[$index];
              }
          }
          return false;
      }
code: public function getChartByName($chartName = '')
      {
          $chartCount = count($this->chartCollection);
          if ($chartCount == 0) {
              return false;
          }
          foreach ($this->chartCollection as $index => $chart) {
              if ($chart->getName() == $chartName) {
                  return $this->chartCollection[$index];
              }
          }
          return false;
      }
code_tokens: public function getChartByName ( $ chartName = '' ) { $ chartCount = count ( $ this -> chartCollection ) ; if ( $ chartCount == 0 ) { return false ; } foreach ( $ this -> chartCollection as $ index => $ chart ) { if ( $ chart -> getName ( ) == $ chartName ) { return $ this -> chartCollection [ $ index ] ; } } return false ; }
docstring: Get a chart by name
  
  @param string $chartName Chart name
  @return false|PHPExcel_Chart
  @throws PHPExcel_Exception
docstring_tokens: Get a chart by name