CheckTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 3
c 1
b 0
f 0
dl 0
loc 6
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A check_method() 0 4 2
1
<?php
2
3
namespace HnrAzevedo\Filter;
4
5
use Exception;
6
7
trait CheckTrait{
8
9
    protected function check_method(string $method)
10
    {
11
        if(!method_exists($this, $method)){
12
            throw new Exception("Filter {$method} not found in ".get_class($this).'.');
13
        }
14
    }
15
16
}