original_string: public function asDataTable()
      {
          $dataArray = $this->getDataArray();
          $dataArrayTwoLevels = $this->getDataArrayWithTwoLevels();
  
          $subtableByLabel = null;
          if (!empty($dataArrayTwoLevels)) {
              $subtableByLabel = array();
              foreach ($dataArrayTwoLevels as $label => $subTable) {
                  $subtableByLabel[$label] = DataTable::makeFromIndexedArray($subTable);
              }
          }
          return DataTable::makeFromIndexedArray($dataArray, $subtableByLabel);
      }
code: public function asDataTable()
      {
          $dataArray = $this->getDataArray();
          $dataArrayTwoLevels = $this->getDataArrayWithTwoLevels();
  
          $subtableByLabel = null;
          if (!empty($dataArrayTwoLevels)) {
              $subtableByLabel = array();
              foreach ($dataArrayTwoLevels as $label => $subTable) {
                  $subtableByLabel[$label] = DataTable::makeFromIndexedArray($subTable);
              }
          }
          return DataTable::makeFromIndexedArray($dataArray, $subtableByLabel);
      }
code_tokens: public function asDataTable ( ) { $ dataArray = $ this -> getDataArray ( ) ; $ dataArrayTwoLevels = $ this -> getDataArrayWithTwoLevels ( ) ; $ subtableByLabel = null ; if ( ! empty ( $ dataArrayTwoLevels ) ) { $ subtableByLabel = array ( ) ; foreach ( $ dataArrayTwoLevels as $ label => $ subTable ) { $ subtableByLabel [ $ label ] = DataTable :: makeFromIndexedArray ( $ subTable ) ; } } return DataTable :: makeFromIndexedArray ( $ dataArray , $ subtableByLabel ) ; }
docstring: Converts array to a datatable
  
  @return \Piwik\DataTable
docstring_tokens: Converts array to a datatable