| Conditions | 5 |
| Paths | 5 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 128 | public static function create($registryData) |
||
| 129 | { |
||
| 130 | if (empty($registryData['name']) || empty($registryData['url'])) { |
||
| 131 | throw new InvalidArgumentException("Registry data must contain key [name] and [url]"); |
||
| 132 | } |
||
| 133 | $homepage = isset($registryData['homepage']) ? $registryData['homepage'] : ''; |
||
| 134 | $author = isset($registryData['author']) ? $registryData['author'] : ''; |
||
| 135 | return new static($registryData['name'], $registryData['url'], $homepage, $author); |
||
| 136 | } |
||
| 137 | } |
||
| 138 |