1 | <?php |
||
23 | class DocBlock extends ElementAbstract implements DocBlockInterface |
||
24 | { |
||
25 | |||
26 | /** |
||
27 | * DockBlock description. |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $description; |
||
31 | |||
32 | /** |
||
33 | * List of allowed tags. |
||
34 | * @var TagCollectionInterface |
||
35 | */ |
||
36 | protected $tagCollection; |
||
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | 99 | public function init() |
|
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | 36 | public function getDescription() |
|
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | 32 | public function setDescription($description) |
|
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | */ |
||
67 | 31 | public function getTagCollection() |
|
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | 99 | public function setTagCollection(TagCollectionInterface $tagCollection) |
|
81 | |||
82 | /** |
||
83 | * Add a docblock tag. |
||
84 | * |
||
85 | * @param TagInterface $tag |
||
86 | * |
||
87 | * @return DocBlock |
||
88 | */ |
||
89 | 14 | public function addTag(TagInterface $tag) |
|
95 | |||
96 | /** |
||
97 | * Removes tags by name. |
||
98 | * |
||
99 | * @param string|array $tagName |
||
100 | * |
||
101 | * @return TagCollection |
||
102 | */ |
||
103 | 1 | public function removeTagsByName($tagName) |
|
107 | |||
108 | /** |
||
109 | * Removes tags by reference. |
||
110 | * |
||
111 | * @param string $reference |
||
112 | * |
||
113 | * @return TagCollection |
||
114 | */ |
||
115 | 1 | public function removeTagsByReference($reference) |
|
119 | |||
120 | /** |
||
121 | * Gets tags by name. |
||
122 | * |
||
123 | * @param string $tagName |
||
124 | * |
||
125 | * @return TagCollectionInterface |
||
126 | */ |
||
127 | 2 | public function getTagsByName($tagName) |
|
133 | |||
134 | /** |
||
135 | * @{inheritdoc} |
||
136 | */ |
||
137 | 24 | public function toString() |
|
153 | } |
||
154 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: