Skip to content

Commit

Permalink
add missing use and fix some phpdoc and phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
Leny BERNARD authored and lenybernard committed Oct 7, 2016
1 parent 0316b96 commit 0d4aa3c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 2 additions & 0 deletions Bundle/FormBundle/Helper/FormErrorHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Victoire\Bundle\FormBundle\Helper;

use Symfony\Component\Form\Form;

/**
* A service that give errors from a form as a string.
*
Expand Down
8 changes: 1 addition & 7 deletions Bundle/WidgetBundle/Entity/Widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,12 +534,6 @@ public function generateCacheId()
throw new \Exception(sprintf('Cannot generate an hash for widget %s if currentView is not defined.',
$this->getId()
));
if (!$this->getCurrentView()->getReference()) {
throw new \Exception(sprintf('Cannot generate an hash for widget %s if currentView %s Reference is not defined.',
$this->getId(),
$widget->getCurrentView()->getId()
));
}
}

return sprintf('%s-%s-%s',
Expand All @@ -558,7 +552,7 @@ public function getLocale($defaultLocale)
{
if ($this->hasCriteriaNamed('locale')) {
foreach ($this->getCriterias() as $criteria) {
if ($criteria->getName() === 'locale' && $criteria->getValue() === $defaultLocale) {
if ($criteria->getName() === 'locale' && $criteria->getValue() === $defaultLocale) {
return $criteria->getValue();
}
}
Expand Down
4 changes: 3 additions & 1 deletion Tests/Functionnal/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ public function registerBundles()
];
}


/**
* @param LoaderInterface $loader
*/
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
Expand Down

0 comments on commit 0d4aa3c

Please sign in to comment.