original_string: public function getChartByIndex($index = null)
      {
          $chartCount = count($this->chartCollection);
          if ($chartCount == 0) {
              return false;
          }
          if (is_null($index)) {
              $index = --$chartCount;
          }
          if (!isset($this->chartCollection[$index])) {
              return false;
          }
  
          return $this->chartCollection[$index];
      }
code: public function getChartByIndex($index = null)
      {
          $chartCount = count($this->chartCollection);
          if ($chartCount == 0) {
              return false;
          }
          if (is_null($index)) {
              $index = --$chartCount;
          }
          if (!isset($this->chartCollection[$index])) {
              return false;
          }
  
          return $this->chartCollection[$index];
      }
code_tokens: public function getChartByIndex ( $ index = null ) { $ chartCount = count ( $ this -> chartCollection ) ; if ( $ chartCount == 0 ) { return false ; } if ( is_null ( $ index ) ) { $ index = -- $ chartCount ; } if ( ! isset ( $ this -> chartCollection [ $ index ] ) ) { return false ; } return $ this -> chartCollection [ $ index ] ; }
docstring: Get a chart by its index position
  
  @param string $index Chart index position
  @return false|PHPExcel_Chart
  @throws PHPExcel_Exception
docstring_tokens: Get a chart by its index position