From c9ddd68ea63c5397a3a49358620a044e4e659a07 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Fri, 20 Oct 2017 22:28:08 -0700 Subject: [PATCH] Fix phpdoc inconsistencies, simplify no-op sprintf. (detected by static analysis) --- src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php | 2 +- .../Component/HttpKernel/Controller/ControllerResolver.php | 2 +- .../Serializer/Normalizer/AbstractObjectNormalizer.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php b/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php index 2d19857c96a00..54c12f16d4cb5 100644 --- a/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php @@ -85,7 +85,7 @@ public function hasMarkedPlace($subject, $placeName, $name = null) * Returns marked places. * * @param object $subject A subject - * @param string $placesNameOnly If true, returns only places name. If false returns the raw representation + * @param bool $placesNameOnly If true, returns only places name. If false returns the raw representation * @param string $name A workflow name * * @return string[]|int[] diff --git a/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php b/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php index 7d93cc56c7563..ddac84a7fef94 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php @@ -219,7 +219,7 @@ private function getControllerError($callable) } if (2 !== count($callable)) { - return sprintf('Invalid format for controller, expected array(controller, method) or controller::method.'); + return 'Invalid format for controller, expected array(controller, method) or controller::method.'; } list($controller, $method) = $callable; diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php index a8c51de7ce1c9..c1b2382a89996 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php @@ -108,7 +108,7 @@ public function normalize($object, $format = null, array $context = array()) * * @return string[] */ - protected function getAttributes($object, $format = null, array $context) + protected function getAttributes($object, $format, array $context) { $class = get_class($object); $key = $class.'-'.$context['cache_key'];