Passed
Push — main ( 3df85b...6e75fa )
by Iain
05:19
created

EntityFactory::getSubscriptionPlanEntity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * Copyright Humbly Arrogant Software Limited 2020-2023.
7
 *
8
 * Use of this software is governed by the Business Source License included in the LICENSE file and at https://getparthenon.com/docs/next/license.
9
 *
10
 * Change Date: 26.06.2026 ( 3 years after 2.2.0 release )
11
 *
12
 * On the date above, in accordance with the Business Source License, use of this software will be governed by the open source license specified in the LICENSE file.
13
 */
14
15
namespace Parthenon\Billing\Factory;
16
17
use App\Entity\Price;
0 ignored issues
show
Bug introduced by
The type App\Entity\Price 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...
18
use App\Entity\Product;
0 ignored issues
show
Bug introduced by
The type App\Entity\Product 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...
19
use Parthenon\Billing\Entity\ChargeBack;
20
use Parthenon\Billing\Entity\Payment;
21
use Parthenon\Billing\Entity\PriceInterface;
22
use Parthenon\Billing\Entity\ProductInterface;
23
use Parthenon\Billing\Entity\Subscription;
24
use Parthenon\Billing\Entity\SubscriptionPlan;
25
use Parthenon\Billing\Entity\SubscriptionPlanInterface;
26
27
class EntityFactory implements EntityFactoryInterface
28
{
29
    public function getSubscriptionEntity(): Subscription
30
    {
31
        return new Subscription();
32
    }
33
34
    public function getPaymentEntity(): Payment
35
    {
36
        return new Payment();
37
    }
38
39
    public function getChargeBackEntity(): ChargeBack
40
    {
41
        return new ChargeBack();
42
    }
43
44
    public function getProductEntity(): ProductInterface
45
    {
46
        return new Product();
47
    }
48
49
    public function getPriceEntity(): PriceInterface
50
    {
51
        return new Price();
52
    }
53
54
    public function getSubscriptionPlanEntity(): SubscriptionPlanInterface
55
    {
56
        return new SubscriptionPlan();
57
    }
58
}
59