Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[2.7] Fix issues reported by static analyse
  • Loading branch information
romainneutron committed Feb 28, 2017
commit e473aa8bc1154972312b51a0ba44f94d484737a2
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Twig/TwigEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function supports($name)
* @param string|TemplateReferenceInterface|\Twig_Template $name A template name or an instance of
* TemplateReferenceInterface or \Twig_Template
*
* @return \Twig_TemplateInterface A \Twig_TemplateInterface instance
* @return \Twig_Template A \Twig_Template instance
*
* @throws \InvalidArgumentException if the template does not exist
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function getName(Profile $profile, $panel)
*
* @param Profile $profile
*
* @return Twig_Template[]
* @return \Twig_Template[]
*
* @deprecated not used anymore internally
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace Symfony\Component\HttpKernel\EventListener;

use Symfony\Component\HttpFoundation\Cookie;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ public function loadClassMetadata(ClassMetadataInterface $classMetadata)

if (isset($data['groups'])) {
if (!is_array($data['groups'])) {
throw new MappingException('The "groups" key must be an array of strings in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName());
throw new MappingException(sprintf('The "groups" key must be an array of strings in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName()));
}

foreach ($data['groups'] as $group) {
if (!is_string($group)) {
throw new MappingException('Group names must be strings in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName());
throw new MappingException(sprintf('Group names must be strings in "%s" for the attribute "%s" of the class "%s".', $this->file, $attribute, $classMetadata->getName()));
}

$attributeMetadata->addGroup($group);
Expand Down