1 | <?php |
||
13 | final class ReportForm implements Common |
||
14 | { |
||
15 | private $client; |
||
16 | |||
17 | /** |
||
18 | * Security constructor. |
||
19 | * |
||
20 | * @param Client $client |
||
21 | * @throws Exception |
||
22 | */ |
||
23 | public function __construct(Client $client) |
||
31 | |||
32 | public function getSecretKey($date) |
||
44 | |||
45 | public function getUrl($method, array $params = []) |
||
70 | |||
71 | public function getBibFond() |
||
75 | |||
76 | public function getEBooks() |
||
80 | |||
81 | public function getSpecPo() |
||
85 | } |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: