Skip to content

Commit 9c272bd

Browse files
committed
Add PropertyAccessor stub file alongside PropertyAccessorInterface
1 parent 5005288 commit 9c272bd

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

extension.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ parameters:
5555
- stubs/Symfony/Component/PropertyAccess/Exception/InvalidArgumentException.stub
5656
- stubs/Symfony/Component/PropertyAccess/Exception/RuntimeException.stub
5757
- stubs/Symfony/Component/PropertyAccess/Exception/UnexpectedTypeException.stub
58+
- stubs/Symfony/Component/PropertyAccess/PropertyAccessor.stub
5859
- stubs/Symfony/Component/PropertyAccess/PropertyAccessorInterface.stub
5960
- stubs/Symfony/Component/PropertyAccess/PropertyPathInterface.stub
6061
- stubs/Symfony/Component/Security/Acl/Model/AclInterface.stub
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
namespace Symfony\Component\PropertyAccess;
4+
5+
class PropertyAccessor implements PropertyAccessorInterface
6+
{
7+
8+
/**
9+
* @phpstan-template T of object|array<mixed>
10+
* @phpstan-param T &$objectOrArray
11+
* @phpstan-param-out ($objectOrArray is object ? T : array<mixed>) $objectOrArray
12+
* @phpstan-param string|PropertyPathInterface $propertyPath
13+
* @phpstan-param mixed $value
14+
*
15+
* @return void
16+
*
17+
* @throws Exception\InvalidArgumentException If the property path is invalid
18+
* @throws Exception\AccessException If a property/index does not exist or is not public
19+
* @throws Exception\UnexpectedTypeException If a value within the path is neither object nor array
20+
*/
21+
public function setValue(&$objectOrArray, $propertyPath, $value);
22+
23+
}

0 commit comments

Comments
 (0)