-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d6be2fb
commit 483391f
Showing
4 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
src/Stubs/6/Bundle/FrameworkBundle/Controller/AbstractController.stubphp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Symfony\Bundle\FrameworkBundle\Controller; | ||
|
||
use Symfony\Contracts\Service\ServiceSubscriberInterface; | ||
use Psr\Container\ContainerInterface; | ||
use Symfony\Component\Form\FormInterface; | ||
use Symfony\Component\Form\FormTypeInterface; | ||
|
||
class AbstractController implements ServiceSubscriberInterface | ||
{ | ||
/** | ||
* @var ContainerInterface | ||
* @psalm-suppress PropertyNotSetInConstructor | ||
*/ | ||
protected $container; | ||
|
||
/** | ||
* @template TData | ||
* @template TFormType of FormTypeInterface<TData> | ||
* | ||
* @psalm-param class-string<TFormType> $type | ||
* | ||
* @psalm-return FormInterface<TData> | ||
*/ | ||
public function createForm(string $type, $data = null, array $options = []): FormInterface {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Symfony\Component\HttpFoundation; | ||
|
||
final class InputBag extends ParameterBag | ||
{ | ||
/** | ||
* Returns a string input value by name. | ||
* | ||
* @template D of string|int|float|bool|null | ||
* @psalm-param D $default | ||
* @psalm-return string|int|float|bool|D | ||
* @psalm-taint-source input | ||
*/ | ||
public function get(string $key, $default = null) {} | ||
|
||
/** | ||
* Returns the parameters. | ||
* | ||
* @param string|null $key The name of the parameter to return or null to get them all | ||
* | ||
* @return array An array of parameters | ||
* | ||
* @psalm-taint-source input | ||
*/ | ||
public function all(string $key = null) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Symfony\Component\HttpFoundation; | ||
|
||
class ParameterBag implements \IteratorAggregate, \Countable | ||
{ | ||
/** | ||
* Returns a parameter by name. | ||
* | ||
* @param string $key The key | ||
* @param mixed $default The default value if the parameter key does not exist | ||
* | ||
* @return mixed | ||
* @psalm-taint-source input | ||
*/ | ||
public function get(string $key, $default = null) {} | ||
|
||
/** | ||
* Returns the parameters. | ||
* | ||
* @param string|null $key The name of the parameter to return or null to get them all | ||
* | ||
* @return array An array of parameters | ||
* | ||
* @psalm-taint-source input | ||
*/ | ||
public function all(string $key = null) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Symfony\Component\HttpFoundation; | ||
|
||
class Request | ||
{ | ||
/** | ||
* @psalm-var InputBag | ||
*/ | ||
public $request; | ||
} |