|
@@ 58-65 (lines=8) @@
|
| 55 |
|
*/ |
| 56 |
|
public function __construct(array $config = []) |
| 57 |
|
{ |
| 58 |
|
if (array_key_exists('decider', $config)) { |
| 59 |
|
if (array_key_exists('exception_decider', $config)) { |
| 60 |
|
throw new \InvalidArgumentException('Do not set both the old "decider" and new "exception_decider" options'); |
| 61 |
|
} |
| 62 |
|
trigger_error('The "decider" option has been deprecated in favour of "exception_decider"', E_USER_DEPRECATED); |
| 63 |
|
$config['exception_decider'] = $config['decider']; |
| 64 |
|
unset($config['decider']); |
| 65 |
|
} |
| 66 |
|
if (array_key_exists('delay', $config)) { |
| 67 |
|
if (array_key_exists('exception_delay', $config)) { |
| 68 |
|
throw new \InvalidArgumentException('Do not set both the old "delay" and new "exception_delay" options'); |
|
@@ 66-73 (lines=8) @@
|
| 63 |
|
$config['exception_decider'] = $config['decider']; |
| 64 |
|
unset($config['decider']); |
| 65 |
|
} |
| 66 |
|
if (array_key_exists('delay', $config)) { |
| 67 |
|
if (array_key_exists('exception_delay', $config)) { |
| 68 |
|
throw new \InvalidArgumentException('Do not set both the old "delay" and new "exception_delay" options'); |
| 69 |
|
} |
| 70 |
|
trigger_error('The "delay" option has been deprecated in favour of "exception_delay"', E_USER_DEPRECATED); |
| 71 |
|
$config['exception_delay'] = $config['delay']; |
| 72 |
|
unset($config['delay']); |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
$resolver = new OptionsResolver(); |
| 76 |
|
$resolver->setDefaults([ |