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 ( 7b7125...1c1fdc )
by Ryun
02:50
created

SociableDatabaseSeeder::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 21
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 21
rs 9.3142
cc 1
eloc 13
nc 1
nop 0
1
<?php
2
3
use Illuminate\Database\Eloquent\Model;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Seeder;
6
7
class SociableDatabaseSeeder extends Seeder
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
8
{
9
    /**
10
     * Run the database seeds.
11
     *
12
     * @return void
13
     */
14
    public function run()
15
    {
16
        Model::unguard();
17
        $output = $this->command->getOutput();
18
        $output->title('Starting Database Seed');
19
20
        //---------------- Create user database -------------
21
        Schema::create('users', function(Blueprint $table) {
22
            $table->increments('id');
23
            $table->string('name');
24
            $table->string('email')->unique();
25
            $table->string('password');
26
            $table->rememberToken();
27
            $table->timestamps();
28
        });
29
30
        //---------------- Populate users -------------
31
        $users = factory(Humweb\Sociable\Tests\Stubs\User::class, 3)->create();
0 ignored issues
show
Unused Code introduced by
$users is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
32
33
        Model::reguard();
34
    }
35
36
}
37