AbstractMethod::isEnabled()   A
last analyzed

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
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file has been created by developers from BitBag.
5
 * Feel free to contact us once you face any issues or want to start
6
 * You can find more information about us on https://bitbag.io and write us
7
 * an email on [email protected].
8
 */
9
10
declare(strict_types=1);
11
12
namespace BitBag\SyliusMolliePlugin\Payments\Methods;
13
14
abstract class AbstractMethod implements MethodInterface
15
{
16
    public const PAYMENT_API = 'PAYMENT_API';
17
18
    public const ORDER_API = 'ORDER_API';
19
20
    use ConfigTrait;
21
22
    /** @var string|null */
23
    protected $name;
24
25
    /** @var string */
26
    protected $description;
27
28
    /** @var array */
29
    protected $config;
30
31
    /** @var bool */
32
    protected $enabled = false;
33
34
    public function getName(): ?string
35
    {
36
        return $this->name;
37
    }
38
39
    public function setName(?string $name): void
40
    {
41
        $this->name = $name;
42
    }
43
44
    public function isEnabled(): bool
45
    {
46
        return $this->enabled;
47
    }
48
49
    public function setEnabled(bool $enabled): void
50
    {
51
        $this->enabled = $enabled;
52
    }
53
}
54