GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — 7.x-1.x ( 9e29a0...ca9ee1 )
by Devin
07:35
created

DFToolsCommerceProductFPP::__construct()   B

Complexity

Conditions 3
Paths 4

Size

Total Lines 43
Code Lines 26

Duplication

Lines 0
Ratio 0 %

Importance

Changes 4
Bugs 0 Features 1
Metric Value
cc 3
eloc 26
c 4
b 0
f 1
nc 4
nop 1
dl 0
loc 43
rs 8.8571
1
<?php
2
3
/**
4
 * @file
5
 *  Migrations for Fieldable Panel Panes.
6
 */
7
8
class DFToolsCommerceProductFPP extends Migration {
9
10
  public function __construct($arguments) {
11
    parent::__construct($arguments);
12
    $this->description = t('Import Commerce Product FPPs.');
13
14
    // Create a map object for tracking the relationships between source rows
15
    $this->map = new MigrateSQLMap($this->machineName,
16
      array(
17
        'Title' => array(
18
          'type' => 'varchar',
19
          'length' => 255,
20
          'not null' => FALSE,
21
        )
22
      ),
23
      array(
24
        'title' => array(
25
          'type' => 'varchar',
26
          'length' => 255,
27
          'not null' => FALSE,
28
        )
29
      )
30
    );
31
32
    // Create a MigrateSource object.
33
    if (isset($arguments['path'])) {
34
      $import_path = $arguments['path'];
35
    }
36
    else {
37
      $import_path = drupal_get_path('module', 'df_tools_commerce_product') . '/import/df_tools_commerce.fpp.commerce_product.csv';
38
    }
39
    $this->source = new MigrateSourceCSV($import_path, array(), array('header_rows' => 1));
40
    $this->destination = new MigrateDestinationFieldablePanelsPanes('commerce_product');
41
42
    $source_migration = isset($arguments['source_migration']) ? $arguments['source_migration'] : 'DemoFrameworkBaseCommerceNodes';
43
    $this->addFieldMapping('field_commerce_product_reference', 'Product')->separator(',')->sourceMigration($source_migration);;
44
45
    $this->addFieldMapping('title', 'Title');
46
    $this->addFieldMapping('category', 'Category')->defaultValue('Reusable panes');
47
48
    // Add optional mapping for UUID
49
    $this->addFieldMapping('uuid', 'UUID');
50
51
    $this->addFieldMapping('reusable', 'Reusable')->defaultValue(TRUE);
52
  }
53
54
}
55