mirror of
https://github.com/danog/psalm-plugin-symfony.git
synced 2024-12-02 09:27:46 +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
|
* @return mixed
|
||||||
* @psalm-taint-source input
|
* @psalm-taint-source input
|
||||||
|
* @psalm-mutation-free
|
||||||
*/
|
*/
|
||||||
public function get(string $key, $default = null) {}
|
public function get(string $key, $default = null) {}
|
||||||
|
|
||||||
@ -19,6 +20,9 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||||||
* Returns the parameters.
|
* Returns the parameters.
|
||||||
*
|
*
|
||||||
* @return array An array of parameters
|
* @return array An array of parameters
|
||||||
|
|
||||||
|
* @psalm-taint-source input
|
||||||
|
* @psalm-mutation-free
|
||||||
*/
|
*/
|
||||||
public function all() {}
|
public function all() {}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ final class InputBag extends ParameterBag
|
|||||||
* @psalm-param D $default
|
* @psalm-param D $default
|
||||||
* @psalm-return D|T
|
* @psalm-return D|T
|
||||||
* @psalm-taint-source input
|
* @psalm-taint-source input
|
||||||
|
* @psalm-mutation-free
|
||||||
*/
|
*/
|
||||||
public function get(string $key, $default = null) {}
|
public function get(string $key, $default = null) {}
|
||||||
|
|
||||||
@ -25,6 +26,7 @@ final class InputBag extends ParameterBag
|
|||||||
* @return array An array of parameters
|
* @return array An array of parameters
|
||||||
*
|
*
|
||||||
* @psalm-taint-source input
|
* @psalm-taint-source input
|
||||||
|
* @psalm-mutation-free
|
||||||
*/
|
*/
|
||||||
public function all(string $key = null) {}
|
public function all(string $key = null) {}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @psalm-taint-source input
|
* @psalm-taint-source input
|
||||||
|
* @psalm-mutation-free
|
||||||
*/
|
*/
|
||||||
public function get(string $key, $default = null) {}
|
public function get(string $key, $default = null) {}
|
||||||
|
|
||||||
@ -23,6 +24,7 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||||||
* @return array An array of parameters
|
* @return array An array of parameters
|
||||||
*
|
*
|
||||||
* @psalm-taint-source input
|
* @psalm-taint-source input
|
||||||
|
* @psalm-mutation-free
|
||||||
*/
|
*/
|
||||||
public function all(string $key = null) {}
|
public function all(string $key = null) {}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ final class InputBag extends ParameterBag
|
|||||||
* @psalm-param D $default
|
* @psalm-param D $default
|
||||||
* @psalm-return D|T
|
* @psalm-return D|T
|
||||||
* @psalm-taint-source input
|
* @psalm-taint-source input
|
||||||
|
* @psalm-mutation-free
|
||||||
*/
|
*/
|
||||||
public function get(string $key, $default = null) {}
|
public function get(string $key, $default = null) {}
|
||||||
|
|
||||||
@ -25,6 +26,7 @@ final class InputBag extends ParameterBag
|
|||||||
* @return array An array of parameters
|
* @return array An array of parameters
|
||||||
*
|
*
|
||||||
* @psalm-taint-source input
|
* @psalm-taint-source input
|
||||||
|
* @psalm-mutation-free
|
||||||
*/
|
*/
|
||||||
public function all(string $key = null) {}
|
public function all(string $key = null) {}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @psalm-taint-source input
|
* @psalm-taint-source input
|
||||||
|
* @psalm-mutation-free
|
||||||
*/
|
*/
|
||||||
public function get(string $key, $default = null) {}
|
public function get(string $key, $default = null) {}
|
||||||
|
|
||||||
@ -23,6 +24,7 @@ class ParameterBag implements \IteratorAggregate, \Countable
|
|||||||
* @return array An array of parameters
|
* @return array An array of parameters
|
||||||
*
|
*
|
||||||
* @psalm-taint-source input
|
* @psalm-taint-source input
|
||||||
|
* @psalm-mutation-free
|
||||||
*/
|
*/
|
||||||
public function all(string $key = null) {}
|
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
|
* @param mixed $default The default value if the parameter key does not exist
|
||||||
*
|
*
|
||||||
* @psalm-taint-source input
|
* @psalm-taint-source input
|
||||||
|
* @psalm-mutation-free
|
||||||
*/
|
*/
|
||||||
public function get($key, $default = null) {}
|
public function get($key, $default = null) {}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user