Proxy   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 17
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __call() 0 7 2
1
<?php
2
/* (c) Anton Medvedev <[email protected]>
3
 *
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 */
7
8
namespace Deployer\Support;
9
10
class Proxy
11
{
12
    private $objects;
13
14 10
    public function __construct(array $objects)
15
    {
16 10
        $this->objects = $objects;
17 10
    }
18
19 9
    public function __call($name, $arguments)
20
    {
21 9
        foreach ($this->objects as $object) {
22 9
            $object->$name(...$arguments);
23
        }
24 9
        return $this;
25
    }
26
}
27