Conditions | 5 |
Paths | 5 |
Total Lines | 21 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 5 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | 5 | public function handle(array $record) |
|
35 | { |
||
36 | 5 | if (! $this->handler instanceof HandlerInterface) { |
|
37 | 2 | $this->handler = call_user_func($this->handler, $record, $this); |
|
38 | 2 | if (! $this->handler instanceof HandlerInterface) { |
|
39 | 1 | throw new \RuntimeException("The factory callable should return a HandlerInterface"); |
|
40 | } |
||
41 | 1 | } |
|
42 | |||
43 | 4 | $record = $this->lolifier->lolify($record); |
|
44 | |||
45 | 4 | if ($this->processors) { |
|
46 | 1 | foreach ($this->processors as $processor) { |
|
47 | 1 | $record = call_user_func($processor, $record); |
|
48 | 1 | } |
|
49 | 1 | } |
|
50 | |||
51 | 4 | $this->handler->handle($record); |
|
52 | |||
53 | 4 | return false === $this->bubble; |
|
54 | } |
||
55 | } |
||
56 |
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.