Completed
Push — master ( b3b6a4...b2f402 )
by Sergi Tur
03:43
created

Migrate::migrate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Acacha\Llum\Traits;
4
5
trait Migrate
6
{
7
    /**
8
     * Migrate database with php artisan migrate.
9
     */
10
    protected function migrate()
11
    {
12
        $this->output->writeln('<info>Running php artisan migrate...</info>');
0 ignored issues
show
Bug introduced by
The property output 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...
13
        passthru('php artisan migrate');
14
    }
15
}
16