TokenProcessor   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 36
ccs 5
cts 5
cp 1
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 2
    public function __construct(string $in, string $out, string $ns)
35
    {
36 2
        $this->input = $in;
37 2
        $this->output = $out;
38 2
        $this->namespace = $ns;
39 2
    }
40
41
    /**
42
     * Processes tokens that belong to setter.
43
     *
44
     * @return array token data for setter
45
     */
46
    abstract public function processInputData();
47
48
    /**
49
     * Processes tokens that belong to getter.
50
     *
51
     * @return array token data for getter
52
     */
53
    abstract public function processOutputData();
54
}