BraintreePersistenceFactory   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A createBraintreePersistenceMapper() 0 3 1
A createPaymentBraintreeTransactionRequestLogQuery() 0 3 1
A createPaymentBraintreeQuery() 0 3 1
A createPaymentBraintreeTransactionStatusLogQuery() 0 3 1
A createPaymentBraintreeOrderItemQuery() 0 3 1
1
<?php
2
3
/**
4
 * MIT License
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace SprykerEco\Zed\Braintree\Persistence;
9
10
use Orm\Zed\Braintree\Persistence\SpyPaymentBraintreeOrderItemQuery;
0 ignored issues
show
Bug introduced by
The type Orm\Zed\Braintree\Persis...BraintreeOrderItemQuery 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...
11
use Orm\Zed\Braintree\Persistence\SpyPaymentBraintreeQuery;
0 ignored issues
show
Bug introduced by
The type Orm\Zed\Braintree\Persis...pyPaymentBraintreeQuery 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...
12
use Orm\Zed\Braintree\Persistence\SpyPaymentBraintreeTransactionRequestLogQuery;
0 ignored issues
show
Bug introduced by
The type Orm\Zed\Braintree\Persis...nsactionRequestLogQuery 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...
13
use Orm\Zed\Braintree\Persistence\SpyPaymentBraintreeTransactionStatusLogQuery;
0 ignored issues
show
Bug introduced by
The type Orm\Zed\Braintree\Persis...ansactionStatusLogQuery 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...
14
use Spryker\Zed\Kernel\Persistence\AbstractPersistenceFactory;
15
use SprykerEco\Zed\Braintree\Persistence\Mapper\BraintreePersistenceMapper;
16
use SprykerEco\Zed\Braintree\Persistence\Mapper\BraintreePersistenceMapperInterface;
17
18
/**
19
 * @method \SprykerEco\Zed\Braintree\BraintreeConfig getConfig()
20
 * @method \SprykerEco\Zed\Braintree\Persistence\BraintreeQueryContainerInterface getQueryContainer()
21
 * @method \SprykerEco\Zed\Braintree\Persistence\BraintreeEntityManagerInterface getEntityManager()
22
 * @method \SprykerEco\Zed\Braintree\Persistence\BraintreeRepositoryInterface getRepository()
23
 */
24
class BraintreePersistenceFactory extends AbstractPersistenceFactory
25
{
26
    /**
27
     * @return \SprykerEco\Zed\Braintree\Persistence\Mapper\BraintreePersistenceMapperInterface
28
     */
29
    public function createBraintreePersistenceMapper(): BraintreePersistenceMapperInterface
30
    {
31
        return new BraintreePersistenceMapper();
32
    }
33
34
    /**
35
     * @return \Orm\Zed\Braintree\Persistence\SpyPaymentBraintreeQuery
36
     */
37
    public function createPaymentBraintreeQuery()
38
    {
39
        return SpyPaymentBraintreeQuery::create();
40
    }
41
42
    /**
43
     * @return \Orm\Zed\Braintree\Persistence\SpyPaymentBraintreeTransactionStatusLogQuery
44
     */
45
    public function createPaymentBraintreeTransactionStatusLogQuery()
46
    {
47
        return SpyPaymentBraintreeTransactionStatusLogQuery::create();
48
    }
49
50
    /**
51
     * @return \Orm\Zed\Braintree\Persistence\SpyPaymentBraintreeTransactionRequestLogQuery
52
     */
53
    public function createPaymentBraintreeTransactionRequestLogQuery()
54
    {
55
        return SpyPaymentBraintreeTransactionRequestLogQuery::create();
56
    }
57
58
    /**
59
     * @return \Orm\Zed\Braintree\Persistence\SpyPaymentBraintreeOrderItemQuery
60
     */
61
    public function createPaymentBraintreeOrderItemQuery(): SpyPaymentBraintreeOrderItemQuery
62
    {
63
        return SpyPaymentBraintreeOrderItemQuery::create();
64
    }
65
}
66