|
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
|
|
|
/** |
|
20
|
|
|
* Matches any value, except arrays |
|
21
|
|
|
* |
|
22
|
|
|
* @author Piotr Maselkowski <pmaselkowski at gmail.com> |
|
23
|
|
|
*/ |
|
24
|
|
|
class NonArrayMatcher extends ParallelMatcher implements MatcherInterface |
|
25
|
|
|
{ |
|
26
|
|
|
|
|
27
|
50 |
|
protected function build() |
|
28
|
|
|
{ |
|
29
|
50 |
|
$this->add((new ConstantMatcher('true', true))->setPlugins($this->getPlugins())); |
|
30
|
50 |
|
$this->add((new ConstantMatcher('false', false))->setPlugins($this->getPlugins())); |
|
31
|
50 |
|
$this->add((new ConstantMatcher('TRUE', true))->setPlugins($this->getPlugins())); |
|
32
|
50 |
|
$this->add((new ConstantMatcher('FALSE', false))->setPlugins($this->getPlugins())); |
|
33
|
50 |
|
$this->add((new ConstantMatcher('NULL', null))->setPlugins($this->getPlugins())); |
|
34
|
50 |
|
$this->add((new ConstantMatcher('null', null))->setPlugins($this->getPlugins())); |
|
35
|
50 |
|
$this->add((new ClassLiteralMatcher)->setPlugins($this->getPlugins())); |
|
36
|
50 |
|
$this->add((new StringMatcher)->setPlugins($this->getPlugins())); |
|
37
|
50 |
|
$this->add((new NumberMatcher)->setPlugins($this->getPlugins())); |
|
38
|
50 |
|
$this->add((new StaticConstantMatcher)->setPlugins($this->getPlugins())); |
|
39
|
50 |
|
$this->add((new GlobalConstantMatcher)->setPlugins($this->getPlugins())); |
|
40
|
50 |
|
$this->add((new NestedAnnotationMatcher)->setPlugins($this->getPlugins())); |
|
41
|
50 |
|
} |
|
42
|
|
|
|
|
43
|
|
|
} |
|
44
|
|
|
|