mirror of
https://github.com/danog/psalm-plugin-symfony.git
synced 2024-11-29 20:19:09 +01:00
[http foundation] mark bag's getters as mutation free (#268)
This commit is contained in:
parent
28983ded3b
commit
85b4f17a80
@ -12,6 +12,7 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
||||
*
|
||||
* @return mixed
|
||||
* @psalm-taint-source input
|
||||
* @psalm-mutation-free
|
||||
*/
|
||||
public function get(string $key, $default = null) {}
|
||||
|
||||
@ -19,6 +20,9 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
||||
* Returns the parameters.
|
||||
*
|
||||
* @return array An array of parameters
|
||||
|
||||
* @psalm-taint-source input
|
||||
* @psalm-mutation-free
|
||||
*/
|
||||
public function all() {}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ final class InputBag extends ParameterBag
|
||||
* @psalm-param D $default
|
||||
* @psalm-return D|T
|
||||
* @psalm-taint-source input
|
||||
* @psalm-mutation-free
|
||||
*/
|
||||
public function get(string $key, $default = null) {}
|
||||
|
||||
@ -25,6 +26,7 @@ final class InputBag extends ParameterBag
|
||||
* @return array An array of parameters
|
||||
*
|
||||
* @psalm-taint-source input
|
||||
* @psalm-mutation-free
|
||||
*/
|
||||
public function all(string $key = null) {}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
||||
*
|
||||
* @return mixed
|
||||
* @psalm-taint-source input
|
||||
* @psalm-mutation-free
|
||||
*/
|
||||
public function get(string $key, $default = null) {}
|
||||
|
||||
@ -23,6 +24,7 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
||||
* @return array An array of parameters
|
||||
*
|
||||
* @psalm-taint-source input
|
||||
* @psalm-mutation-free
|
||||
*/
|
||||
public function all(string $key = null) {}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ final class InputBag extends ParameterBag
|
||||
* @psalm-param D $default
|
||||
* @psalm-return D|T
|
||||
* @psalm-taint-source input
|
||||
* @psalm-mutation-free
|
||||
*/
|
||||
public function get(string $key, $default = null) {}
|
||||
|
||||
@ -25,6 +26,7 @@ final class InputBag extends ParameterBag
|
||||
* @return array An array of parameters
|
||||
*
|
||||
* @psalm-taint-source input
|
||||
* @psalm-mutation-free
|
||||
*/
|
||||
public function all(string $key = null) {}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
||||
*
|
||||
* @return mixed
|
||||
* @psalm-taint-source input
|
||||
* @psalm-mutation-free
|
||||
*/
|
||||
public function get(string $key, $default = null) {}
|
||||
|
||||
@ -23,6 +24,7 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
||||
* @return array An array of parameters
|
||||
*
|
||||
* @psalm-taint-source input
|
||||
* @psalm-mutation-free
|
||||
*/
|
||||
public function all(string $key = null) {}
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ class Request
|
||||
* @param mixed $default The default value if the parameter key does not exist
|
||||
*
|
||||
* @psalm-taint-source input
|
||||
* @psalm-mutation-free
|
||||
*/
|
||||
public function get($key, $default = null) {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user