Completed
Pull Request — dev (#9)
by Andrey
13:09 queued 06:45
created

queryPaymentByCaptureReferenceId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Apache OSL-2
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\AmazonPay\Persistence;
9
10
use Propel\Runtime\ActiveQuery\Criteria;
11
use Spryker\Zed\Kernel\Persistence\AbstractQueryContainer;
12
13
/**
14
 * @method \SprykerEco\Zed\AmazonPay\Persistence\AmazonPayPersistenceFactory getFactory()
15
 */
16
class AmazonPayQueryContainer extends AbstractQueryContainer implements AmazonPayQueryContainerInterface
17
{
18
    /**
19
     * @api
20
     *
21
     * @param string $orderReferenceId
22
     *
23
     * @return \Orm\Zed\AmazonPay\Persistence\SpyPaymentAmazonpayQuery
1 ignored issue
show
Bug introduced by
The type Orm\Zed\AmazonPay\Persis...pyPaymentAmazonpayQuery was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
24
     */
25
    public function queryPaymentByOrderReferenceId($orderReferenceId)
26
    {
27
        return $this
28
            ->queryPayments()
29
            ->filterByOrderReferenceId($orderReferenceId);
30
    }
31
32
    /**
33
     * @api
34
     *
35
     * @param string $authorizationReferenceId
36
     *
37
     * @return \Orm\Zed\AmazonPay\Persistence\SpyPaymentAmazonpayQuery
38
     */
39
    public function queryPaymentByAuthorizationReferenceId($authorizationReferenceId)
40
    {
41
        return $this
42
            ->queryPayments()
43
            ->filterByAuthorizationReferenceId($authorizationReferenceId);
44
    }
45
46
    /**
47
     * @api
48
     *
49
     * @param string $captureReferenceId
50
     *
51
     * @return \Orm\Zed\AmazonPay\Persistence\SpyPaymentAmazonpayQuery
52
     */
53
    public function queryPaymentByCaptureReferenceId($captureReferenceId)
54
    {
55
        return $this
56
            ->queryPayments()
57
            ->filterByCaptureReferenceId($captureReferenceId);
58
    }
59
60
    /**
61
     * @api
62
     *
63
     * @param string $refundReferenceId
64
     *
65
     * @return \Orm\Zed\AmazonPay\Persistence\SpyPaymentAmazonpayQuery
66
     */
67
    public function queryPaymentByRefundReferenceId($refundReferenceId)
68
    {
69
        return $this
70
            ->queryPayments()
71
            ->filterByRefundReferenceId($refundReferenceId);
72
    }
73
74
    /**
75
     * @api
76
     *
77
     * @param string $authorizationReferenceId
78
     * @param \Orm\Zed\Sales\Persistence\SpySalesOrderItem[] $excludeItems
79
     *
80
     * @return \Orm\Zed\AmazonPay\Persistence\SpyPaymentAmazonpayQuery
81
     */
82
    public function querySalesOrderItemsByPaymentReferenceId($authorizationReferenceId, array $excludeItems)
83
    {
84
        return $this->getFactory()
85
            ->createSalesOrderItemQuery()
86
            ->filterByIdSalesOrderItem($excludeItems, Criteria::NOT_IN)
87
            ->useSpyPaymentAmazonpaySalesOrderItemQuery()
88
                ->useSpyPaymentAmazonpayQuery()
89
                    ->filterByAuthorizationReferenceId($authorizationReferenceId)
90
                ->endUse()
91
            ->endUse();
92
    }
93
94
    /**
95
     * @api
96
     *
97
     * @param int $salesOrderItemId
98
     *
99
     * @return \Orm\Zed\AmazonPay\Persistence\SpyPaymentAmazonpayQuery
100
     */
101
    public function queryPaymentBySalesOrderItemId($salesOrderItemId)
102
    {
103
        return $this->getFactory()
104
            ->createPaymentAmazonpayQuery()
105
            ->useSpyPaymentAmazonpaySalesOrderItemQuery()
106
                ->filterByFkSalesOrderItem($salesOrderItemId)
107
            ->endUse();
108
    }
109
110
    /**
111
     * @api
112
     *
113
     * @param int $salesOrderItemId
114
     *
115
     * @return \Orm\Zed\AmazonPay\Persistence\SpyPaymentAmazonpaySalesOrderItemQuery
1 ignored issue
show
Bug introduced by
The type Orm\Zed\AmazonPay\Persis...npaySalesOrderItemQuery was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
116
     */
117
    public function queryBySalesOrderItemId($salesOrderItemId)
118
    {
119
        return $this->getFactory()
120
            ->createPaymentAmazonpaySalesOrderItemQuery()
121
            ->filterByFkSalesOrderItem($salesOrderItemId);
122
    }
123
124
    /**
125
     * @api
126
     *
127
     * @return \Orm\Zed\AmazonPay\Persistence\SpyPaymentAmazonpayQuery
128
     */
129
    protected function queryPayments()
130
    {
131
        return $this
132
            ->getFactory()
133
            ->createPaymentAmazonpayQuery();
134
    }
135
}
136