Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
Apply PER 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SerafimArts committed Oct 14, 2023
1 parent d893320 commit d0debf3
Show file tree
Hide file tree
Showing 22 changed files with 23 additions and 54 deletions.
4 changes: 2 additions & 2 deletions app/Application/Console/Commands/DocsDiffCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ protected function getSourceFile(FileInterface $file): FileInterface
$branch = $file->getBranch();

return $this->source->getBranches()
->first(fn (BranchInterface $b) => $b->getName() === $branch->getName())
->first(fn(BranchInterface $b) => $b->getName() === $branch->getName())
->getFiles()
->first(fn (FileInterface $f) => $f->getPathname() === $file->getPathname())
->first(fn(FileInterface $f) => $f->getPathname() === $file->getPathname())
;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
public function __construct(
private ViewFactoryInterface $factory,
private ArticleRepositoryInterface $articles,
) {
}
) {}

public function __invoke(string $urn): ViewInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
public function __construct(
private ViewFactoryInterface $views,
private DocumentationRepositoryInterface $docs,
) {
}
) {}

public function __invoke(Version $current, string $version, string $page): ViewInterface
{
Expand Down
3 changes: 1 addition & 2 deletions app/Application/Http/Controllers/Web/Home/ShowController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
{
public function __construct(
private ViewFactoryInterface $views,
) {
}
) {}

public function __invoke(): ViewInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
{
public function __construct(
private VersionRepositoryInterface $versions,
) {
}
) {}

public function __invoke(Redirector $redirector): RedirectResponse
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
public function __construct(
private ViewFactoryInterface $views,
private VersionRepositoryInterface $versions,
) {
}
) {}

public function __invoke(Version $version): ViewInterface
{
Expand Down
3 changes: 1 addition & 2 deletions app/Application/Http/Controllers/Web/Test/ShowController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
{
public function __construct(
private ViewFactoryInterface $views,
) {
}
) {}

public function __invoke(): ViewInterface
{
Expand Down
3 changes: 1 addition & 2 deletions app/Application/Http/View/Composers/VersionsComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
{
public function __construct(
private VersionRepositoryInterface $versions
) {
}
) {}

public function compose(View $view): void
{
Expand Down
4 changes: 1 addition & 3 deletions app/Application/Http/View/Directives/DirectiveInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

namespace App\Application\Http\View\Directives;

interface DirectiveInterface
{
}
interface DirectiveInterface {}
4 changes: 1 addition & 3 deletions app/Domain/Article/ArticleId.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@

use App\Domain\Shared\UuidIdentifier;

final readonly class ArticleId extends UuidIdentifier
{
}
final readonly class ArticleId extends UuidIdentifier {}
4 changes: 1 addition & 3 deletions app/Domain/Documentation/DocumentationId.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@

use App\Domain\Shared\UuidIdentifier;

final readonly class DocumentationId extends UuidIdentifier
{
}
final readonly class DocumentationId extends UuidIdentifier {}
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ final class PriorityLimitedQueue implements \IteratorAggregate, \Countable
*/
public function __construct(
private readonly int $limit,
) {
}
) {}

/**
* @return -1|0|1
Expand Down
4 changes: 1 addition & 3 deletions app/Domain/Documentation/Source.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

namespace App\Domain\Documentation;

class Source extends VersionedContent
{
}
class Source extends VersionedContent {}
4 changes: 1 addition & 3 deletions app/Domain/Documentation/SourceVersionId.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@

use App\Domain\Shared\GitObjectIdentifier;

final readonly class SourceVersionId extends GitObjectIdentifier
{
}
final readonly class SourceVersionId extends GitObjectIdentifier {}
4 changes: 1 addition & 3 deletions app/Domain/Documentation/TranslationVersionId.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@

use App\Domain\Shared\GitObjectIdentifier;

final readonly class TranslationVersionId extends GitObjectIdentifier
{
}
final readonly class TranslationVersionId extends GitObjectIdentifier {}
4 changes: 1 addition & 3 deletions app/Domain/Shared/EntityInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

namespace App\Domain\Shared;

interface EntityInterface extends IdentifiableInterface
{
}
interface EntityInterface extends IdentifiableInterface {}
4 changes: 1 addition & 3 deletions app/Domain/Shared/IdentifierInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

namespace App\Domain\Shared;

interface IdentifierInterface extends ValueObjectInterface
{
}
interface IdentifierInterface extends ValueObjectInterface {}
4 changes: 1 addition & 3 deletions app/Domain/Version/VersionId.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@

use App\Domain\Shared\UuidIdentifier;

final readonly class VersionId extends UuidIdentifier
{
}
final readonly class VersionId extends UuidIdentifier {}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
{
public function __construct(
private ClockInterface $clock,
) {
}
) {}

public function prePersist(LifecycleEventArgs $e): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
{
public function __construct(
private FactoryInterface $factory,
) {
}
) {}

private function getRendererForSource(Documentation $entity): ContentRendererInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
{
public function __construct(
private ClockInterface $clock,
) {
}
) {}

private function touch(object $entity): void
{
Expand Down
4 changes: 1 addition & 3 deletions app/Infrastructure/Providers/TelescopeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,5 @@ protected function hideSensitiveRequestDetails(): void
*
* @return void
*/
protected function gate(): void
{
}
protected function gate(): void {}
}

0 comments on commit d0debf3

Please sign in to comment.