SN::generateSN()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 1
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
/* 
3
	Author: Irfa Ardiansyah <[email protected]>
4
*/
5
namespace Irfa\SerialNumber\Core;
6
7
class SN extends SerialNumberGenerator
8
{
9
    private $generated_serial;
0 ignored issues
show
introduced by
The private property $generated_serial is not used, and could be removed.
Loading history...
10
    private $serial;
0 ignored issues
show
introduced by
The private property $serial is not used, and could be removed.
Loading history...
11
12
    protected function generateSN($json=false)
13
    {
14
    	if($json)
15
    	{
16
    		return json_encode(['sn'=>$this->generatingSN()]);
17
    	}
18
        return $this->generatingSN();
19
    }
20
21
}
22