original_string: protected function createSchemaFromHeader($header)
      {
          $schema = [
              'name'        => $this->resource,
              'label'       => ucfirst($this->resource),
              'description' => 'Table created from CSV data import',
              'plural'      => ucfirst(str_plural($this->resource)),
              'field'       => []
          ];
  
          foreach ($header as $h) {
              $schema['field'][] = [
                  'name'       => $h,
                  'type'       => 'string',
                  'default'    => null,
                  'required'   => false,
                  'allow_null' => true
              ];
          }
  
          return $schema;
      }
code: protected function createSchemaFromHeader($header)
      {
          $schema = [
              'name'        => $this->resource,
              'label'       => ucfirst($this->resource),
              'description' => 'Table created from CSV data import',
              'plural'      => ucfirst(str_plural($this->resource)),
              'field'       => []
          ];
  
          foreach ($header as $h) {
              $schema['field'][] = [
                  'name'       => $h,
                  'type'       => 'string',
                  'default'    => null,
                  'required'   => false,
                  'allow_null' => true
              ];
          }
  
          return $schema;
      }
code_tokens: protected function createSchemaFromHeader ( $ header ) { $ schema = [ 'name' => $ this -> resource , 'label' => ucfirst ( $ this -> resource ) , 'description' => 'Table created from CSV data import' , 'plural' => ucfirst ( str_plural ( $ this -> resource ) ) , 'field' => [ ] ] ; foreach ( $ header as $ h ) { $ schema [ 'field' ] [ ] = [ 'name' => $ h , 'type' => 'string' , 'default' => null , 'required' => false , 'allow_null' => true ] ; } return $ schema ; }
docstring: Creates table schema definition based on CSV header
  
  @param array $header
  
  @return array
docstring_tokens: Creates table schema definition based on CSV header