8000 [Validator] Improved inline documentation of RecursiveContextualValid… · symfony/symfony@7bc952d · GitHub
[go: up one dir, main page]

Skip to content

Commit 7bc952d

Browse files
committed
[Validator] Improved inline documentation of RecursiveContextualValidator
1 parent 166d71a commit 7bc952d

File tree

3 files changed

+319
-223
lines changed

3 files changed

+319
-223
lines changed

src/Symfony/Component/Validator/Context/ExecutionContext.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ class ExecutionContext implements ExecutionContextInterface
7171
*/
7272
private $value;
7373

74+
/**
75+
* The currently validated object.
76+
*
77+
* @var object|null
78+
*/
79+
private $object;
80+
7481
/**
7582
* The property path leading to the current value.
7683
*
@@ -132,9 +139,10 @@ public function __construct(ValidatorInterface $validator, $root, TranslatorInte
132139
/**
133140
* {@inheritdoc}
134141
*/
135-
public function setNode($value, MetadataInterface $metadata = null, $propertyPath)
142+
public function setNode($value, $object, MetadataInterface $metadata, $propertyPath)
136143
{
137144
$this->value = $value;
145+
$this->object = $object;
138146
$this->metadata = $metadata;
139147
$this->propertyPath = (string) $propertyPath;
140148
}

src/Symfony/Component/Validator/Context/ExecutionContextInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,14 @@ public function getValidator();
103103
* Sets the currently validated value.
104104
*
105105
* @param mixed $value The validated value
106+
* @param object|null $object The currently validated object
106107
* @param MetadataInterface $metadata The validation metadata
107108
* @param string $propertyPath The property path to the current value
108109
*
109110
* @internal Used by the validator engine. Should not be called by user
110111
* code.
111112
*/
112-
public function setNode($value, MetadataInterface $metadata = null, $propertyPath);
113+
public function setNode($value, $object, MetadataInterface $metadata, $propertyPath);
113114

114115
/**
115116
* Sets the currently validated group.

0 commit comments

Comments
 (0)
0