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

registerServiceProviders()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 4
nc 3
nop 1
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