Passed
Push — master ( 460ec1...4bf46c )
by Gabriel
07:02
created

FeeCalculator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A netToGross() 0 4 1
1
<?php
2
3
namespace ByTIC\Payments\Utility;
4
5
/**
6
 * Class FeeCalculator
7
 * @package ByTIC\Payments\Utility
8
 */
9
class FeeCalculator
10
{
11
    /**
12
     * @param $amount
13
     * @param $percentage
14
     * @param $fixed
15
     */
16
    public static function netToGross($amount, $percentage, $fixed = 0)
17
    {
18
        $result = ($amount + $fixed) / (1 - $percentage / 100);
19
        return ceil($result);
20
    }
21
}