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