Skip to content

Commit

Permalink
chore: codestyle (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
tinect authored Oct 28, 2024
1 parent a2d4635 commit 24648ec
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Api/TestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Shopware\Core\PlatformRequest;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Attribute\Route;

#[Route(defaults: ['_routeScope' => ['api']])]
class TestController
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Media/ExtendedUrlParams.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static function fromThumbnail(Entity $entity): self
$mediaUrlParam = $entity->getTranslation('mediaUrlParam');
if (!($mediaUrlParam instanceof ExtendedUrlParam)) {
throw new \InvalidArgumentException(
\sprintf('"mediaUrlParam" within translations must be type of "%s"', __CLASS__)
\sprintf('"mediaUrlParam" within translations must be type of "%s"', self::class)
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/DependencyInjection/GeneratorCompilerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Frosh\ThumbnailProcessor\DependencyInjection;

use PhpParser\Node\Stmt\UseUse;
use PhpParser\Node\Stmt\Use_;
use PhpParser\Comment\Doc;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\ConstFetch;
Expand Down Expand Up @@ -175,14 +177,14 @@ private function addUsesOfNamespace(?array &$stmts, string $namespace): void
continue;
}

$uses[] = new Stmt\UseUse(new Name($class));
$uses[] = new UseUse(new Name($class));
}

if (empty($uses)) {
return;
}

array_unshift($stmts, new Stmt\Use_($uses));
array_unshift($stmts, new Use_($uses));
}

private function getFileContent(): ?string
Expand Down
2 changes: 1 addition & 1 deletion src/Service/ConfigReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class ConfigReader
{
private ?string $salesChannelId;
private ?string $salesChannelId = null;

private bool $salesChannelIdDetected = false;

Expand Down

0 comments on commit 24648ec

Please sign in to comment.