Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c6168b5

Browse files
committed
Add exception typehint for interface
1 parent 74eb51f commit c6168b5

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/Symfony/Component/Serializer/Instantiator/Instantiator.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public function __construct(PropertyListExtractorInterface $propertyListExtracto
4040
$this->nameConverter = $nameConverter;
4141
}
4242

43+
/**
44+
* {@inheritdoc}
45+
*/
4346
public function instantiate(string $class, $data, $format = null, array $context = [])
4447
{
4548
$allowedAttributes = $this->propertyListExtractor ? $this->propertyListExtractor->getProperties($class, $context) : null;

src/Symfony/Component/Serializer/Instantiator/InstantiatorInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Component\Serializer\Instantiator;
1313

14+
use Symfony\Component\Serializer\Exception\MissingConstructorArgumentsException;
15+
1416
/**
1517
* @author Jérôme Desjardins <[email protected]>
1618
*/
@@ -19,6 +21,8 @@ interface InstantiatorInterface
1921
/**
2022
* Instantiate a new object.
2123
*
24+
* @throws MissingConstructorArgumentsException When some arguments are missing to use the constructor
25+
*
2226
* @return mixed
2327
*/
2428
public function instantiate(string $class, $data, $format = null, array $context = []);

0 commit comments

Comments
 (0)