1 | <?php |
||
2 | |||
3 | namespace AraneaDev\Electrum\App\Api; |
||
4 | |||
5 | use App\Http\Controllers\Controller; |
||
0 ignored issues
–
show
|
|||
6 | use AraneaDev\Electrum\Electrum; |
||
7 | |||
8 | /** |
||
9 | * Class StatusController. |
||
10 | */ |
||
11 | class StatusController extends Controller |
||
12 | { |
||
13 | /** @var Electrum */ |
||
14 | protected $electrum; |
||
15 | |||
16 | /** |
||
17 | * StatusController constructor. |
||
18 | * |
||
19 | * @param Electrum $electrum |
||
20 | */ |
||
21 | public function __construct(Electrum $electrum) |
||
22 | { |
||
23 | $this->middleware(config('electrum.web_interface.middleware', ['web', 'auth'])); |
||
24 | $this->electrum = $electrum; |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * Get wallet status and ticker data |
||
29 | * TODO: Make source configurable. |
||
30 | * |
||
31 | * @return \Illuminate\Http\JsonResponse |
||
32 | */ |
||
33 | public function __invoke() |
||
34 | { |
||
35 | return response()->json([ |
||
36 | 'version' => $this->electrum->getVersion(), |
||
37 | 'balance' => $this->electrum->getBalance(), |
||
38 | 'is_sync' => $this->electrum->isSynchronized(), |
||
39 | 'ticker' => json_decode(file_get_contents('https://blockchain.info/ticker')), |
||
40 | ]); |
||
41 | } |
||
42 | } |
||
43 |
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