1 | <?php |
||
14 | class Streams implements PluginInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var InfoProvider |
||
18 | */ |
||
19 | protected $infoProvider; |
||
20 | |||
21 | /** |
||
22 | * @var Configuration |
||
23 | */ |
||
24 | protected $configuration; |
||
25 | |||
26 | /** |
||
27 | * Info constructor. |
||
28 | * @param InfoProvider $infoProvider |
||
29 | */ |
||
30 | 8 | public function __construct(InfoProvider $infoProvider) |
|
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | 8 | public function setNode(Node $node) |
|
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | 1 | public function getSlug(): string |
|
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | 1 | public function getCategorySlug(): string |
|
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | 1 | public function getCapabilities(): array |
|
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | 2 | public function getConfiguration(): PromiseInterface |
|
84 | |||
85 | /** |
||
86 | * {@inheritdoc} |
||
87 | */ |
||
88 | 2 | public function getValues(): PromiseInterface |
|
96 | } |
||
97 |
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: