Juros   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 10
c 2
b 0
f 0
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A setJuros() 0 7 2
1
<?php
2
namespace Itau\API\BoleCode;
3
4
use Itau\API\TraitEntity;
5
use JsonSerializable;
6
7
class Juros implements JsonSerializable
8
{
9
    use TraitEntity;
10
11
    const SEM_JUROS = '05';
12
    const PERCENTUAL_MENSAL = '90';
13
14
    private string $codigo_tipo_juros;
15
    private string $percentual_juros;
16
17
    public function setJuros($codigo, $percentual): self
18
    {
19
        $this->codigo_tipo_juros = $codigo;
20
        if($codigo != self::SEM_JUROS){
21
            $this->percentual_juros = $percentual*100000;
22
        }
23
        return $this;
24
    }
25
}