Factory   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getFactories() 0 12 2
1
<?php
2
3
namespace Laravelsms\Sms;
4
5
class Factory
6
{
7
    protected $app;
8
9
    public function __construct($app)
10
    {
11
        $this->app = $app;
12
    }
13
14
    public function getFactories()
15
    {
16
        $agents = $this->app['config']['sms.agents'];
17
18
        $factories = [];
19
20
        foreach ($agents as $key => $value) {
21
            $factories[$key] = __NAMESPACE__ . '\Agents\\' . $value['executableFile'];
22
        }
23
24
        return $factories;
25
    }
26
}
27