| Total Complexity | 5 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class MathAdapterFactory |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var GmpMathInterface |
||
| 9 | */ |
||
| 10 | private static $forcedAdapter = null; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @param GmpMathInterface $adapter |
||
| 14 | */ |
||
| 15 | public static function forceAdapter(GmpMathInterface $adapter = null) |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param bool $debug |
||
| 22 | * @return DebugDecorator|GmpMathInterface|null |
||
| 23 | */ |
||
| 24 | public static function getAdapter(bool $debug = false): GmpMathInterface |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param GmpMathInterface $adapter |
||
| 37 | * @param bool $debug |
||
| 38 | * @return DebugDecorator|GmpMathInterface |
||
| 39 | */ |
||
| 40 | private static function wrapAdapter(GmpMathInterface $adapter, bool $debug): GmpMathInterface |
||
| 49 |