Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 016e441

Browse files
VincentLangletondrejmirtes
authored andcommitted
Add @throws annotation
1 parent e7767d9 commit 016e441

File tree

5 files changed

+29
-1
lines changed

5 files changed

+29
-1
lines changed

‎extension.neon‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@ parameters:
2222
- stubs/Symfony/Component/Console/Command.stub
2323
- stubs/Symfony/Component/Console/Helper/HelperInterface.stub
2424
- stubs/Symfony/Component/Console/Output/OutputInterface.stub
25-
- stubs/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.stub
2625
- stubs/Symfony/Component/DependencyInjection/ContainerBuilder.stub
2726
- stubs/Symfony/Component/DependencyInjection/Extension/ExtensionInterface.stub
2827
- stubs/Symfony/Component/EventDispatcher/EventDispatcherInterface.stub
2928
- stubs/Symfony/Component/EventDispatcher/EventSubscriberInterface.stub
3029
- stubs/Symfony/Component/EventDispatcher/GenericEvent.stub
30+
- stubs/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.stub
31+
- stubs/Symfony/Component/Form/Exception/ExceptionInterface.stub
32+
- stubs/Symfony/Component/Form/Exception/RuntimeException.stub
33+
- stubs/Symfony/Component/Form/Exception/TransformationFailedException.stub
3134
- stubs/Symfony/Component/Form/DataTransformerInterface.stub
3235
- stubs/Symfony/Component/Form/FormBuilderInterface.stub
3336
- stubs/Symfony/Component/Form/FormInterface.stub

‎stubs/Symfony/Component/Form/DataTransformerInterface.stub‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@ interface DataTransformerInterface
1414
* @phpstan-param T|null $value The value in the original representation
1515
*
1616
* @phpstan-return R|null The value in the transformed representation
17+
*
18+
* @throws TransformationFailedException
1719
*/
1820
public function transform($value);
1921

2022
/**
2123
* @phpstan-param R|null $value The value in the transformed representation
2224
*
2325
* @phpstan-return T|null The value in the original representation
26+
*
27+
* @throws TransformationFailedException
2428
*/
2529
public function reverseTransform($value);
2630
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
namespace Symfony\Component\Form\Exception;
4+
5+
interface ExceptionInterface extends \Throwable
6+
{
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
namespace Symfony\Component\Form\Exception;
4+
5+
class RuntimeException extends \RuntimeException implements ExceptionInterface
6+
{
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
namespace Symfony\Component\Form\Exception;
4+
5+
class TransformationFailedException extends RuntimeException
6+
{
7+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /