ComputopQueryContainer   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 119
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 8
eloc 26
c 0
b 0
f 0
dl 0
loc 119
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A queryPaymentById() 0 5 1
A queryPaymentItemByOrderItemId() 0 5 1
A queryPayments() 0 5 1
A queryPaymentByOrderId() 0 5 1
A queryPaymentOrderItems() 0 5 1
A queryPaymentByPayId() 0 5 1
A getSpySalesOrderItemsById() 0 6 1
A queryPaymentByTransactionId() 0 5 1
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\Computop\Persistence;
9
10
use Spryker\Zed\Kernel\Persistence\AbstractQueryContainer;
11
12
/**
13
 * @method \SprykerEco\Zed\Computop\Persistence\ComputopPersistenceFactory getFactory()
14
 */
15
class ComputopQueryContainer extends AbstractQueryContainer implements ComputopQueryContainerInterface
16
{
17
    /**
18
     * {@inheritDoc}
19
     *
20
     * @api
21
     *
22
     * @param int $idPayment
23
     *
24
     * @return \Orm\Zed\Computop\Persistence\SpyPaymentComputopQuery
0 ignored issues
show
Bug introduced by
The type Orm\Zed\Computop\Persist...SpyPaymentComputopQuery 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...
25
     */
26
    public function queryPaymentById($idPayment)
27
    {
28
        return $this
29
            ->queryPayments()
30
            ->filterByIdPaymentComputop($idPayment);
31
    }
32
33
    /**
34
     * {@inheritDoc}
35
     *
36
     * @api
37
     *
38
     * @param int $idOrder
39
     *
40
     * @return \Orm\Zed\Computop\Persistence\SpyPaymentComputopQuery
41
     */
42
    public function queryPaymentByOrderId($idOrder)
43
    {
44
        return $this
45
            ->queryPayments()
46
            ->filterByFkSalesOrder($idOrder);
47
    }
48
49
    /**
50
     * {@inheritDoc}
51
     *
52
     * @api
53
     *
54
     * @param string $idPay
55
     *
56
     * @return \Orm\Zed\Computop\Persistence\SpyPaymentComputopQuery
57
     */
58
    public function queryPaymentByPayId($idPay)
59
    {
60
        return $this
61
            ->queryPayments()
62
            ->filterByPayId($idPay);
63
    }
64
65
    /**
66
     * {@inheritDoc}
67
     *
68
     * @api
69
     *
70
     * @param string $idTransaction
71
     *
72
     * @return \Orm\Zed\Computop\Persistence\SpyPaymentComputopQuery
73
     */
74
    public function queryPaymentByTransactionId($idTransaction)
75
    {
76
        return $this
77
            ->queryPayments()
78
            ->filterByTransId($idTransaction);
79
    }
80
81
    /**
82
     * {@inheritDoc}
83
     *
84
     * @api
85
     *
86
     * @param int $orderItemId
87
     *
88
     * @return \Orm\Zed\Computop\Persistence\SpyPaymentComputopOrderItemQuery
0 ignored issues
show
Bug introduced by
The type Orm\Zed\Computop\Persist...tComputopOrderItemQuery 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...
89
     */
90
    public function queryPaymentItemByOrderItemId($orderItemId)
91
    {
92
        return $this
93
            ->queryPaymentOrderItems()
94
            ->filterByFkSalesOrderItem($orderItemId);
95
    }
96
97
    /**
98
     * {@inheritDoc}
99
     *
100
     * @api
101
     *
102
     * @param int $idSalesOrder
103
     *
104
     * @return \Orm\Zed\Sales\Persistence\SpySalesOrderItemQuery
0 ignored issues
show
Bug introduced by
The type Orm\Zed\Sales\Persistence\SpySalesOrderItemQuery 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...
105
     */
106
    public function getSpySalesOrderItemsById($idSalesOrder)
107
    {
108
        return $this
109
            ->getFactory()
110
            ->createSpySalesOrderItemQuery()
111
            ->filterByFkSalesOrder($idSalesOrder);
112
    }
113
114
    /**
115
     * @api
116
     *
117
     * @return \Orm\Zed\Computop\Persistence\SpyPaymentComputopQuery
118
     */
119
    protected function queryPayments()
120
    {
121
        return $this
122
            ->getFactory()
123
            ->createPaymentComputopQuery();
124
    }
125
126
    /**
127
     * @return \Orm\Zed\Computop\Persistence\SpyPaymentComputopOrderItemQuery
128
     */
129
    protected function queryPaymentOrderItems()
130
    {
131
        return $this
132
            ->getFactory()
133
            ->createPaymentComputopOrderItemQuery();
134
    }
135
}
136