Completed
Push — master ( dd0453...7030c1 )
by Edgar
02:30
created

AbstractHandler   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 35
rs 10

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
     * @return Mixed
39
     */
40
    public abstract function run($parsed);
0 ignored issues
show
Coding Style introduced by
The abstract declaration must precede the visibility declaration
Loading history...
41
}
42