FinalCustomer   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A validate() 0 7 2
A __construct() 0 3 1
1
<?php
2
3
namespace Luilliarcec\LaravelEcuadorIdentification\Support\Identifications;
4
5
use Luilliarcec\LaravelEcuadorIdentification\Support\BaseIdentification;
6
7
class FinalCustomer extends BaseIdentification
8
{
9
    public function __construct()
10
    {
11
        $this->billingCode = '07';
12
    }
13
14
    public function validate(string $identification_number)
15
    {
16
        if ($identification_number != "9999999999999") {
17
            throw new \Exception('The identification number is invalid.');
18
        }
19
20
        return $this->billingCode;
21
    }
22
}
23