Remove inline @var annotations; fix spec session name; fix @var placement

- Replace all local-variable @var annotations with proper type guards:
  - MinkExtension configure closure: build inner array directly
    ($sessions[$driverType] = [$driverType => ...]) to avoid mixed offset access
  - MinkExtension loadSessions: add is_array($session) guard inside foreach
    so PHPStan narrows $session from mixed to array before key() call
  - DriverFactory::buildDriver @param broadened from array<string, mixed>
    to array<mixed> — is_array() only narrows to array<mixed> (key type
    unknown), so array<string, mixed> was unreachable at the call site
  - MinkAwareInitializer: move @var from inside constructor parameter list
    to a proper @param on the method docblock
- SessionsListenerSpec: replace 'goutte' (deleted driver) with
  'browserkit_http' as the example default session name

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kamil Kokot
2026-06-12 18:04:18 +02:00
parent 2947994733
commit 41bac3c5b7
14 changed files with 26 additions and 27 deletions

View File

@@ -40,7 +40,7 @@ class Selenium4Factory implements DriverFactory
}
/**
* @param array<string, mixed> $config
* @param array<mixed> $config
*/
public function buildDriver(array $config): Definition
{