irfaardy /
app-license-server
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Irfa\AppLicenseServer\Controller; |
||
| 4 | |||
| 5 | use Illuminate\Http\Request; |
||
| 6 | use Irfa\AppLicenseServer\Func\License; |
||
| 7 | use Irfa\AppLicenseServer\Core\Json; |
||
| 8 | use App\Http\Controllers\Controller; |
||
|
0 ignored issues
–
show
|
|||
| 9 | |||
| 10 | class AppLicenseController extends Controller |
||
| 11 | { |
||
| 12 | public function check(Request $request,License $license,Json $json) |
||
| 13 | { |
||
| 14 | if(empty($request->serial)) |
||
| 15 | { |
||
| 16 | $data['active'] = false; |
||
|
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
|
|||
| 17 | $data['message'] = "Serial number must be provided."; |
||
| 18 | return $json->response(400,'data',$data,[]); |
||
| 19 | } |
||
| 20 | $res = $license->serial($request->serial)->check(); |
||
| 21 | if($res->active) |
||
| 22 | { |
||
| 23 | return $json->response(200,'data',$res,[]); |
||
| 24 | } |
||
| 25 | return $json->response(400,'data',$res,[$res->message]); |
||
| 26 | |||
| 27 | } |
||
| 28 | } |
||
| 29 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths