Skip to content

Commit f3e72ca

Browse files
committed
38264: fix static failures and implement suggested changes
1 parent e58c708 commit f3e72ca

File tree

5 files changed

+23
-22
lines changed

5 files changed

+23
-22
lines changed

app/code/Magento/SalesGraphQl/Model/Formatter/Order.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2020 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -20,8 +20,6 @@
2020
*/
2121
class Order
2222
{
23-
private TimezoneInterface $timezone;
24-
2523
/**
2624
* @param OrderAddress $orderAddress
2725
* @param OrderPayments $orderPayments
@@ -30,7 +28,7 @@ class Order
3028
public function __construct(
3129
private readonly OrderAddress $orderAddress,
3230
private readonly OrderPayments $orderPayments,
33-
TimezoneInterface $timezone = null
31+
private ?TimezoneInterface $timezone = null
3432
) {
3533
$this->timezone = $timezone ?: ObjectManager::getInstance()->get(TimezoneInterface::class);
3634
}

app/code/Magento/SalesGraphQl/Model/Resolver/CreditMemo/CreditMemoComments.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2020 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -21,10 +21,11 @@
2121
*/
2222
class CreditMemoComments implements ResolverInterface
2323
{
24-
private TimezoneInterface $timezone;
25-
24+
/**
25+
* @param TimezoneInterface|null $timezone
26+
*/
2627
public function __construct(
27-
TimezoneInterface $timezone = null
28+
private ?TimezoneInterface $timezone = null
2829
) {
2930
$this->timezone = $timezone ?: ObjectManager::getInstance()->get(TimezoneInterface::class);
3031
}

app/code/Magento/SalesGraphQl/Model/Resolver/Invoices.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2020 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -22,10 +22,11 @@
2222
*/
2323
class Invoices implements ResolverInterface
2424
{
25-
private TimezoneInterface $timezone;
26-
25+
/**
26+
* @param TimezoneInterface|null $timezone
27+
*/
2728
public function __construct(
28-
TimezoneInterface $timezone = null
29+
private ?TimezoneInterface $timezone = null
2930
) {
3031
$this->timezone = $timezone ?: ObjectManager::getInstance()->get(TimezoneInterface::class);
3132
}

app/code/Magento/SalesGraphQl/Model/Resolver/Shipments.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2020 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -22,10 +22,11 @@
2222
*/
2323
class Shipments implements ResolverInterface
2424
{
25-
private TimezoneInterface $timezone;
26-
25+
/**
26+
* @param TimezoneInterface|null $timezone
27+
*/
2728
public function __construct(
28-
TimezoneInterface $timezone = null
29+
private ?TimezoneInterface $timezone = null
2930
) {
3031
$this->timezone = $timezone ?: ObjectManager::getInstance()->get(TimezoneInterface::class);
3132
}

dev/tests/api-functional/testsuite/Magento/GraphQl/Sales/RetrieveOrdersByOrderNumberTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2020 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

0 commit comments

Comments
 (0)