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 — master ( 0e2603...abe0f1 )
by Robert
03:18
created

ReleaseCounter::getCreateDate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Migrations;
4
5
use Gruberro\MongoDbMigrations;
6
7
class ReleaseCounter implements MongoDbMigrations\MigrationInterface, MongoDbMigrations\RunAlwaysMigrationInterface
8
{
9
    /**
10
     * {@inheritdoc}
11
     */
12
    public function getId()
13
    {
14
        return 'release-counter';
15
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20
    public function getCreateDate()
21
    {
22
        return new \DateTime('2016-01-01 00:00:00');
23
    }
24
25
    /**
26
     * Create one record per release
27
     *
28
     * {@inheritdoc}
29
     */
30
    public function execute(\MongoDB $db)
31
    {
32
        $releaseCollection = $db->selectCollection('releases');
33
        $releaseCollection->insert(['created' => new \MongoDate()]);
34
    }
35
}
36