modifs.mineures sans commentaires
This commit is contained in:
		
							parent
							
								
									089e4872aa
								
							
						
					
					
						commit
						c5c4119e69
					
				@ -58,7 +58,7 @@ class ScalarWrapper extends Wrapper {
 | 
				
			|||||||
    $this->input = $input;
 | 
					    $this->input = $input;
 | 
				
			||||||
    $this->valueKey = $valueKey;
 | 
					    $this->valueKey = $valueKey;
 | 
				
			||||||
    $this->type = null;
 | 
					    $this->type = null;
 | 
				
			||||||
    $this->analyzeExtractParse();
 | 
					    $this->analyze();
 | 
				
			||||||
    if ($verifix ?? $this->verifix) $this->verifix();
 | 
					    if ($verifix ?? $this->verifix) $this->verifix();
 | 
				
			||||||
    return $this;
 | 
					    return $this;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@ -73,7 +73,7 @@ class ScalarWrapper extends Wrapper {
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /** analyser la valeur et résoudre son type */
 | 
					  /** analyser la valeur et résoudre son type */
 | 
				
			||||||
  function _analyze(AnalyzerContext $context): int {
 | 
					  protected function analyze0(AnalyzerContext $context): int {
 | 
				
			||||||
    /** @var ScalarSchema $schema */
 | 
					    /** @var ScalarSchema $schema */
 | 
				
			||||||
    $schema = $context->schema;
 | 
					    $schema = $context->schema;
 | 
				
			||||||
    $input = $context->input;
 | 
					    $input = $context->input;
 | 
				
			||||||
@ -164,7 +164,7 @@ class ScalarWrapper extends Wrapper {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  function analyzeExtractParse(): int {
 | 
					  protected function analyze(): int {
 | 
				
			||||||
    $schema = $this->schema;
 | 
					    $schema = $this->schema;
 | 
				
			||||||
    $input = $this->input;
 | 
					    $input = $this->input;
 | 
				
			||||||
    $valueKey = $this->valueKey;
 | 
					    $valueKey = $this->valueKey;
 | 
				
			||||||
@ -175,7 +175,7 @@ class ScalarWrapper extends Wrapper {
 | 
				
			|||||||
    /** @var func $analyzerFunc */
 | 
					    /** @var func $analyzerFunc */
 | 
				
			||||||
    $analyzerFunc = $schema->analyzerFunc;
 | 
					    $analyzerFunc = $schema->analyzerFunc;
 | 
				
			||||||
    if ($analyzerFunc !== null) $what = $analyzerFunc->invoke([$context]);
 | 
					    if ($analyzerFunc !== null) $what = $analyzerFunc->invoke([$context]);
 | 
				
			||||||
    else $what = $this->_analyze($context);
 | 
					    else $what = $this->analyze0($context);
 | 
				
			||||||
    if ($what !== ref_analyze::STRING) return $what;
 | 
					    if ($what !== ref_analyze::STRING) return $what;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    $value = $context->value;
 | 
					    $value = $context->value;
 | 
				
			||||||
@ -286,14 +286,14 @@ class ScalarWrapper extends Wrapper {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  function set($value, ?bool $verifix=null): ScalarWrapper {
 | 
					  function set($value, ?bool $verifix=null): ScalarWrapper {
 | 
				
			||||||
    $this->input->set($value, $this->valueKey);
 | 
					    $this->input->set($value, $this->valueKey);
 | 
				
			||||||
    $this->analyzeExtractParse();
 | 
					    $this->analyze();
 | 
				
			||||||
    if ($verifix ?? $this->verifix) $this->verifix();
 | 
					    if ($verifix ?? $this->verifix) $this->verifix();
 | 
				
			||||||
    return $this;
 | 
					    return $this;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  function unset(?bool $verifix=null): ScalarWrapper {
 | 
					  function unset(?bool $verifix=null): ScalarWrapper {
 | 
				
			||||||
    $this->input->unset($this->valueKey);
 | 
					    $this->input->unset($this->valueKey);
 | 
				
			||||||
    $this->analyzeExtractParse();
 | 
					    $this->analyze();
 | 
				
			||||||
    if ($verifix ?? $this->verifix) $this->verifix();
 | 
					    if ($verifix ?? $this->verifix) $this->verifix();
 | 
				
			||||||
    return $this;
 | 
					    return $this;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user