1 | <?php |
||
26 | trait ValueTypeCheckable |
||
27 | { |
||
28 | |||
29 | /** |
||
30 | * Returns if value is a string |
||
31 | * |
||
32 | * @param string $value The value to test |
||
33 | * |
||
34 | * @return bool Is a value a string |
||
35 | */ |
||
36 | 30 | private function isString($value) |
|
40 | |||
41 | /** |
||
42 | * Returns if value is a bool |
||
43 | * |
||
44 | * @param string $value The value to test |
||
45 | * |
||
46 | * @return bool Is a value a bool |
||
47 | */ |
||
48 | 27 | private function isBool($value) |
|
52 | |||
53 | /** |
||
54 | * Returns if the bool is in a string |
||
55 | * |
||
56 | * @param string $value The value to test |
||
57 | * @param bool $quoted_string Is the context a quoted string |
||
58 | * @param int $word_count The amount of words in the sentence |
||
59 | * |
||
60 | * @return bool Is a value a bool in a string |
||
61 | */ |
||
62 | 3 | private function isBoolInString($value, $quoted_string, $word_count) |
|
66 | |||
67 | /** |
||
68 | * Returns if value is number |
||
69 | * |
||
70 | * @param string $value The value to test |
||
71 | * |
||
72 | * @return bool Is a value a number |
||
73 | */ |
||
74 | 24 | private function isNumber($value) |
|
78 | |||
79 | /** |
||
80 | * Returns if value is null |
||
81 | * |
||
82 | * @param string $value The value to test |
||
83 | * |
||
84 | * @return bool Is a value null |
||
85 | */ |
||
86 | 24 | private function isNull($value) |
|
90 | |||
91 | /** |
||
92 | * Returns if variable value is a clone, e.g. BOOL = $(BOOL_1) |
||
93 | * |
||
94 | * @param string $value The value to test |
||
95 | * @param array $matches The matches of the variables |
||
96 | * @param bool $quoted_string If the value is in a quoted string |
||
97 | * |
||
98 | * @return bool Is a value null |
||
99 | */ |
||
100 | 6 | private function isVariableClone($value, $matches, $quoted_string) |
|
104 | } |
||
105 |