| Conditions | 5 |
| Paths | 14 |
| Total Lines | 16 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 21 | public static function create($conf) |
||
| 22 | { |
||
| 23 | $name=$conf["name"]; |
||
| 24 | $runnerProvider="TestRunner"; |
||
| 25 | try { |
||
| 26 | $BabelConfig=json_decode(file_get_contents(babel_path("Extension/$name/babel.json")), true); |
||
| 27 | $runnerProvider=$BabelConfig["provider"]["testrunner"]; |
||
| 28 | } catch (Throwable $e) { |
||
|
|
|||
| 29 | } catch (ErrorException $e) { |
||
| 30 | } catch (Exception $e) { |
||
| 31 | } |
||
| 32 | $className="App\\Babel\\Extension\\$name\\$runnerProvider"; |
||
| 33 | if (class_exists($className)) { |
||
| 34 | return new $className($conf); |
||
| 35 | } else { |
||
| 36 | return null; |
||
| 37 | } |
||
| 40 |