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 ( 2f11d7...5b5bc3 )
by Arkadiusz
02:30
created

MigrationContainerAware   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
A createMigrationApiInstance() 0 4 1
1
<?php
2
3
namespace Czogori\DamiBundle\Migration;
4
5
use Dami\Migration;
6
use Dami\Migration\MigrationFiles;
7
use Dami\Migration\SchemaTable;
8
use Rentgen\Schema\Info;
9
use Rentgen\Schema\Manipulation;
10
use Symfony\Component\DependencyInjection\ContainerInterface;
11
12
class MigrationContainerAware extends Migration
13
{
14
    private $container;
15
16
    /**
17
     * @param SchemaTable        $schemaTable        description
18
     * @param MigrationFiles     $migrationFiles     description
19
     * @param Manipulation       $schemaManipulation description
20
     * @param Info               $schemaInfo         description
21
     * @param ContainerInterface $container          description
22
     */
23
    public function __construct(
24
        SchemaTable $schemaTable,
25
        MigrationFiles $migrationFiles,
26
        Manipulation $schemaManipulation,
27
        Info $schemaInfo,
28
        ContainerInterface $container)
29
    {
30
        parent::__construct($schemaTable, $migrationFiles, $schemaManipulation, $schemaInfo);
31
        $this->container = $container;
32
    }
33
34
    /**
35
     * Create an instance of migration class.
36
     *
37
     * @param $className Name of migration class.
38
     *
39
     * @return mixed
40
     */
41
    protected function createMigrationApiInstance($className)
42
    {
43
        return new $className($this->schemaManipulation, $this->schemaInfo, $this->container);
0 ignored issues
show
Bug introduced by
The property schemaManipulation does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
Bug introduced by
The property schemaInfo does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
44
    }
45
}
46
47