SubtractAction   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 1
c 2
b 1
f 0
lcom 0
cbo 1
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A calculateValue() 0 4 1
1
<?php
2
/**
3
 * NextFlow (http://github.com/nextflow)
4
 *
5
 * @link http://github.com/nextflow/nextflow-php for the canonical source repository
6
 * @copyright Copyright (c) 2014-2016 NextFlow (http://github.com/nextflow)
7
 * @license https://raw.github.com/nextflow/nextflow-php/master/LICENSE MIT
8
 */
9
10
namespace NextFlow\Math\Action;
11
12
/**
13
 * Subtracts two given values from each other.
14
 */
15
final class SubtractAction extends AbstractAction
16
{
17
    /**
18
     * The method that calculates the value.
19
     *
20
     * @param double|float|int $lft The left value.
21
     * @param double|float|int $rgt The right value.
22
     * @return double|float|int Returns the calculated value.
23
     */
24
    protected function calculateValue($lft, $rgt)
25
    {
26
        return $lft - $rgt;
27
    }
28
}
29