← All changes
|
vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php
+14
-20
3.1
→
3.5.10
View file →
| @@ -23,9 +23,9 @@ | ||
| 23 | 23 | { |
| 24 | 24 | /** |
| 25 | 25 | * Starts the session. |
| 26 | 26 | * |
| 27 | - * @return bool True if started | |
| 27 | + * @return bool | |
| 28 | 28 | * |
| 29 | 29 | * @throws \RuntimeException if something goes wrong starting the session |
| 30 | 30 | */ |
| 31 | 31 | public function start(); |
| @@ -32,9 +32,9 @@ | ||
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * Checks if the session is started. |
| 35 | 35 | * |
| 36 | - * @return bool True if started, false otherwise | |
| 36 | + * @return bool | |
| 37 | 37 | */ |
| 38 | 38 | public function isStarted(); |
| 39 | 39 | |
| 40 | 40 | /** |
| @@ -39,32 +39,28 @@ | ||
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * Returns the session ID. |
| 42 | 42 | * |
| 43 | - * @return string The session ID or empty | |
| 43 | + * @return string | |
| 44 | 44 | */ |
| 45 | 45 | public function getId(); |
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | 48 | * Sets the session ID. |
| 49 | - * | |
| 50 | - * @param string $id | |
| 51 | 49 | */ |
| 52 | - public function setId($id); | |
| 50 | + public function setId(string $id); | |
| 53 | 51 | |
| 54 | 52 | /** |
| 55 | 53 | * Returns the session name. |
| 56 | 54 | * |
| 57 | - * @return mixed The session name | |
| 55 | + * @return string | |
| 58 | 56 | */ |
| 59 | 57 | public function getName(); |
| 60 | 58 | |
| 61 | 59 | /** |
| 62 | 60 | * Sets the session name. |
| 63 | - * | |
| 64 | - * @param string $name | |
| 65 | 61 | */ |
| 66 | - public function setName($name); | |
| 62 | + public function setName(string $name); | |
| 67 | 63 | |
| 68 | 64 | /** |
| 69 | 65 | * Regenerates id that represents this storage. |
| 70 | 66 | * |
| @@ -83,19 +79,19 @@ | ||
| 83 | 79 | * See Symfony\Component\HttpKernel\EventListener\SaveSessionListener. |
| 84 | 80 | * Otherwise session data could get lost again for concurrent requests with the |
| 85 | 81 | * new ID. One result could be that you get logged out after just logging in. |
| 86 | 82 | * |
| 87 | - * @param bool $destroy Destroy session when regenerating? | |
| 88 | - * @param int $lifetime Sets the cookie lifetime for the session cookie. A null value | |
| 89 | - * will leave the system settings unchanged, 0 sets the cookie | |
| 90 | - * to expire with browser session. Time is in seconds, and is | |
| 91 | - * not a Unix timestamp. | |
| 83 | + * @param bool $destroy Destroy session when regenerating? | |
| 84 | + * @param int|null $lifetime Sets the cookie lifetime for the session cookie. A null value | |
| 85 | + * will leave the system settings unchanged, 0 sets the cookie | |
| 86 | + * to expire with browser session. Time is in seconds, and is | |
| 87 | + * not a Unix timestamp. | |
| 92 | 88 | * |
| 93 | - * @return bool True if session regenerated, false if error | |
| 89 | + * @return bool | |
| 94 | 90 | * |
| 95 | 91 | * @throws \RuntimeException If an error occurs while regenerating this storage |
| 96 | 92 | */ |
| 97 | - public function regenerate($destroy = false, $lifetime = null); | |
| 93 | + public function regenerate(bool $destroy = false, ?int $lifetime = null); | |
| 98 | 94 | |
| 99 | 95 | /** |
| 100 | 96 | * Force the session to be saved and closed. |
| 101 | 97 | * |
| @@ -116,15 +112,13 @@ | ||
| 116 | 112 | |
| 117 | 113 | /** |
| 118 | 114 | * Gets a SessionBagInterface by name. |
| 119 | 115 | * |
| 120 | - * @param string $name | |
| 121 | - * | |
| 122 | 116 | * @return SessionBagInterface |
| 123 | 117 | * |
| 124 | 118 | * @throws \InvalidArgumentException If the bag does not exist |
| 125 | 119 | */ |
| 126 | - public function getBag($name); | |
| 120 | + public function getBag(string $name); | |
| 127 | 121 | |
| 128 | 122 | /** |
| 129 | 123 | * Registers a SessionBagInterface for use. |
| 130 | 124 | */ |