1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* This software package is licensed under AGPL, Commercial license. |
5
|
|
|
* |
6
|
|
|
* @package maslosoft/addendum |
7
|
|
|
* @licence AGPL, Commercial |
8
|
|
|
* @copyright Copyright (c) Piotr Masełkowski <[email protected]> (Meta container, further improvements, bugfixes) |
9
|
|
|
* @copyright Copyright (c) Maslosoft (Meta container, further improvements, bugfixes) |
10
|
|
|
* @copyright Copyright (c) Jan Suchal (Original version, builder, parser) |
11
|
|
|
* @link https://maslosoft.com/addendum/ - maslosoft addendum |
12
|
|
|
* @link https://code.google.com/p/addendum/ - original addendum project |
13
|
|
|
*/ |
14
|
|
|
|
15
|
|
|
namespace Maslosoft\Addendum\Matcher; |
16
|
|
|
|
17
|
|
|
use Maslosoft\Addendum\Interfaces\Matcher\MatcherInterface; |
18
|
|
|
|
19
|
|
|
class ValueMatcher extends ParallelMatcher implements MatcherInterface |
20
|
|
|
{ |
21
|
|
|
|
22
|
50 |
|
protected function build() |
23
|
|
|
{ |
24
|
50 |
|
$this->add((new ConstantMatcher('true', true))->setPlugins($this->getPlugins())); |
25
|
50 |
|
$this->add((new ConstantMatcher('false', false))->setPlugins($this->getPlugins())); |
26
|
50 |
|
$this->add((new ConstantMatcher('TRUE', true))->setPlugins($this->getPlugins())); |
27
|
50 |
|
$this->add((new ConstantMatcher('FALSE', false))->setPlugins($this->getPlugins())); |
28
|
50 |
|
$this->add((new ConstantMatcher('NULL', null))->setPlugins($this->getPlugins())); |
29
|
50 |
|
$this->add((new ConstantMatcher('null', null))->setPlugins($this->getPlugins())); |
30
|
50 |
|
$this->add((new ClassLiteralMatcher)->setPlugins($this->getPlugins())); |
31
|
50 |
|
$this->add((new StringMatcher)->setPlugins($this->getPlugins())); |
32
|
50 |
|
$this->add((new NumberMatcher)->setPlugins($this->getPlugins())); |
33
|
50 |
|
$this->add((new ArrayMatcher)->setPlugins($this->getPlugins())); |
34
|
50 |
|
$this->add((new ArrayBracketsMatcher)->setPlugins($this->getPlugins())); |
35
|
50 |
|
$this->add((new StaticConstantMatcher)->setPlugins($this->getPlugins())); |
36
|
50 |
|
$this->add((new GlobalConstantMatcher)->setPlugins($this->getPlugins())); |
37
|
50 |
|
$this->add((new NestedAnnotationMatcher)->setPlugins($this->getPlugins())); |
38
|
50 |
|
} |
39
|
|
|
|
40
|
|
|
} |
41
|
|
|
|