Validation::initValidation()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 1 Features 0
Metric Value
cc 2
eloc 4
c 3
b 1
f 0
nc 2
nop 0
dl 0
loc 6
rs 10
1
<?php
2
3
4
namespace Alkoumi\LaravelArabicTafqeet\Helpers;
5
6
7
trait Validation
8
{
9
10
    public function initValidation()
11
    {
12
        if(is_numeric($this->parsed_number))
13
            return $this;
14
        else
15
            throw new \TypeError('The amount must be a numeric.');
16
    }
17
}
18