Skip to content

Commit

Permalink
Merge pull request #35 from shopware/dependabot/composer/all-2cf5e317e5
Browse files Browse the repository at this point in the history
fix(deps): bump the all group with 4 updates
  • Loading branch information
lernhart authored Feb 14, 2024
2 parents 80ba3a5 + 4fa1e35 commit abba838
Show file tree
Hide file tree
Showing 13 changed files with 116 additions and 130 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"symfony/stopwatch": "6.4.*",
"symfony/web-profiler-bundle": "7.0.*",
"symplify/easy-coding-standard": "^12.0",
"symplify/phpstan-rules": "12.4.7",
"symplify/phpstan-rules": "12.4.8",
"tomasvotruba/type-coverage": "^0.2.1"
}
}
210 changes: 98 additions & 112 deletions composer.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class BraintreeConfigurationException extends BraintreeHttpException
{
public const ERROR_CODE = 'SWAG_BRAINTREE__CONFIGURATION_EXCEPTION';

public function __construct(\Throwable $previous = null)
public function __construct(?\Throwable $previous = null)
{
parent::__construct(
'Braintree configuration is invalid.',
Expand Down
2 changes: 1 addition & 1 deletion src/Braintree/Exception/BraintreePaymentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class BraintreePaymentException extends BraintreeHttpException
{
public const ERROR_CODE = 'SWAG_BRAINTREE__PAYMENT_EXCEPTION';

public function __construct(string $message, array $parameters = [], \Throwable $e = null, ShopInterface $shop = null)
public function __construct(string $message, array $parameters = [], ?\Throwable $e = null, ?ShopInterface $shop = null)
{
if ($shop) {
$parameters['shopId'] = $shop->getShopId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class BraintreeTransactionNotFoundException extends BraintreeHttpException
/**
* @param string[] $orderTransactionIds
*/
public function __construct(array $orderTransactionIds, ShopInterface $shop, string $braintreeTransactionId = null, array $parameters = [])
public function __construct(array $orderTransactionIds, ShopInterface $shop, ?string $braintreeTransactionId = null, array $parameters = [])
{
$parameters['shopId'] = $shop->getShopId();
$parameters['orderTransactionIds'] = $orderTransactionIds;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct(
) {
}

public static function connected(MerchantAccount $merchantAccount = null): self
public static function connected(?MerchantAccount $merchantAccount = null): self
{
return new self(self::STATUS_CONNECTED, $merchantAccount);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Framework/Exception/BraintreeHttpException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ abstract class BraintreeHttpException extends HttpException
public function __construct(
string $message,
array $parameters = [],
\Throwable $e = null
?\Throwable $e = null
) {
$this->parameters = $parameters;
$message = $this->parse($message, $parameters);
Expand Down
2 changes: 1 addition & 1 deletion src/Framework/Exception/ShopNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ShopNotFoundException extends BraintreeHttpException
{
public const ERROR_CODE = 'SWAG_BRAINTREE__SHOP_NOT_FOUND';

public function __construct(string $shopId, \Throwable $e = null)
public function __construct(string $shopId, ?\Throwable $e = null)
{
parent::__construct(
'Shop "{{ shopId }}" not found.',
Expand Down
4 changes: 2 additions & 2 deletions src/Framework/Serializer/BraintreeNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ class BraintreeNormalizer implements NormalizerInterface
*
* @return array<int, array<string, mixed>>
*/
public function normalize(mixed $object, string $format = null, array $context = []): array
public function normalize(mixed $object, ?string $format = null, array $context = []): array
{
return \array_map(fn (Instance $braintreeObject) => $braintreeObject->toArray(), $object);
}

public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool
public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
if (!\is_array($data) || \count($data) === 0) {
return false;
Expand Down
8 changes: 4 additions & 4 deletions src/Framework/Serializer/CollectionNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CollectionNormalizer implements NormalizerInterface, DenormalizerInterface
*
* @return mixed[]
*/
public function normalize(mixed $object, string $format = null, array $context = []): array
public function normalize(mixed $object, ?string $format = null, array $context = []): array
{
return $object->map(function (EntityInterface|AbstractShop $item) {
if ($item instanceof AbstractShop) {
Expand All @@ -30,7 +30,7 @@ public function normalize(mixed $object, string $format = null, array $context =
})->toArray();
}

public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool
public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return $data instanceof Collection && $data->forAll(function ($_, $item) {
return $item instanceof EntityInterface || $item instanceof AbstractShop;
Expand All @@ -42,12 +42,12 @@ public function supportsNormalization(mixed $data, string $format = null, array
*
* @return Collection<string, mixed>
*/
public function denormalize(mixed $data, string $type, string $format = null, array $context = []): Collection
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): Collection
{
return new ArrayCollection($data);
}

public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool
public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool
{
return \is_subclass_of($type, Collection::class, true) && \is_array($data);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Framework/Serializer/EntityNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct(
* @param EntityInterface|AbstractShop $object
* @param array<string, mixed> $context
*/
public function normalize(mixed $object, string $format = null, array $context = []): string|array|\ArrayObject|bool|float|int|null
public function normalize(mixed $object, ?string $format = null, array $context = []): string|array|\ArrayObject|bool|float|int|null
{
if (\array_key_exists(self::ORIGINAL_DATA, $context) && $context[self::ORIGINAL_DATA]) {
$objectClass = $this->normalizeSwagNamespace($object::class);
Expand All @@ -42,7 +42,7 @@ public function normalize(mixed $object, string $format = null, array $context =
return $this->normalizer->normalize($object, $format, $context);
}

public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool
public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return $data instanceof EntityInterface || $data instanceof AbstractShop;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Doctrine/RespectfulUuidGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function testGenerateIdWithExistingId(): void
static::assertSame($uuid, $id);
}

private function getTestEntity(Uuid $id = null): EntityInterface
private function getTestEntity(?Uuid $id = null): EntityInterface
{
return new class($id) implements EntityInterface {
public function __construct(private ?Uuid $id = null)
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Framework/Exception/BraintreeHttpExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function testCommonErrorDataIsAvailable(): void
private function getException(
string $message,
array $parameters = [],
\Throwable $previous = null,
?\Throwable $previous = null,
string $errorCode = 'SWAG_BRAINTREE__TEST',
): TestException {
return new TestException($message, $parameters, $previous, $errorCode);
Expand All @@ -136,7 +136,7 @@ class TestException extends BraintreeHttpException
public function __construct(
string $message,
array $parameters = [],
\Throwable $e = null,
?\Throwable $e = null,
string $errorCode = 'SWAG_BRAINTREE__TEST',
) {
$this->errorCode = $errorCode;
Expand Down

0 comments on commit abba838

Please sign in to comment.