1 | <?php |
||
19 | abstract class BBCodeOutputAbstract implements BBCodeOutputInterface{ |
||
20 | |||
21 | /** |
||
22 | * @var string[] |
||
23 | */ |
||
24 | protected $modules = []; |
||
25 | |||
26 | /** |
||
27 | * @var string[] |
||
28 | */ |
||
29 | protected $tagmap = []; |
||
30 | |||
31 | /** |
||
32 | * Holds an array of singletags |
||
33 | * |
||
34 | * @var string[] |
||
35 | */ |
||
36 | protected $singletags = []; |
||
37 | |||
38 | /** |
||
39 | * Holds an array of noparse tags |
||
40 | * |
||
41 | * @var string[] |
||
42 | */ |
||
43 | protected $noparse = []; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | */ |
||
48 | protected $eol = PHP_EOL; |
||
49 | |||
50 | /** |
||
51 | * @var \chillerlan\BBCode\BBCodeOptions |
||
52 | */ |
||
53 | protected $options; |
||
54 | |||
55 | /** |
||
56 | * @var \Psr\SimpleCache\CacheInterface |
||
57 | */ |
||
58 | protected $cache; |
||
59 | |||
60 | /** |
||
61 | * @var \Psr\Log\LoggerInterface |
||
62 | */ |
||
63 | protected $logger; |
||
64 | |||
65 | /** |
||
66 | * @var \chillerlan\BBCode\Output\BBCodeModuleInterface[] |
||
67 | */ |
||
68 | protected $moduleInterfaces = []; |
||
69 | |||
70 | /** |
||
71 | * BBCodeOutputInterface constructor. |
||
72 | * |
||
73 | * @param \chillerlan\Settings\SettingsContainerInterface $options |
||
74 | * @param \Psr\SimpleCache\CacheInterface $cache |
||
75 | * @param \Psr\Log\LoggerInterface $logger |
||
76 | */ |
||
77 | public function __construct(SettingsContainerInterface $options, CacheInterface $cache, LoggerInterface $logger){ |
||
99 | |||
100 | /** |
||
101 | * @inheritdoc |
||
102 | */ |
||
103 | public function getTags():array { |
||
106 | |||
107 | /** |
||
108 | * @inheritdoc |
||
109 | */ |
||
110 | public function getSingleTags():array { |
||
113 | |||
114 | /** |
||
115 | * @inheritdoc |
||
116 | */ |
||
117 | public function getNoparse():array{ |
||
120 | |||
121 | /** |
||
122 | * @return string |
||
123 | */ |
||
124 | public function getEOL():string{ |
||
127 | |||
128 | /** |
||
129 | * @inheritdoc |
||
130 | */ |
||
131 | public function transform(string $tag, array $attributes, string $content, string $match, int $callback_count):string{ |
||
139 | |||
140 | } |
||
141 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: