Completed
Push — master ( 59f74a...c12486 )
by Mahmoud
03:24
created

ContainersServiceProviderTrait   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A registerServiceProviders() 0 8 3
1
<?php
2
3
namespace App\Port\Provider\Traits;
4
5
use App;
6
7
/**
8
 * Class ContainersServiceProviderTrait.
9
 *
10
 * @author  Mahmoud Zalt <[email protected]>
11
 */
12
trait ContainersServiceProviderTrait
13
{
14
15
    /**
16
     * register an array of providers.
17
     *
18
     * @param array $providers
19
     */
20
    public function registerServiceProviders(array $providers)
21
    {
22
        foreach ($providers as $provider) {
23
            if (class_exists($provider)) {
24
                App::register($provider);
25
            }
26
        }
27
    }
28
29
}
30