Skip to content

Commit

Permalink
Ran php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
sebprt committed Oct 10, 2023
1 parent a427654 commit 3048076
Show file tree
Hide file tree
Showing 26 changed files with 29 additions and 77 deletions.
3 changes: 1 addition & 2 deletions src/Builder/AlternativeLookup.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ final class AlternativeLookup implements Builder

public function __construct(
private readonly Builder $capacity,
) {
}
) {}

public function withMerge(Builder $merge): self
{
Expand Down
4 changes: 1 addition & 3 deletions src/Builder/Capacity/Extractor/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ final class Get implements Builder
private null|Node\Expr|Node\Identifier $endpoint = null;
private null|Node\Expr $identifier = null;

public function __construct()
{
}
public function __construct() {}

public function withEndpoint(Node\Expr|Node\Identifier $endpoint): self
{
Expand Down
4 changes: 1 addition & 3 deletions src/Builder/Capacity/Extractor/ListPerPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ final class ListPerPage implements Builder
private null|Node\Expr $search = null;
private null|Node\Expr $code = null;

public function __construct()
{
}
public function __construct() {}

public function withEndpoint(Node\Expr|Node\Identifier $endpoint): self
{
Expand Down
4 changes: 1 addition & 3 deletions src/Builder/Capacity/Lookup/All.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ final class All implements Builder
private null|Node\Expr $code = null;
private string $type = '';

public function __construct()
{
}
public function __construct() {}

public function withEndpoint(Node\Expr|Node\Identifier $endpoint): self
{
Expand Down
4 changes: 1 addition & 3 deletions src/Builder/Capacity/Lookup/Download.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ final class Download implements Builder
private null|Node\Expr|Node\Identifier $endpoint = null;
private null|Node\Expr $file = null;

public function __construct()
{
}
public function __construct() {}

public function withEndpoint(Node\Expr|Node\Identifier $endpoint): self
{
Expand Down
4 changes: 1 addition & 3 deletions src/Builder/Capacity/Lookup/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ final class Get implements Builder
private null|Node\Expr $code = null;
private null|string $type = '';

public function __construct()
{
}
public function __construct() {}

public function withEndpoint(Node\Expr|Node\Identifier $endpoint): self
{
Expand Down
4 changes: 1 addition & 3 deletions src/Builder/Capacity/Lookup/ListPerPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ final class ListPerPage implements Builder
private null|Node\Expr $search = null;
private null|Node\Expr $code = null;

public function __construct()
{
}
public function __construct() {}

public function withEndpoint(Node\Expr|Node\Identifier $endpoint): self
{
Expand Down
4 changes: 1 addition & 3 deletions src/Builder/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ final class Client implements Builder
private ?Node\Expr $httpStreamFactory = null;
private ?Node\Expr $fileSystem = null;

public function __construct(private readonly Node\Expr $baseUrl, private readonly Node\Expr $clientId, private readonly Node\Expr $secret)
{
}
public function __construct(private readonly Node\Expr $baseUrl, private readonly Node\Expr $clientId, private readonly Node\Expr $secret) {}

public function withToken(Node\Expr $token, Node\Expr $refreshToken): self
{
Expand Down
4 changes: 1 addition & 3 deletions src/Builder/ConditionalLookup.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ final class ConditionalLookup implements StepBuilderInterface
private iterable $alternatives = [];
private ?Node\Expr $client = null;

public function __construct()
{
}
public function __construct() {}

public function withClient(Node\Expr $client): self
{
Expand Down
3 changes: 1 addition & 2 deletions src/Builder/Extractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ final class Extractor implements StepBuilderInterface

public function __construct(
private readonly Builder $capacity,
) {
}
) {}

public function withClient(Node\Expr $client): self
{
Expand Down
4 changes: 1 addition & 3 deletions src/Builder/Inline.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@

final readonly class Inline implements Builder
{
public function __construct(private ArrayBuilderInterface|ObjectBuilderInterface $mapper)
{
}
public function __construct(private ArrayBuilderInterface|ObjectBuilderInterface $mapper) {}

public function getNode(): Node
{
Expand Down
3 changes: 1 addition & 2 deletions src/Builder/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ final class Loader implements StepBuilderInterface

public function __construct(
private readonly Builder $capacity,
) {
}
) {}

public function withClient(Node\Expr $client): self
{
Expand Down
4 changes: 1 addition & 3 deletions src/Builder/Lookup.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ final class Lookup implements StepBuilderInterface
private ?Node\Expr $logger = null;
private ?Node\Expr $client = null;

public function __construct(private readonly AlternativeLookup $alternative)
{
}
public function __construct(private readonly AlternativeLookup $alternative) {}

public function withClient(Node\Expr $client): self
{
Expand Down
3 changes: 1 addition & 2 deletions src/Builder/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ final class Search implements Builder
{
public function __construct(
private array $filters = []
) {
}
) {}

public function addFilter(
Node\Expr $field,
Expand Down
10 changes: 4 additions & 6 deletions src/Capacity/Extractor/All.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ final class All implements Akeneo\Capacity\CapacityInterface
'UNCLASSIFIED',
];

public function __construct(private readonly ExpressionLanguage $interpreter)
{
}
public function __construct(private readonly ExpressionLanguage $interpreter) {}

public function applies(array $config): bool
{
Expand Down Expand Up @@ -96,19 +94,19 @@ public function getBuilder(array $config): Builder
->withEndpoint(new Node\Identifier(sprintf('get%sApi', ucfirst((string) $config['type']))))
;

if (isset($config['search']) && \is_array($config['search']) && count($config['search']) > 0) {
if (isset($config['search']) && \is_array($config['search']) && \count($config['search']) > 0) {
$builder->withSearch($this->compileFilters(...$config['search']));
}

if (\in_array($config['type'], ['attributeOption', 'assetManager']) && \array_key_exists('code', $config)) {
$builder->withCode(compileValueWhenExpression($this->interpreter, $config['code']));
}

if ($config['type'] == 'referenceEntityRecord') {
if ('referenceEntityRecord' == $config['type']) {
$builder->withReferenceEntityCode(compileValueWhenExpression($this->interpreter, $config['reference_entity']));
}

if ($config['type'] == 'referenceEntityAttributeOption') {
if ('referenceEntityAttributeOption' == $config['type']) {
$builder->withReferenceEntityCode(compileValueWhenExpression($this->interpreter, $config['reference_entity']));
$builder->withReferenceEntityAttributeOption(compileValueWhenExpression($this->interpreter, $config['reference_entity_option']));
}
Expand Down
4 changes: 1 addition & 3 deletions src/Capacity/Extractor/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ final class Get implements Akeneo\Capacity\CapacityInterface
'assetManager',
];

public function __construct(private readonly ExpressionLanguage $interpreter)
{
}
public function __construct(private readonly ExpressionLanguage $interpreter) {}

public function applies(array $config): bool
{
Expand Down
4 changes: 1 addition & 3 deletions src/Capacity/Extractor/ListPerPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ final class ListPerPage implements Akeneo\Capacity\CapacityInterface
'UNCLASSIFIED',
];

public function __construct(private readonly ExpressionLanguage $interpreter)
{
}
public function __construct(private readonly ExpressionLanguage $interpreter) {}

public function applies(array $config): bool
{
Expand Down
4 changes: 1 addition & 3 deletions src/Capacity/Loader/Upsert.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ final class Upsert implements Akeneo\Capacity\CapacityInterface
'referenceEntity',
];

public function __construct(private readonly ExpressionLanguage $interpreter)
{
}
public function __construct(private readonly ExpressionLanguage $interpreter) {}

public function applies(array $config): bool
{
Expand Down
4 changes: 1 addition & 3 deletions src/Capacity/Lookup/All.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ final class All implements Akeneo\Capacity\CapacityInterface
'UNCLASSIFIED',
];

public function __construct(private readonly ExpressionLanguage $interpreter)
{
}
public function __construct(private readonly ExpressionLanguage $interpreter) {}

public function applies(array $config): bool
{
Expand Down
4 changes: 1 addition & 3 deletions src/Capacity/Lookup/Download.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ final class Download implements Akeneo\Capacity\CapacityInterface
'assetMediaFile',
];

public function __construct(private readonly ExpressionLanguage $interpreter)
{
}
public function __construct(private readonly ExpressionLanguage $interpreter) {}

public function applies(array $config): bool
{
Expand Down
4 changes: 1 addition & 3 deletions src/Capacity/Lookup/Get.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ final class Get implements Akeneo\Capacity\CapacityInterface
'assetManager',
];

public function __construct(private readonly ExpressionLanguage $interpreter)
{
}
public function __construct(private readonly ExpressionLanguage $interpreter) {}

public function applies(array $config): bool
{
Expand Down
4 changes: 1 addition & 3 deletions src/Capacity/Lookup/ListPerPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ final class ListPerPage implements Akeneo\Capacity\CapacityInterface
'UNCLASSIFIED',
];

public function __construct(private readonly ExpressionLanguage $interpreter)
{
}
public function __construct(private readonly ExpressionLanguage $interpreter) {}

public function applies(array $config): bool
{
Expand Down
4 changes: 1 addition & 3 deletions src/Factory/NoApplicableCapacityException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

namespace Kiboko\Plugin\Akeneo\Factory;

final class NoApplicableCapacityException extends \OutOfRangeException
{
}
final class NoApplicableCapacityException extends \OutOfRangeException {}
4 changes: 1 addition & 3 deletions src/MissingAuthenticationMethodException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

namespace Kiboko\Plugin\Akeneo;

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

namespace Kiboko\Plugin\Akeneo;

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

namespace Kiboko\Plugin\Akeneo;

final class MissingParameterException extends \UnexpectedValueException
{
}
final class MissingParameterException extends \UnexpectedValueException {}

0 comments on commit 3048076

Please sign in to comment.