1 | <?php |
||
16 | final class Expressions |
||
17 | { |
||
18 | /** |
||
19 | * @param string $object |
||
20 | * @param string $property |
||
21 | * @return Node\Expr\FuncCall |
||
22 | */ |
||
23 | public static function unsetFunc(string $object, string $property): Node\Expr\FuncCall |
||
29 | |||
30 | /** |
||
31 | * @param string $object |
||
32 | * @param string $property |
||
33 | * @return Node\Expr\FuncCall |
||
34 | */ |
||
35 | public static function issetFunc(string $object, string $property): Node\Expr\FuncCall |
||
41 | |||
42 | /** |
||
43 | * @param string $name |
||
44 | * @param string $object |
||
45 | * @param string $haystackConst |
||
46 | * @return Node\Expr\FuncCall |
||
47 | */ |
||
48 | public static function inConstArrayFunc(string $name, string $object, string $haystackConst): Node\Expr\FuncCall |
||
56 | |||
57 | /** |
||
58 | * @param Node\Expr $condition |
||
59 | * @param Node\Stmt $stmt |
||
60 | * @return Node\Stmt\If_ |
||
61 | */ |
||
62 | public static function throwExceptionOnNull(Node\Expr $condition, Node\Stmt $stmt): Node\Stmt\If_ |
||
74 | |||
75 | /** |
||
76 | * @param string $name |
||
77 | * @return Node\Expr\ConstFetch |
||
78 | */ |
||
79 | public static function const(string $name): Node\Expr\ConstFetch |
||
83 | |||
84 | public static function resolveIntoVar( |
||
97 | |||
98 | /** |
||
99 | * @param string $object |
||
100 | * @param string $property |
||
101 | * @param string $method |
||
102 | * @return Node\Expr\MethodCall |
||
103 | */ |
||
104 | public static function resolveMethodCall(string $object, string $property, string $method): Node\Expr\MethodCall |
||
108 | |||
109 | /** |
||
110 | * @param string $object |
||
111 | * @param string $property |
||
112 | * @return Node\Expr\PropertyFetch |
||
113 | */ |
||
114 | public static function resolvePropertyFetch(string $object, string $property): Node\Expr\PropertyFetch |
||
118 | |||
119 | /** |
||
120 | * @param Node\Expr $expr |
||
121 | * @return Node\Expr\BinaryOp\Identical |
||
122 | */ |
||
123 | public static function equalsFalse(Node\Expr $expr): Node\Expr\BinaryOp\Identical |
||
127 | |||
128 | /** |
||
129 | * @param Node\Expr $expr |
||
130 | * @return Node\Expr\BinaryOp\NotIdentical |
||
131 | */ |
||
132 | public static function notNull(Node\Expr $expr): Node\Expr\BinaryOp\NotIdentical |
||
136 | |||
137 | /** |
||
138 | * @param string $name |
||
139 | * @param array $args |
||
140 | * @param array $attributes |
||
141 | * @return Node\Expr\FuncCall |
||
142 | */ |
||
143 | private static function funcCall(string $name, array $args = [], array $attributes = []): Node\Expr\FuncCall |
||
147 | |||
148 | /** |
||
149 | * @param string $property |
||
150 | * @return \PhpParser\Node\Stmt\Expression |
||
151 | */ |
||
152 | public static function buildCloneExpression(string $property): Node\Stmt\Expression |
||
160 | |||
161 | /** |
||
162 | * @param string $class |
||
163 | * @param string $message |
||
164 | * @return Node\Stmt\Throw_ |
||
165 | */ |
||
166 | private static function throwException(string $class, string $message): Node\Stmt\Throw_ |
||
172 | } |
||
173 |