Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| Program | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| config | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Attestto\SolanaPhpSdk; |
| 4 | |
| 5 | class Program |
| 6 | { |
| 7 | /** |
| 8 | * @var SolanaRpcClient |
| 9 | */ |
| 10 | protected SolanaRpcClient $client; |
| 11 | protected mixed $config; |
| 12 | |
| 13 | public function __construct(SolanaRpcClient $client) |
| 14 | { |
| 15 | $this->client = $client; |
| 16 | $this->config = require __DIR__ . '/../config/solana-sdk.php'; |
| 17 | } |
| 18 | |
| 19 | // public function __call($method, $params = []) |
| 20 | // { |
| 21 | // return $this->client->call($method, ...$params); |
| 22 | // } |
| 23 | |
| 24 | public function config(string $key) |
| 25 | { |
| 26 | return $this->config[$key] ?? null; |
| 27 | } |
| 28 | } |