SerialStrategy::handle()   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 15
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
c 0
b 0
f 0
rs 9.4285
cc 3
eloc 7
nc 3
nop 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: toor
5
 * Date: 18.03.18
6
 * Time: 23:01
7
 */
8
9
namespace Symfony\Component\Debug\Extension\Strategies;
10
11
12
use Exception;
13
14
/**
15
 * Class SerialStrategy
16
 * @package Symfony\Component\Debug\Extension\Strategies
17
 */
18
class SerialStrategy extends BaseStrategy {
19
20
    /**
21
     * {@inheritdoc}
22
     */
23
    public function handle(Exception $exception) {
24
25
        while (null !== ($handler = array_shift($this->handlers))) {
26
27
            $isProcessed = $handler->handle($exception);
28
29
            if (false === $isProcessed) {
30
                continue;
31
            }
32
33
            return true;
34
        }
35
36
        return false;
37
    }
38
}
39