SerialConnector   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A checkSN() 0 9 1
1
<?php
2
/* 
3
	Author: Irfa Ardiansyah <[email protected]>
4
*/
5
namespace Irfa\AppLicenseClient\Core;
6
7
use Illuminate\Support\Str;
8
use Ixudra\Curl\Facades\Curl;
9
10
class SerialConnector
11
{
12
	protected $res_active;
13
	protected $res_message;
14
15
	protected function checkSN()
16
	{
17
		$json = json_decode(Curl::to(config('irfa.app_license_client.url'))
18
	    ->withData(array('serial' => config('irfa.app_license_client.serial_number')))
19
	    ->post());
20
		$this->res_active = $json->data->active;
21
		$this->res_message = $json->data->message;
22
23
		return $this->res_active;
24
	}
25
}
26