1 | <?php |
||
8 | class BoolEnv implements EnvInterface |
||
9 | { |
||
10 | use MappedEnvTrait; |
||
11 | |||
12 | const MAPPING = [ |
||
13 | 'boolean?' => 'isBool', |
||
14 | 'eqv?' => 'isEqv', |
||
15 | 'eq?' => 'isEq', |
||
16 | 'equal?' => 'isEqual' |
||
17 | ]; |
||
18 | |||
19 | /** |
||
20 | * @SuppressWarnings(PHPMD.ShortVariable) |
||
21 | * @param $a |
||
22 | * @param $b |
||
23 | * @return bool |
||
24 | */ |
||
25 | 1 | public function isEqv($a, $b) |
|
30 | |||
31 | /** |
||
32 | * @SuppressWarnings(PHPMD.ShortVariable) |
||
33 | * @param $a |
||
34 | * @param $b |
||
35 | * @return bool |
||
36 | */ |
||
37 | 1 | public function isEq($a, $b) |
|
41 | |||
42 | /** |
||
43 | * @SuppressWarnings(PHPMD.ShortVariable) |
||
44 | * @param $a |
||
45 | * @param $b |
||
46 | * @return bool |
||
47 | */ |
||
48 | 1 | public function isEqual($a, $b) |
|
52 | |||
53 | /** |
||
54 | * @param $arg |
||
55 | * @return bool |
||
56 | */ |
||
57 | 1 | public function not($arg): bool |
|
61 | |||
62 | /** |
||
63 | * @param $arg |
||
64 | * @return bool |
||
65 | */ |
||
66 | 1 | public function isBool($arg) |
|
70 | } |
||
71 |