nfTlWNl rn Ѻq$³*%yNk9SZ/ϺgC#֒Hnn!V5孱4Fϟh^@M,XZM gЪˌԽB!5?uAax3o'7ehpʩ㜆qGi~跅u{1#s Ѝg{:״ZxPe%=+t%3-SU<+Gnpl4̃Y2yd}+$սSxesFcEcGWK9G08=@=ﳸÏ fG53Z9^%;Ƽt%3-:5 >wuf.(U?Kd{#H^ 2YəMC]9;C lim{hGvsqL;'nj%bjs8e t©D>%Gcv/whBe7x0& Zf8^GD%Z5خA`]]݄wtzq&4`hn.H4J ;|bTN#RDyd$,E^y͊&- ί\^=qYKd܉L :999 ~?ՉWCK?ѳ4ӺlFtx;q[]d;߾Ÿ c&d9֐+?n+a5͗o/DZ'zӮ\p x ^)*Tcu,cywj:Ș(ޤ$2.Ta|?ywi=5k&3GK/mPrEbCɃIY~v4.#3N6C(@_:3Z{Ѥ#+Oxb>PЙ w 3: ]7 X\GE}<措'[&m ZNX9Udx)^y mHEA;Zid.hú"Hqn G!E'@=/翥.?~nes^ uZ9_剐%1U!7xBf<{8l{rݷlD)q!fQP)p}+`VF}dw= his->braceDepthMap)) { // this is not an if but we go deeper ++$this->braceDepthMap[$this->pendingStoreKey]; } } public function argumentSeparator(): void { if (!empty($this->pendingStoreKey) && $this->braceDepthMap[$this->pendingStoreKey] === 0) { // We must go to the IF next argument if ($this->conditionMap[$this->pendingStoreKey]) { $this->conditionMap[$this->pendingStoreKey] = false; $this->thenMap[$this->pendingStoreKey] = true; } elseif ($this->thenMap[$this->pendingStoreKey]) { $this->thenMap[$this->pendingStoreKey] = false; $this->elseMap[$this->pendingStoreKey] = true; } elseif ($this->elseMap[$this->pendingStoreKey]) { throw new Exception('Reaching fourth argument of an IF'); } } } /** * @param mixed $value */ public function closingBrace($value): void { if (!empty($this->pendingStoreKey) && $this->braceDepthMap[$this->pendingStoreKey] === -1) { // we are closing an IF( if ($value !== 'IF(') { throw new Exception('Parser bug we should be in an "IF("'); } if ($this->conditionMap[$this->pendingStoreKey]) { throw new Exception('We should not be expecting a condition'); } $this->thenMap[$this->pendingStoreKey] = false; $this->elseMap[$this->pendingStoreKey] = false; --$this->braceDepthMap[$this->pendingStoreKey]; array_pop($this->storeKeysStack); $this->pendingStoreKey = null; } } public function currentCondition(): ?string { return $this->currentCondition; } public function currentOnlyIf(): ?string { return $this->currentOnlyIf; } public function currentOnlyIfNot(): ?string { return $this->currentOnlyIfNot; } private function getUnusedBranchStoreKey(): string { $storeKeyValue = 'storeKey-' . $this->branchStoreKeyCounter; ++$this->branchStoreKeyCounter; return $storeKeyValue; } }