getQuoteFieldsAllowedForCustomerQuoteCollectionInSession()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 18

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 18
dl 0
loc 22
rs 9.6666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of the Spryker Commerce OS.
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
declare(strict_types = 1);
9
10
namespace Pyz\Client\MultiCart;
11
12
use Generated\Shared\Transfer\CustomerTransfer;
13
use Generated\Shared\Transfer\QuoteTransfer;
14
use Generated\Shared\Transfer\StoreTransfer;
15
use Spryker\Client\MultiCart\MultiCartConfig as SprykerMultiCartConfig;
16
17
class MultiCartConfig extends SprykerMultiCartConfig
18
{
19
    /**
20
     * @return array<string>
21
     */
22
    public function getQuoteFieldsAllowedForQuoteDuplicate(): array
23
    {
24
        return array_merge(parent::getQuoteFieldsAllowedForQuoteDuplicate(), [
25
            QuoteTransfer::BUNDLE_ITEMS,
26
            QuoteTransfer::CART_NOTE, #CartNoteFeature
27
        ]);
28
    }
29
30
    /**
31
     * @return array<string|array<string>>
32
     */
33
    public function getQuoteFieldsAllowedForCustomerQuoteCollectionInSession(): array
34
    {
35
        return array_merge(parent::getQuoteFieldsAllowedForCustomerQuoteCollectionInSession(), [
36
            QuoteTransfer::ID_QUOTE,
37
            QuoteTransfer::ITEMS,
38
            QuoteTransfer::BUNDLE_ITEMS,
39
            QuoteTransfer::TOTALS,
40
            QuoteTransfer::CURRENCY,
41
            QuoteTransfer::PRICE_MODE,
42
            QuoteTransfer::NAME,
43
            QuoteTransfer::IS_DEFAULT,
44
            QuoteTransfer::CUSTOMER_REFERENCE,
45
            QuoteTransfer::QUOTE_APPROVALS,
46
            QuoteTransfer::CUSTOMER => [
47
                CustomerTransfer::CUSTOMER_REFERENCE,
48
            ],
49
            QuoteTransfer::IS_LOCKED,
50
            QuoteTransfer::STORE => [
51
                StoreTransfer::ID_STORE,
52
                StoreTransfer::NAME,
53
            ],
54
            QuoteTransfer::AMENDMENT_ORDER_REFERENCE,
55
        ]);
56
    }
57
}
58