1 | <?php |
||
46 | class Expression implements NodeInterface |
||
47 | { |
||
48 | private $baseExpression; |
||
49 | |||
50 | /** |
||
51 | * Returns the base expression (the string that generated this expression). |
||
52 | * |
||
53 | * @return string |
||
54 | */ |
||
55 | public function getBaseExpression() |
||
59 | |||
60 | /** |
||
61 | * Sets the base expression (the string that generated this expression). |
||
62 | * |
||
63 | * @param string $baseExpression |
||
64 | */ |
||
65 | public function setBaseExpression($baseExpression) |
||
69 | |||
70 | private $subTree; |
||
71 | |||
72 | public function getSubTree() |
||
76 | |||
77 | /** |
||
78 | * Sets the subtree. |
||
79 | * |
||
80 | * @Important |
||
81 | * |
||
82 | * @param array<NodeInterface>|NodeInterface $subTree |
||
83 | */ |
||
84 | public function setSubTree($subTree) |
||
89 | |||
90 | private $alias; |
||
91 | |||
92 | public function getAlias() |
||
96 | |||
97 | /** |
||
98 | * Sets the alias. |
||
99 | * |
||
100 | * @Important |
||
101 | * |
||
102 | * @param string $alias |
||
103 | */ |
||
104 | public function setAlias($alias) |
||
108 | |||
109 | private $direction; |
||
110 | |||
111 | public function getDiretion() |
||
115 | |||
116 | /** |
||
117 | * Sets the direction. |
||
118 | * |
||
119 | * @Important |
||
120 | * |
||
121 | * @param string $direction |
||
122 | */ |
||
123 | public function setDirection($direction) |
||
127 | |||
128 | private $brackets = false; |
||
129 | |||
130 | /** |
||
131 | * Returns true if the expression is between brackets. |
||
132 | * |
||
133 | * @return bool |
||
134 | */ |
||
135 | public function hasBrackets() |
||
139 | |||
140 | /** |
||
141 | * Sets to true if the expression is between brackets. |
||
142 | * |
||
143 | * @Important |
||
144 | * |
||
145 | * @param bool $brackets |
||
146 | */ |
||
147 | public function setBrackets($brackets) |
||
151 | |||
152 | /** |
||
153 | * Returns a Mouf instance descriptor describing this object. |
||
154 | * |
||
155 | * @param MoufManager $moufManager |
||
156 | * |
||
157 | * @return MoufInstanceDescriptor |
||
158 | */ |
||
159 | public function toInstanceDescriptor(MoufManager $moufManager) |
||
170 | |||
171 | /** |
||
172 | * Renders the object as a SQL string. |
||
173 | * |
||
174 | * @param Connection $dbConnection |
||
175 | * @param array $parameters |
||
176 | * @param number $indent |
||
177 | * @param int $conditionsMode |
||
178 | * |
||
179 | * @return string |
||
180 | */ |
||
181 | public function toSql(array $parameters = array(), Connection $dbConnection = null, $indent = 0, $conditionsMode = self::CONDITION_APPLY) |
||
197 | |||
198 | /** |
||
199 | * Walks the tree of nodes, calling the visitor passed in parameter. |
||
200 | * |
||
201 | * @param VisitorInterface $visitor |
||
202 | */ |
||
203 | public function walk(VisitorInterface $visitor) |
||
223 | } |
||
224 |
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:
Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.