Skip to content

Commit

Permalink
Merge pull request #1081 from jrushlow/fix/php-cs-fixer
Browse files Browse the repository at this point in the history
[ci] adhere to php-cs-fixer standards
  • Loading branch information
jrushlow authored Mar 14, 2022
2 parents 455c2bc + 6b3859a commit 11cc24d
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/EventRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function __construct(EventDispatcherInterface $eventDispatcher)

// Loop through the new event classes
foreach (self::$newEventsMap as $eventName => $newEventClass) {
//Check if the new event classes exist, if so replace the old one with the new.
// Check if the new event classes exist, if so replace the old one with the new.
if (isset(self::$eventsMap[$eventName]) && class_exists($newEventClass)) {
self::$eventsMap[$eventName] = $newEventClass;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function onAuthenticationSuccess(Request $request, TokenInterface $token,
}

// For example:
//return new RedirectResponse($this->urlGenerator->generate('some_route'));
// return new RedirectResponse($this->urlGenerator->generate('some_route'));
throw new \Exception('TODO: provide a valid redirect inside '.__FILE__);
}

Expand Down
4 changes: 2 additions & 2 deletions src/Resources/skeleton/test/KernelTestCase.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function testSomething(): void
$kernel = self::bootKernel();

$this->assertSame('test', $kernel->getEnvironment());
//$routerService = <?= $use_legacy_container_property ? 'self::$container' : 'static::getContainer()'; ?>->get('router');
//$myCustomService = <?= $use_legacy_container_property ? 'self::$container' : 'static::getContainer()'; ?>->get(CustomService::class);
// $routerService = <?= $use_legacy_container_property ? 'self::$container' : 'static::getContainer()'; ?>->get('router');
// $myCustomService = <?= $use_legacy_container_property ? 'self::$container' : 'static::getContainer()'; ?>->get(CustomService::class);
}
}
4 changes: 2 additions & 2 deletions src/Util/ClassSourceManipulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ private function addCollectionRelation(BaseCollectionRelation $relation): void
$paramBuilder->setTypeHint($typeHint);
$adderNodeBuilder->addParam($paramBuilder->getNode());

//if (!$this->avatars->contains($avatar))
// if (!$this->avatars->contains($avatar))
$containsMethodCallNode = new Node\Expr\MethodCall(
new Node\Expr\PropertyFetch(new Node\Expr\Variable('this'), $relation->getPropertyName()),
'contains',
Expand Down Expand Up @@ -749,7 +749,7 @@ private function addCollectionRelation(BaseCollectionRelation $relation): void
// $this->avatars->removeElement($avatar);
$removerNodeBuilder->addStmt(BuilderHelpers::normalizeStmt($removeElementCall));
} else {
//if ($this->avatars->removeElement($avatar))
// if ($this->avatars->removeElement($avatar))
$ifRemoveElementStmt = new Node\Stmt\If_($removeElementCall);
$removerNodeBuilder->addStmt($ifRemoveElementStmt);
if ($relation instanceof RelationOneToMany) {
Expand Down
2 changes: 1 addition & 1 deletion src/Util/YamlSourceManipulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ private function findEndPositionOfValue($value, $offset = null)
return $endKeyPosition;
}

if (is_scalar($value) || null === $value) {
if (\is_scalar($value) || null === $value) {
$offset = null === $offset ? $this->currentPosition : $offset;

if (\is_bool($value)) {
Expand Down
2 changes: 0 additions & 2 deletions tests/Util/ClassSourceManipulatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,6 @@ public function getAddOneToOneRelationTests(): \Generator
(new RelationOneToOne())
->setPropertyName('userProfile')
->setTargetClassName('App\Entity\UserProfile')
//->setTargetPropertyName('user')
->setIsNullable(true)
->setIsOwning(true)
->setMapInverseRelation(false),
Expand All @@ -660,7 +659,6 @@ public function getAddOneToOneRelationTests(): \Generator
(new RelationOneToOne())
->setPropertyName('userProfile')
->setTargetClassName('App\Entity\UserProfile')
//->setTargetPropertyName('user')
->setIsNullable(false)
->setIsOwning(true)
->setMapInverseRelation(false),
Expand Down
2 changes: 1 addition & 1 deletion tests/Util/YamlSourceManipulatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function testSetData(string $startingSource, array $newData, string $expe

$logger = $this->createLogger();
// uncomment to enhance debugging
//$manipulator->setLogger($logger);
// $manipulator->setLogger($logger);

$manipulator->setData($newData);

Expand Down

0 comments on commit 11cc24d

Please sign in to comment.