Completed
Push — master ( db8578...85f9c3 )
by Kirill
10:30
created

BaseRules::addFile()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
crap 2
1
<?php
2
/**
3
 * This file is part of Railt package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
declare(strict_types=1);
9
10
namespace Railt\Compiler\Reader;
11
12
use Railt\Compiler\Exception\GrammarException;
13
use Railt\Io\Readable;
14
use Railt\Parser\Ast\Delegate;
15
use Railt\Parser\Ast\Rule;
16
use Railt\Parser\Ast\RuleInterface;
17
use Railt\Parser\Rule\Production;
18
use Railt\Parser\Rule\Symbol;
19
use Railt\Parser\Rule\Terminal;
20
21
/**
22
 * Class BaseRules
23
 */
24
abstract class BaseRules implements ProvideRules
25
{
26
    /**
27
     * @var array
28
     */
29
    private $rules = [];
30
31
    /**
32
     * @param Symbol $rule
33
     */
34
    protected function add(Symbol $rule): void
35
    {
36
        $this->rules[] = $rule;
37
    }
38
39
    public function all(): array
40
    {
41
        throw new \LogicException(__METHOD__ . ' not implemented yet');
42
    }
43
44
    public function getDelegates(): iterable
45
    {
46
        throw new \LogicException(__METHOD__ . ' not implemented yet');
47
    }
48
49
    public function getFile(string $rule): Readable
50
    {
51
        throw new \LogicException(__METHOD__ . ' not implemented yet');
52
    }
53
54
    public function has(string $rule): bool
55
    {
56
        throw new \LogicException(__METHOD__ . ' not implemented yet');
57
    }
58
59
    public function isKeep(string $rule): bool
60
    {
61
        throw new \LogicException(__METHOD__ . ' not implemented yet');
62
    }
63
}
64