| 1 | <?php |
||
| 10 | class IpstackClientPsr6CacheDecorator implements IpstackClientInterface |
||
| 11 | { |
||
| 12 | use LoggerAwareTrait; |
||
| 13 | |||
| 14 | |||
| 15 | /** |
||
| 16 | * @var CacheItemPoolInterface |
||
| 17 | */ |
||
| 18 | public $cache; |
||
| 19 | |||
| 20 | |||
| 21 | /** |
||
| 22 | * @param IpstackClientInterface $ipstack_client |
||
| 23 | * @param CacheItemPoolInterface $cache PSR-6 Cache ItemPool |
||
| 24 | */ |
||
| 25 | 4 | public function __construct( IpstackClientInterface $ipstack_client, CacheItemPoolInterface $cache, LoggerInterface $logger = null ) |
|
| 31 | |||
| 32 | |||
| 33 | |||
| 34 | 4 | public function get( string $client_ip, array $custom_query = array() ) : array |
|
| 63 | |||
| 64 | } |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: