Completed
Push — master ( 60840d...857394 )
by Mahmoud
03:05
created

AutoLoaderTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 7

Importance

Changes 0
Metric Value
wmc 2
lcom 2
cbo 7
dl 0
loc 26
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A bootLoaders() 0 8 1
A registerLoaders() 0 4 1
1
<?php
2
3
namespace App\Port\Loader;
4
5
use App\Port\Loader\Loaders\AliasesLoaderTrait;
6
use App\Port\Loader\Loaders\ConfigsLoaderTrait;
7
use App\Port\Loader\Loaders\ConsolesLoaderTrait;
8
use App\Port\Loader\Loaders\FactoriesLoaderTrait;
9
use App\Port\Loader\Loaders\MigrationsLoaderTrait;
10
use App\Port\Loader\Loaders\ProvidersLoaderTrait;
11
use App\Port\Loader\Loaders\ViewsLoaderTrait;
12
13
/**
14
 * Class AutoLoaderTrait.
15
 *
16
 * @author  Mahmoud Zalt <[email protected]>
17
 */
18
trait AutoLoaderTrait
19
{
20
    use ConfigsLoaderTrait;
21
    use MigrationsLoaderTrait;
22
    use ViewsLoaderTrait;
23
    use ProvidersLoaderTrait;
24
    use FactoriesLoaderTrait;
25
    use ConsolesLoaderTrait;
26
    use AliasesLoaderTrait;
27
28
    public function bootLoaders()
29
    {
30
        $this->runConfigsAutoLoader();
31
        $this->runProvidersAutoLoader();
32
        $this->runMigrationsAutoLoader();
33
        $this->runViewsAutoLoader();
34
        $this->runConsolesAutoLoader();
35
    }
36
37
    public function registerLoaders()
38
    {
39
        $this->loadPortInternalAliases($this->aliases);
0 ignored issues
show
Bug introduced by
The property aliases 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...
40
    }
41
42
43
}
44