Passed
Push — master ( f4bcab...7d4b66 )
by Maxim
07:25 queued 20s
created

TokenProcessor   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 36
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
/**
3
 * This file is a part of "Axessors" library.
4
 *
5
 * @author <[email protected]>
6
 * @license GPL
7
 */
8
9
namespace NoOne4rever\Axessors;
10
11
/**
12
 * Class TokenProcessor.
13
 *
14
 * Processes token string and makes input and output data.
15
 *
16
 * @package NoOne4rever\Axessors
17
 */
18
abstract class TokenProcessor
19
{
20
    /** @var string tokens that belong to setter */
21
    protected $input;
22
    /** @var string tokens that belong to getter */
23
    protected $output;
24
    /** @var string class namespace */
25
    protected $namespace;
26
27
    /**
28
     * TokenProcessor constructor.
29
     *
30
     * @param string $in input token
31
     * @param string $out output token
32
     * @param string $ns class namespace
33
     */
34
    public function __construct(string $in, string $out, string $ns)
35
    {
36
        $this->input = $in;
37
        $this->output = $out;
38
        $this->namespace = $ns;
39
    }
40
41
    /**
42
     * Processes tokens that belong to setter.
43
     *
44
     * @return array token data for setter
45
     */
46
    abstract public function processInputData(): array;
47
48
    /**
49
     * Processes tokens that belong to getter.
50
     *
51
     * @return array token data for getter
52
     */
53
    abstract public function processOutputData(): array;
54
}