| Conditions | 4 |
| Paths | 10 |
| Total Lines | 14 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public static function create($oj, $all_data) |
||
| 20 | { |
||
| 21 | $synchronizerProvider="Synchronizer"; |
||
| 22 | try { |
||
| 23 | $BabelConfig=json_decode(file_get_contents(babel_path("Extension/$oj/babel.json")), true); |
||
| 24 | $synchronizerProvider=$BabelConfig["provider"]["synchronizer"]; |
||
| 25 | } catch (ErrorException $e) { |
||
| 26 | } catch (Exception $e) { |
||
| 27 | } |
||
| 28 | $className="App\\Babel\\Extension\\$oj\\$synchronizerProvider"; |
||
| 29 | if (class_exists($className)) { |
||
| 30 | return new $className($all_data); |
||
| 31 | } else { |
||
| 32 | return null; |
||
| 33 | } |
||
| 36 |