You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Symfony/Component/PropertyAccess/PropertyAccessor.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -160,12 +160,12 @@ private function &readPropertiesUntil(&$objectOrArray, PropertyPathInterface $pr
160
160
*
161
161
* @return mixed The value of the key
162
162
*
163
-
* @throws NoSuchPropertyException If the array does not implement \ArrayAccess or it is not an array
163
+
* @throws NoSuchIndexException If the array does not implement \ArrayAccess or it is not an array
164
164
*/
165
165
privatefunction &readIndex(&$array, $index)
166
166
{
167
167
if (!$arrayinstanceof \ArrayAccess && !is_array($array)) {
168
-
thrownewNoSuchPropertyException(sprintf('Index "%s" cannot be read from object of type "%s" because it doesn\'t implement \ArrayAccess', $index, get_class($array)));
168
+
thrownewNoSuchIndexException(sprintf('Index "%s" cannot be read from object of type "%s" because it doesn\'t implement \ArrayAccess', $index, get_class($array)));
169
169
}
170
170
171
171
// Use an array instead of an object since performance is very crucial here
@@ -271,12 +271,12 @@ private function &readProperty(&$object, $property)
271
271
* @param string|integer $index The index to write at
272
272
* @param mixed $value The value to write
273
273
*
274
-
* @throws NoSuchPropertyException If the array does not implement \ArrayAccess or it is not an array
274
+
* @throws NoSuchIndexException If the array does not implement \ArrayAccess or it is not an array
if (!$arrayinstanceof \ArrayAccess && !is_array($array)) {
279
-
thrownewNoSuchPropertyException(sprintf('Index "%s" cannot be modified in object of type "%s" because it doesn\'t implement \ArrayAccess', $index, get_class($array)));
279
+
thrownewNoSuchIndexException(sprintf('Index "%s" cannot be modified in object of type "%s" because it doesn\'t implement \ArrayAccess', $index, get_class($array)));
* @expectedExceptionMessage Found the public method "addAxis()", but did not find a public "removeAxis()" on class Mock_PropertyAccessorCollectionTest_CarOnlyAdder
239
178
*/
240
179
publicfunctiontestSetValueFailsIfOnlyAdderFound()
241
180
{
@@ -252,6 +191,7 @@ public function testSetValueFailsIfOnlyAdderFound()
* @expectedExceptionMessage Found the public method "removeAxis()", but did not find a public "addAxis()" on class Mock_PropertyAccessorCollectionTest_CarOnlyRemover
* @expectedExceptionMessage Neither the property "axes" nor one of the methods "addAx()", "addAxe()", "addAxis()", "setAxes()", "__set()" or "__call()" exist and have public access in class "Mock_PropertyAccessorCollectionTest_CarNoAdderAndRemover
0 commit comments