| Conditions | 6 |
| Paths | 8 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function save($entity, $andFlush = true): void |
||
| 24 | { |
||
| 25 | // BC compatibility for $context parameter |
||
| 26 | if ($andFlush && \is_string($andFlush)) { |
||
| 27 | $entity->setContext($andFlush); |
||
| 28 | } |
||
| 29 | |||
| 30 | // BC compatibility for $providerName parameter |
||
| 31 | if (3 === \func_num_args()) { |
||
| 32 | $entity->setProviderName(func_get_arg(2)); |
||
| 33 | } |
||
| 34 | |||
| 35 | if ($andFlush && \is_bool($andFlush)) { |
||
| 36 | parent::save($entity, $andFlush); |
||
| 37 | } else { |
||
| 38 | // BC compatibility with previous signature |
||
| 39 | parent::save($entity, true); |
||
| 40 | } |
||
| 41 | } |
||
| 42 | |||
| 48 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.