Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dd5d7b2

Browse files
committed
CS fixer conf & fixes
1 parent dec9694 commit dd5d7b2

9 files changed

Lines changed: 24 additions & 11 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/build
1+
.php_cs.cache
22
composer.lock
33
phpunit.xml
44
vendor/*

.php_cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
$finder = Symfony\CS\Finder\DefaultFinder::create()
4+
->in(__DIR__)
5+
->exclude(array('vendor', 'build'))
6+
;
7+
8+
return Symfony\CS\Config\Config::create()
9+
->setUsingCache(true)
10+
->fixers(array('-unalign_double_arrow', '-phpdoc_short_description'))
11+
->finder($finder)
12+
;

Configuration/Configurator.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@ private function introspectGettersAndSetters($entityConfiguration)
462462
return $entityConfiguration;
463463
}
464464

465-
466465
/**
467466
* Determines the template used to render each backend element. This is not
468467
* trivial because templates can depend on the entity displayed and they

Controller/AdminController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,7 @@ protected function createEntityForm($entity, array $entityProperties, $view)
645645
$customMethodName, is_object($form) ? get_class($form) : gettype($form)
646646
));
647647
}
648+
648649
return $form;
649650
}
650651

DependencyInjection/EasyAdminExtension.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ private function normalizeActionsConfiguration(array $actionsConfiguration, arra
349349
// those options would be 'null' and the template would show some issues
350350
if (array_key_exists($actionName, $defaultActionsConfiguration)) {
351351
// remove null config options but maintain empty options (this allows to set an empty label for the action)
352-
$normalizedConfiguration = array_filter($normalizedConfiguration, function($element) { return null !== $element; });
352+
$normalizedConfiguration = array_filter($normalizedConfiguration, function ($element) { return null !== $element; });
353353
$normalizedConfiguration = array_replace($defaultActionsConfiguration[$actionName], $normalizedConfiguration);
354354
}
355355
}
@@ -605,8 +605,9 @@ private function normalizeFieldsConfiguration(array $fieldsConfiguration, $view,
605605
/**
606606
* Checks whether the given string is valid as a PHP method name.
607607
*
608-
* @param string $name
609-
* @return boolean
608+
* @param string $name
609+
*
610+
* @return bool
610611
*/
611612
private function isValidMethodName($name)
612613
{

Listener/ExceptionListener.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ public function onKernelException(GetResponseForExceptionEvent $event)
3838
return $event->getException()->getMessage();
3939
}
4040

41-
/** @var \JavierEguiluz\Bundle\EasyAdminBundle\Exception\BaseException */
4241
$exception = $event->getException();
4342
$exceptionClassName = basename(str_replace('\\', '/', get_class($exception)));
4443

Tests/Fixtures/AppTestBundle/Entity/Product.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ class Product
8484
* <li><strong>Size</strong>: 13cm x 15cm x 6cm</li>
8585
* <li><strong>Bluetooth</strong>: 4.1</li>
8686
* </ul></pre>
87+
*
8788
* @var string
8889
* @ORM\Column(type="string")
8990
*/

Tests/Listener/EntityNotFoundException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
namespace JavierEguiluz\Bundle\EasyAdminBundle\Tests\Listener;
44

55
/**
6-
* Test class for event listener test
7-
*/
6+
* Test class for event listener test
7+
*/
88
class EntityNotFoundException extends \Exception
99
{
1010
}

Tests/Listener/ExceptionListenerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ public function testCatchBaseExceptions()
5050
array(
5151
'entity' => array(
5252
'name' => 'Test',
53-
'primary_key_field_name' => 'Test key'
53+
'primary_key_field_name' => 'Test key',
5454
),
55-
'entity_id' => 2
55+
'entity_id' => 2,
5656
)
5757
);
5858
$event = $this->getEventExceptionThatShouldBeCalledOnce($exception);
@@ -78,7 +78,7 @@ private function getEventExceptionThatShouldNotBeCalled($exception)
7878

7979
public function testShouldNotCatchExceptionsWithSameName()
8080
{
81-
$exception = new EntityNotFoundException;
81+
$exception = new EntityNotFoundException();
8282
$event = $this->getEventExceptionThatShouldNotBeCalled($exception);
8383
$templating = $this->getTemplating();
8484
$debug = false;

0 commit comments

Comments
 (0)