diff --git a/src/Symfony/Component/BrowserKit/Cookie.php b/src/Symfony/Component/BrowserKit/Cookie.php index 6afdbd970e91..606478727e2d 100644 --- a/src/Symfony/Component/BrowserKit/Cookie.php +++ b/src/Symfony/Component/BrowserKit/Cookie.php @@ -83,6 +83,8 @@ public function __construct(string $name, ?string $value, string $expires = null /** * Returns the HTTP representation of the Cookie. + * + * @return string */ public function __toString() { diff --git a/src/Symfony/Component/DependencyInjection/Loader/Configurator/ReferenceConfigurator.php b/src/Symfony/Component/DependencyInjection/Loader/Configurator/ReferenceConfigurator.php index 69e89e11a483..fa042538ce2a 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/Configurator/ReferenceConfigurator.php +++ b/src/Symfony/Component/DependencyInjection/Loader/Configurator/ReferenceConfigurator.php @@ -59,6 +59,9 @@ final public function ignoreOnUninitialized(): self return $this; } + /** + * @return string + */ public function __toString() { return $this->id; diff --git a/src/Symfony/Component/DependencyInjection/Variable.php b/src/Symfony/Component/DependencyInjection/Variable.php index 95e28d60ed30..21d33ebb28fa 100644 --- a/src/Symfony/Component/DependencyInjection/Variable.php +++ b/src/Symfony/Component/DependencyInjection/Variable.php @@ -33,6 +33,9 @@ public function __construct(string $name) $this->name = $name; } + /** + * @return string + */ public function __toString() { return $this->name; diff --git a/src/Symfony/Component/ExpressionLanguage/Node/Node.php b/src/Symfony/Component/ExpressionLanguage/Node/Node.php index 7923cb1d64e4..61bbd0cdae24 100644 --- a/src/Symfony/Component/ExpressionLanguage/Node/Node.php +++ b/src/Symfony/Component/ExpressionLanguage/Node/Node.php @@ -33,6 +33,9 @@ public function __construct(array $nodes = [], array $attributes = []) $this->attributes = $attributes; } + /** + * @return string + */ public function __toString() { $attributes = []; diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php index 52ab90c66927..0e040811e1a4 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/DataCollector.php @@ -114,6 +114,9 @@ protected function getCasters() return $casters; } + /** + * @return array + */ public function __sleep() { if (__CLASS__ !== $c = (new \ReflectionMethod($this, 'serialize'))->getDeclaringClass()->name) { diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 99c73a9f4b89..55f8467faa06 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -870,6 +870,9 @@ public function unserialize($data) $this->__construct($environment, $debug); } + /** + * @return array + */ public function __sleep() { if (__CLASS__ !== $c = (new \ReflectionMethod($this, 'serialize'))->getDeclaringClass()->name) { diff --git a/src/Symfony/Component/HttpKernel/Profiler/Profile.php b/src/Symfony/Component/HttpKernel/Profiler/Profile.php index f896c00e525e..9de221fc8f91 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/Profile.php +++ b/src/Symfony/Component/HttpKernel/Profiler/Profile.php @@ -288,6 +288,9 @@ public function hasCollector($name) return isset($this->collectors[$name]); } + /** + * @return array + */ public function __sleep() { return ['token', 'parent', 'children', 'collectors', 'ip', 'method', 'url', 'time', 'statusCode']; diff --git a/src/Symfony/Component/Mime/Part/DataPart.php b/src/Symfony/Component/Mime/Part/DataPart.php index 128c53eb6251..423185fef2a9 100644 --- a/src/Symfony/Component/Mime/Part/DataPart.php +++ b/src/Symfony/Component/Mime/Part/DataPart.php @@ -125,6 +125,9 @@ public function __destruct() } } + /** + * @return array + */ public function __sleep() { // converts the body to a string diff --git a/src/Symfony/Component/Mime/Part/TextPart.php b/src/Symfony/Component/Mime/Part/TextPart.php index 77ab98021957..a41d91ddec86 100644 --- a/src/Symfony/Component/Mime/Part/TextPart.php +++ b/src/Symfony/Component/Mime/Part/TextPart.php @@ -179,6 +179,9 @@ private function chooseEncoding(): string return 'quoted-printable'; } + /** + * @return array + */ public function __sleep() { // convert resources to strings for serialization diff --git a/src/Symfony/Component/VarDumper/Caster/ConstStub.php b/src/Symfony/Component/VarDumper/Caster/ConstStub.php index 15868b093421..8b0179745f34 100644 --- a/src/Symfony/Component/VarDumper/Caster/ConstStub.php +++ b/src/Symfony/Component/VarDumper/Caster/ConstStub.php @@ -26,6 +26,9 @@ public function __construct(string $name, $value = null) $this->value = 1 < \func_num_args() ? $value : $name; } + /** + * @return string + */ public function __toString() { return (string) $this->value; diff --git a/src/Symfony/Component/VarDumper/Cloner/Data.php b/src/Symfony/Component/VarDumper/Cloner/Data.php index fd7a18a75238..c4dd5eeb4b6d 100644 --- a/src/Symfony/Component/VarDumper/Cloner/Data.php +++ b/src/Symfony/Component/VarDumper/Cloner/Data.php @@ -137,6 +137,9 @@ public function __get($key) return null; } + /** + * @return bool + */ public function __isset($key) { return null !== $this->seek($key); @@ -165,6 +168,9 @@ public function offsetUnset($key) throw new \BadMethodCallException(self::class.' objects are immutable.'); } + /** + * @return string + */ public function __toString() { $value = $this->getValue();