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.

TestCase::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 16
rs 9.4285
cc 1
eloc 11
nc 1
nop 0
1
<?php
2
namespace juniorb2ss\EloquentUuid\Tests;
3
4
use Faker\Factory;
5
use Orchestra\Testbench\TestCase as BaseTestCase;
6
7
abstract class TestCase extends BaseTestCase
8
{
9
    /**
10
     * Setup the test environment.
11
     */
12
    public function setUp()
13
    {
14
        parent::setUp();
15
16
        $this->loadLaravelMigrations(['--database' => 'testing']);
17
        $this->loadMigrationsFrom([
18
            '--database' => 'testing',
19
            '--path' => '../../../../tests/migrations'
20
        ]);
21
        $this->faker = Factory::create();
0 ignored issues
show
Bug introduced by
The property faker 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...
22
        $this->user = User::create([
0 ignored issues
show
Bug introduced by
The property user 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...
23
            'name'       => $this->faker->name,
24
            'email'      => $this->faker->email,
25
            'password'   => $this->faker->password,
26
        ]);
27
    }
28
29
    /**
30
     * Define environment setup.
31
     *
32
     * @param  \Illuminate\Foundation\Application  $app
33
     *
34
     * @return void
35
     */
36
    protected function getEnvironmentSetUp($app)
37
    {
38
        $app['config']->set('database.default', 'testing');
39
    }
40
}
41