modifs.mineures sans commentaires

This commit is contained in:
Jephté Clain 2025-03-06 16:29:18 +04:00
parent 089e4872aa
commit c5c4119e69

View File

@ -58,7 +58,7 @@ class ScalarWrapper extends Wrapper {
$this->input = $input;
$this->valueKey = $valueKey;
$this->type = null;
$this->analyzeExtractParse();
$this->analyze();
if ($verifix ?? $this->verifix) $this->verifix();
return $this;
}
@ -73,7 +73,7 @@ class ScalarWrapper extends Wrapper {
}
/** analyser la valeur et résoudre son type */
function _analyze(AnalyzerContext $context): int {
protected function analyze0(AnalyzerContext $context): int {
/** @var ScalarSchema $schema */
$schema = $context->schema;
$input = $context->input;
@ -164,7 +164,7 @@ class ScalarWrapper extends Wrapper {
}
}
function analyzeExtractParse(): int {
protected function analyze(): int {
$schema = $this->schema;
$input = $this->input;
$valueKey = $this->valueKey;
@ -175,7 +175,7 @@ class ScalarWrapper extends Wrapper {
/** @var func $analyzerFunc */
$analyzerFunc = $schema->analyzerFunc;
if ($analyzerFunc !== null) $what = $analyzerFunc->invoke([$context]);
else $what = $this->_analyze($context);
else $what = $this->analyze0($context);
if ($what !== ref_analyze::STRING) return $what;
$value = $context->value;
@ -286,14 +286,14 @@ class ScalarWrapper extends Wrapper {
function set($value, ?bool $verifix=null): ScalarWrapper {
$this->input->set($value, $this->valueKey);
$this->analyzeExtractParse();
$this->analyze();
if ($verifix ?? $this->verifix) $this->verifix();
return $this;
}
function unset(?bool $verifix=null): ScalarWrapper {
$this->input->unset($this->valueKey);
$this->analyzeExtractParse();
$this->analyze();
if ($verifix ?? $this->verifix) $this->verifix();
return $this;
}