Terms   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 7
c 1
b 0
f 0
dl 0
loc 34
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A termTwo() 0 3 1
A termOne() 0 3 1
1
<?php
2
3
namespace Tleckie\DesignPatterns\Strategy;
4
5
/**
6
 * Class Term
7
 *
8
 * @package Tleckie\DesignPatterns\Strategy
9
 * @author  Teodoro Leckie Westberg <[email protected]>
10
 */
11
class Terms implements TermsInterface
12
{
13
    /** @var int|float */
14
    private int|float $one;
15
16
    /** @var int|float */
17
    private int|float $two;
18
19
    /**
20
     * Terms constructor.
21
     *
22
     * @param int|float $one
23
     * @param int|float $two
24
     */
25
    public function __construct(int|float $one, int|float $two)
26
    {
27
        $this->one = $one;
28
        $this->two = $two;
29
    }
30
31
    /**
32
     * @return int|float
33
     */
34
    public function termOne(): int|float
35
    {
36
        return $this->one;
37
    }
38
39
    /**
40
     * @return int|float
41
     */
42
    public function termTwo(): int|float
43
    {
44
        return $this->two;
45
    }
46
}
47