Commit 2123274
authored
fix: Use late static binding in AbstractProvider (#123)
## This PR
Switches from self::$NAME to static::$NAME in the getMetadata method of
the AbstractProvider class. This change is to ensure the name of the
extending provider is used in the metadata. Previously, when extending
from AbstractProvider, the metadata name was always AbstractProvider.
### How to test
Create a class that extends AbstractProvider, give it a different name,
then call "getMetadata" and see that the name is now the name of the
extended class and not "AbstractProvider"
Signed-off-by: Andrew Menino-Barlow <[email protected]>1 parent 3ff3a59 commit 2123274
File tree
3 files changed
+4
-14
lines changed- src/implementation/provider
- tests
- unit
3 files changed
+4
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | | - | |
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
16 | | - | |
| 14 | + | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 19 | + | |
27 | 20 | | |
28 | 21 | | |
29 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | 146 | | |
148 | 147 | | |
149 | 148 | | |
| |||
175 | 174 | | |
176 | 175 | | |
177 | 176 | | |
178 | | - | |
179 | 177 | | |
180 | 178 | | |
181 | 179 | | |
| |||
206 | 204 | | |
207 | 205 | | |
208 | 206 | | |
209 | | - | |
210 | 207 | | |
211 | 208 | | |
212 | 209 | | |
| |||
0 commit comments