| Conditions | 5 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | protected function getItem(string $name) { |
||
| 14 | |||
| 15 | $file_name = ($this->dir_name . $name . '/Config.json'); |
||
| 16 | |||
| 17 | if (null === ($data = JSON::load($file_name))) return null; |
||
| 18 | |||
| 19 | if (null === ($data = Schema::get(static::$schema_prototype)->validate($data))) return null; |
||
| 20 | |||
| 21 | if (!(static::$extension_class::valid($data['name']) && ($data['name'] === $name))) return null; |
||
| 22 | |||
| 23 | # ------------------------ |
||
| 24 | |||
| 25 | return $data; |
||
| 26 | } |
||
| 27 | |||
| 50 |