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o@]L' K,+u"81% mJAƖ&L4ZXnMIpz.b+ ߙێoթLzh:%g&M^ A)t; MPV e}6>862:SYqH!|y߱~lh<߀G`&XrVio/xxVЎܗzSYȳ$ڲ KuX*S|r^"^Ϙ$\̉$.ق XLnvȍpV^8Kq Ib/ eaa&8/\gW&ЂQP s3_6xE\rQU_2!-Y bAc/6d%1FS[ LLMs쐩k)|mW:m/ns;1vw6 |y#ݾ!y̱-֫a05Zg(Լ92{ƾWbXzq&4`hn.H4̜޼1RP>qn,2zks+D,~m{-X`+s3A܍" TJRE: G}) o [߳A]Njfdi-!^w|pMKEwj?楆1>AR!Eq9/r&w4܂2HH H$;AFu 玲4~;}ǡ_<ۦ}@&t>;~B_ZEG>@ޟèi4qt@.}A8UȽ)+p33g2SKa)d mJ2j@~(RDL*IVn}Stg($values); $conditional->setStyle($this->getStyle()); $conditional->setStopIfTrue($this->getStopIfTrue()); return $conditional; } protected static function unwrapString(string $condition): string { if ((strpos($condition, '"') === 0) && (strpos(strrev($condition), '"') === 0)) { $condition = substr($condition, 1, -1); } return str_replace('""', '"', $condition); } public static function fromConditional(Conditional $conditional, string $cellRange = 'A1'): WizardInterface { if ($conditional->getConditionType() !== Conditional::CONDITION_CELLIS) { throw new Exception('Conditional is not a Cell Value CF Rule conditional'); } $wizard = new self($cellRange); $wizard->style = $conditional->getStyle(); $wizard->stopIfTrue = $conditional->getStopIfTrue(); $wizard->operator = $conditional->getOperatorType(); $conditions = $conditional->getConditions(); foreach ($conditions as $index => $condition) { // Best-guess to try and identify if the text is a string literal, a cell reference or a formula? $operandValueType = Wizard::VALUE_TYPE_LITERAL; if (is_string($condition)) { if (Calculation::keyInExcelConstants($condition)) { $condition = Calculation::getExcelConstants($condition); } elseif (preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF_RELATIVE . '$/i', $condition)) { $operandValueType = Wizard::VALUE_TYPE_CELL; $condition = self::reverseAdjustCellRef($condition, $cellRange); } elseif ( preg_match('/\(\)/', $condition) || preg_match('/' . Calculation::CALCULATION_REGEXP_CELLREF_RELATIVE . '/i', $condition) ) { $operandValueType = Wizard::VALUE_TYPE_FORMULA; $condition = self::reverseAdjustCellRef($condition, $cellRange); } else { $condition = self::unwrapString($condition); } } $wizard->operand($index, $condition, $operandValueType); } return $wizard; } /** * @param string $methodName * @param mixed[] $arguments */ public function __call($methodName, $arguments): self { if (!isset(self::MAGIC_OPERATIONS[$methodName]) && $methodName !== 'and') { throw new Exception('Invalid Operator for Cell Value CF Rule Wizard'); } if ($methodName === 'and') { if (!isset(self::RANGE_OPERATORS[$this->operator])) { throw new Exception('AND Value is only appropriate for range operators'); } // Scrutinizer ignores its own suggested workaround. //$this->operand(1, /** @scrutinizer ignore-type */ ...$arguments); if (count($arguments) < 2) { $this->operand(1, $arguments[0]); } else { $this->operand(1, $arguments[0], $arguments[1]); } return $this; } $this->operator(self::MAGIC_OPERATIONS[$methodName]); //$this->operand(0, ...$arguments); if (count($arguments) < 2) { $this->operand(0, $arguments[0]); } else { $this->operand(0, $arguments[0], $arguments[1]); } return $this; } }