src/Throttle/Settings/AbstractWindowSettings.php 1 location
|
@@ 62-66 (lines=5) @@
|
| 59 |
|
*/ |
| 60 |
|
public function merge(ThrottleSettingsInterface $settings) |
| 61 |
|
{ |
| 62 |
|
if (!$settings instanceof static) { |
| 63 |
|
throw new \InvalidArgumentException( |
| 64 |
|
sprintf('Unable to merge %s into %s', get_class($settings), get_class($this)) |
| 65 |
|
); |
| 66 |
|
} |
| 67 |
|
|
| 68 |
|
return new static( |
| 69 |
|
null === $settings->getHitLimit() ? $this->hitLimit : $settings->getHitLimit(), |
src/Throttle/Settings/ElasticWindowSettings.php 1 location
|
@@ 55-59 (lines=5) @@
|
| 52 |
|
*/ |
| 53 |
|
public function merge(ThrottleSettingsInterface $settings) |
| 54 |
|
{ |
| 55 |
|
if (!$settings instanceof self) { |
| 56 |
|
throw new \InvalidArgumentException( |
| 57 |
|
sprintf('Unable to merge %s into %s', get_class($settings), get_class($this)) |
| 58 |
|
); |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
return new self( |
| 62 |
|
null === $settings->getLimit() ? $this->limit : $settings->getLimit(), |
src/Throttle/Settings/LeakyBucketSettings.php 1 location
|
@@ 69-73 (lines=5) @@
|
| 66 |
|
*/ |
| 67 |
|
public function merge(ThrottleSettingsInterface $settings) |
| 68 |
|
{ |
| 69 |
|
if (!$settings instanceof self) { |
| 70 |
|
throw new \InvalidArgumentException( |
| 71 |
|
sprintf('Unable to merge %s into %s', get_class($settings), get_class($this)) |
| 72 |
|
); |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
return new self( |
| 76 |
|
null === $settings->getTokenLimit() ? $this->tokenLimit : $settings->getTokenLimit(), |
src/Throttle/Settings/RetrialQueueSettings.php 1 location
|
@@ 48-52 (lines=5) @@
|
| 45 |
|
*/ |
| 46 |
|
public function merge(ThrottleSettingsInterface $settings) |
| 47 |
|
{ |
| 48 |
|
if (!$settings instanceof self) { |
| 49 |
|
throw new \InvalidArgumentException( |
| 50 |
|
sprintf('Unable to merge %s into %s', get_class($settings), get_class($this)) |
| 51 |
|
); |
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
return new self($this->internalThrottlerSettings->merge($settings->getInternalThrottlerSettings())); |
| 55 |
|
} |