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

AbstractHandler::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 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