AbstractHandler   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 36
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A parser() 0 4 1
run() 0 1 ?
1
<?php
2
3
namespace Inbounder;
4
5
use Inbounder\Parsers\Contracts\ParserInterface;
6
7
abstract class AbstractHandler
8
{
9
    /**
10
     * @var ParserInterface
11
     */
12
    protected $parser;
13
14
    /**
15
     * Constructor.
16
     *
17
     * @param ParserInterface $parser
18
     */
19
    public function __construct(ParserInterface $parser)
20
    {
21
        $this->parser = $parser;
22
    }
23
24
    /**
25
     * Access the parser.
26
     *
27
     * @return ParserInterface
28
     */
29
    public function parser()
30
    {
31
        return $this->parser;
32
    }
33
34
    /**
35
     * Run the handler.
36
     *
37
     * @param mixed $parsed
38
     *
39
     * @return mixed
40
     */
41
    abstract public function run($parsed);
42
}
43