Filter   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 20
ccs 0
cts 5
cp 0
rs 10
wmc 3
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __call() 0 10 3
1
<?php
2
3
namespace App\Support\Image\Filters;
4
5
use ErrorException;
6
use Intervention\Image\Filters\FilterInterface;
7
8
abstract class Filter implements FilterInterface
9
{
10
    /**
11
     * Handle dynamic method calls to set property.
12
     *
13
     * @param  string  $method
14
     * @param  array $parameters
15
     * @return $this
16
     */
17
    public function __call($method, $parameters)
18
    {
19
        if (property_exists($this, $method) && count($parameters) > 0) {
20
            $this->{$method} = $parameters[0];
21
22
            return $this;
23
        }
24
25
        throw new ErrorException('Call to undefined method '.get_class($this)."::{$method}()");
26
    }
27
}
28