Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrutinizer Auto-Fixes #168

Merged
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
9 changes: 3 additions & 6 deletions Bundle/BusinessEntityBundle/Annotation/AnnotationDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@

use Doctrine\Common\Annotations\AnnotationException;
use Doctrine\Common\Annotations\Reader;
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
use Doctrine\ORM\Mapping\Driver\AnnotationDriver as DoctrineAnnotationDriver;
use Doctrine\ORM\Mapping\MappingException;
use Metadata\Driver\DriverInterface;
use Metadata\MergeableClassMetadata;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Victoire\Bundle\BusinessEntityBundle\Event\BusinessEntityAnnotationEvent;
use Victoire\Bundle\BusinessEntityBundle\Helper\BusinessEntityHelper;
Expand Down Expand Up @@ -57,7 +54,7 @@ public function getAllClassNames()
$classes = array();
$includedFiles = array();
foreach ($this->paths as $path) {
if (! is_dir($path)) {
if (!is_dir($path)) {
throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
}
$iterator = new \RegexIterator(
Expand All @@ -78,7 +75,7 @@ public function getAllClassNames()
foreach ($declared as $className) {
$rc = new \ReflectionClass($className);
$sourceFile = $rc->getFileName();
if (in_array($sourceFile, $includedFiles) && ! $this->isTransient($className)) {
if (in_array($sourceFile, $includedFiles) && !$this->isTransient($className)) {
$classes[] = $className;
}
}
Expand Down Expand Up @@ -106,7 +103,7 @@ public function parse(\ReflectionClass $class)

if ($classAnnotations) {
foreach ($classAnnotations as $key => $annot) {
if (! is_numeric($key)) {
if (!is_numeric($key)) {
continue;
}

Expand Down
3 changes: 1 addition & 2 deletions Bundle/BusinessEntityBundle/Helper/BusinessEntityHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public function __construct(BusinessEntityCacheReader $reader, CacheBuilder $bui
/**
* Set the EntityManagerInterface instance this helper instance should use.
*
* @param EntityManagerInterface $em
*/
public function setEntityManager(EntityManagerInterface $entityManager)
{
Expand Down Expand Up @@ -187,7 +186,7 @@ public function getEntityByPageAndBusinessIdentifier(BusinessEntityPagePattern $

/**
* create a BusinessEntity from an annotation object
* @param string $classname
* @param string $className
* @param array $businessProperties
*
* @return BusinessEntity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public function __construct(ApcCache $cache, WidgetHelper $widgetHelper, Annotat

/**
* this method get annotated business classes (from cache if enabled)
* @param AnnotationDriver|null $driver
*
* @return array $businessClasses
**/
Expand Down Expand Up @@ -64,6 +63,9 @@ public function getBusinessClassesForWidget(Widget $widget)

}

/**
* @param string $namespace
*/
public function getBusinessProperties($namespace)
{
/** @var BusinessEntity[] $widgetMetadatas */
Expand Down
3 changes: 2 additions & 1 deletion Bundle/CoreBundle/Entity/BaseEntityProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function getId()
/**
* Get the entity of the proxy
*
* @param string $entityName
* @return Object
* @throws \Exception
*/
Expand Down Expand Up @@ -78,7 +79,7 @@ public function setEntity($entity, $entityName)
* Set widgets
* @param string $widgets
*
* @return EntityProxy
* @return BaseEntityProxy
*/
public function setWidgets($widgets)
{
Expand Down
3 changes: 0 additions & 3 deletions Bundle/WidgetBundle/Controller/WidgetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
use Victoire\Bundle\CoreBundle\Entity\View;
use Victoire\Bundle\TemplateBundle\Entity\Template as VicTemplate;
use Symfony\Component\HttpFoundation\Request;
use Victoire\Bundle\WidgetBundle\Entity\Widget;
use Victoire\Bundle\WidgetBundle\Model\WidgetManager;

/**
* Widget Controller
Expand Down
2 changes: 0 additions & 2 deletions Bundle/WidgetBundle/Model/WidgetManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Mapping\ClassMetadataInfo;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\PropertyAccess\PropertyAccess;
use Victoire\Bundle\BusinessEntityBundle\Annotation\AnnotationDriver;
use Victoire\Bundle\BusinessEntityBundle\Entity\BusinessEntity;
use Victoire\Bundle\BusinessEntityBundle\Reader\BusinessEntityCacheReader;
use Victoire\Bundle\CoreBundle\Entity\View;
Expand Down
Loading