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.

m150914_140745_youtube_AddHashTable   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 21
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A safeUp() 0 13 1
1
<?php
2
namespace Craft;
3
4
/**
5
 * The class name is the UTC timestamp in the format of mYYMMDD_HHMMSS_pluginHandle_migrationName
6
 */
7
class m150914_140745_youtube_AddHashTable extends BaseMigration
8
{
9
    /**
10
     * Any migration code in here is wrapped inside of a transaction.
11
     *
12
     * @return bool
13
     */
14
    public function safeUp()
15
    {
16
        // Create the craft_youtube_hashes table
17
        craft()->db->createCommand()->createTable('youtube_hashes', array(
18
            'youtubeId' => array('required' => true),
19
            'hash'      => array('required' => true),
20
        ), null, true);
21
22
        // Add indexes to craft_youtube_hashes
23
        craft()->db->createCommand()->createIndex('youtube_hashes', 'hash', true);
24
25
        return true;
26
    }
27
}
28