Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Sep 15, 2023
1 parent 5772ed3 commit 4393bba
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 58 deletions.
4 changes: 1 addition & 3 deletions bundle/Controller/WebhookController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ final class WebhookController extends AbstractController
public const CONTENT_TYPE_UNPUBLISH = 'ContentManagement.ContentType.unpublish';
public const CONTENT_TYPE_DELETE = 'ContentManagement.ContentType.delete';

public function __construct(private Contentful $contentful)
{
}
public function __construct(private Contentful $contentful) {}

/**
* Contentful webhook for clearing local caches.
Expand Down
4 changes: 1 addition & 3 deletions bundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

final class Configuration implements ConfigurationInterface
{
public function __construct(private ExtensionInterface $extension)
{
}
public function __construct(private ExtensionInterface $extension) {}

public function getConfigTreeBuilder(): BaseTreeBuilder
{
Expand Down
4 changes: 1 addition & 3 deletions bundle/Templating/Twig/Runtime/ContentfulRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

final class ContentfulRuntime
{
public function __construct(private Contentful $contentful)
{
}
public function __construct(private Contentful $contentful) {}

/**
* Returns the Contentful entry name.
Expand Down
3 changes: 1 addition & 2 deletions lib/Block/BlockDefinition/Handler/EntryFieldHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ public function __construct(
private RequestStack $requestStack,
private ParserInterface $richTextParser,
private CmsItemBuilderInterface $cmsItemBuilder,
) {
}
) {}

public function buildParameters(ParameterBuilderInterface $builder): void
{
Expand Down
4 changes: 1 addition & 3 deletions lib/Browser/Backend/ContentfulBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@

final class ContentfulBackend implements BackendInterface
{
public function __construct(private Contentful $contentful)
{
}
public function __construct(private Contentful $contentful) {}

public function getSections(): iterable
{
Expand Down
4 changes: 1 addition & 3 deletions lib/Browser/Item/Client/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

final class Location implements LocationInterface, ClientInterface
{
public function __construct(private ContentfulClientInterface $client, private string $id)
{
}
public function __construct(private ContentfulClientInterface $client, private string $id) {}

public function getLocationId(): string
{
Expand Down
4 changes: 1 addition & 3 deletions lib/Browser/Item/ColumnProvider/Entry/CreatedAt.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@

final class CreatedAt implements ColumnValueProviderInterface
{
public function __construct(private string $dateFormat)
{
}
public function __construct(private string $dateFormat) {}

public function getValue(ItemInterface $item): ?string
{
Expand Down
4 changes: 1 addition & 3 deletions lib/Browser/Item/ColumnProvider/Entry/UpdatedAt.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@

final class UpdatedAt implements ColumnValueProviderInterface
{
public function __construct(private string $dateFormat)
{
}
public function __construct(private string $dateFormat) {}

public function getValue(ItemInterface $item): ?string
{
Expand Down
4 changes: 1 addition & 3 deletions lib/Browser/Item/Entry/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

final class Item implements ItemInterface, EntryInterface
{
public function __construct(private ContentfulEntry $entry)
{
}
public function __construct(private ContentfulEntry $entry) {}

public function getValue(): string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
*/
final class ContentfulReferencesHandler implements QueryTypeHandlerInterface
{
public function __construct(private Contentful $contentful, private RequestStack $requestStack)
{
}
public function __construct(private Contentful $contentful, private RequestStack $requestStack) {}

public function buildParameters(ParameterBuilderInterface $builder): void
{
Expand Down
4 changes: 1 addition & 3 deletions lib/Collection/QueryType/Handler/ContentfulSearchHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
*/
final class ContentfulSearchHandler implements QueryTypeHandlerInterface
{
public function __construct(private Contentful $contentful)
{
}
public function __construct(private Contentful $contentful) {}

public function buildParameters(ParameterBuilderInterface $builder): void
{
Expand Down
4 changes: 1 addition & 3 deletions lib/Exception/NotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@

use Exception;

final class NotFoundException extends Exception
{
}
final class NotFoundException extends Exception {}
4 changes: 1 addition & 3 deletions lib/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@

use RuntimeException as BaseRuntimeException;

final class RuntimeException extends BaseRuntimeException
{
}
final class RuntimeException extends BaseRuntimeException {}
4 changes: 1 addition & 3 deletions lib/Item/ValueLoader/EntryValueLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

final class EntryValueLoader implements ValueLoaderInterface
{
public function __construct(private Contentful $contentful)
{
}
public function __construct(private Contentful $contentful) {}

public function load($id): ?ContentfulEntry
{
Expand Down
4 changes: 1 addition & 3 deletions lib/Layout/Resolver/ConditionType/ContentType.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

final class ContentType extends ConditionType
{
public function __construct(private Contentful $contentful)
{
}
public function __construct(private Contentful $contentful) {}

public static function getType(): string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

final class ContentType extends Mapper
{
public function __construct(private Contentful $contentful)
{
}
public function __construct(private Contentful $contentful) {}

public function getFormType(): string
{
Expand Down
4 changes: 1 addition & 3 deletions lib/Layout/Resolver/Form/TargetType/Mapper/Space.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

final class Space extends Mapper
{
public function __construct(private Contentful $contentful)
{
}
public function __construct(private Contentful $contentful) {}

public function getFormType(): string
{
Expand Down
4 changes: 1 addition & 3 deletions lib/Routing/ContentfulEnhancer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

final class ContentfulEnhancer implements RouteEnhancerInterface
{
public function __construct(private Contentful $contentful)
{
}
public function __construct(private Contentful $contentful) {}

public function enhance(array $defaults, Request $request): array
{
Expand Down
4 changes: 1 addition & 3 deletions lib/Routing/EntrySlugger/Configurable.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ final class Configurable implements EntrySluggerInterface
/**
* @param mixed[] $configuration
*/
public function __construct(private array $configuration, private ContainerInterface $sluggers)
{
}
public function __construct(private array $configuration, private ContainerInterface $sluggers) {}

public function getSlug(ContentfulEntry $contentfulEntry): string
{
Expand Down
3 changes: 1 addition & 2 deletions lib/Service/Contentful.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ public function __construct(
private Filesystem $fileSystem,
private string $cacheDir,
private array $routeContentTypes,
) {
}
) {}

/**
* Returns all configured clients.
Expand Down

0 comments on commit 4393bba

Please sign in to comment.