Skip to content

Commit d15d288

Browse files
committed
fixup! [tmp][PHPStan] StartScenarioSubscriber.php
1 parent 12e09b4 commit d15d288

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

src/bundle/Subscriber/StartScenarioSubscriber.php

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,13 @@
1313
use Behat\Behat\EventDispatcher\Event\ScenarioTested;
1414
use Facebook\WebDriver\Exception\UnknownErrorException;
1515
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
16-
use Symfony\Component\HttpKernel\KernelInterface;
1716

1817
class StartScenarioSubscriber implements EventSubscriberInterface
1918
{
2019
private const RETRY_LIMIT = 2;
2120

2221
public const PRIORITY = -1000;
2322

24-
private KernelInterface $kernel;
25-
26-
private int $width;
27-
28-
private int $height;
29-
30-
public function __construct(KernelInterface $kernel, int $width, int $height)
31-
{
32-
$this->kernel = $kernel;
33-
$this->width = $width;
34-
$this->height = $height;
35-
}
36-
3723
public static function getSubscribedEvents()
3824
{
3925
return [
@@ -46,27 +32,4 @@ public function resizeWindow(BeforeScenarioTested $event): void
4632
{
4733
// No usages, so simplest fix is to remove the function
4834
}
49-
50-
/**
51-
* @template T
52-
*
53-
* @param callable(mixed ...$args): T $fn
54-
*
55-
* @return T
56-
*/
57-
private function executeWithRetry(callable $fn)
58-
{
59-
$counter = 0;
60-
while (true) {
61-
try {
62-
return $fn();
63-
} catch (UnknownErrorException $e) {
64-
if ($counter > self::RETRY_LIMIT) {
65-
throw $e;
66-
}
67-
++$counter;
68-
usleep(100000 * 2 ** $counter);
69-
}
70-
}
71-
}
7235
}

0 commit comments

Comments
 (0)