Passed
Push — master ( 40c70a...5ea387 )
by Jason
01:50
created

PurchasableExtension::StoreURL()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Dynamic\Foxy\Extension;
4
5
use Dynamic\Foxy\Form\AddToCartForm;
6
use Dynamic\Foxy\Model\FoxyHelper;
7
use SilverStripe\Core\Extension;
8
9
class PurchasableExtension extends Extension
10
{
11
    /**
12
     * @var array
13
     */
14
    private static $allowed_actions = array(
0 ignored issues
show
introduced by
The private property $allowed_actions is not used, and could be removed.
Loading history...
15
        'AddToCartForm',
16
    );
17
18
    /**
19
     * @return FoxyStripePurchaseForm
0 ignored issues
show
Bug introduced by
The type Dynamic\Foxy\Extension\FoxyStripePurchaseForm 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...
20
     */
21
    public function AddToCartForm()
22
    {
23
        $form = AddToCartForm::create($this->owner, __FUNCTION__, null, null, null, $this->owner->data());
24
25
        $this->owner->extend('updateAddToCartForm', $form);
26
27
        return $form;
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function StoreURL()
34
    {
35
        $helper = FoxyHelper::create();
36
        return $helper::StoreURL();
37
    }
38
}
39