Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
ForbiddenFunctionsSniff::class => [
'tests/**',
'console/**'
]
],
'tests/_support/_generated'
]);

// $ecsConfig->skip([
Expand Down
5 changes: 1 addition & 4 deletions src/Codeception/Lib/Connector/Yii2.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,7 @@ public function getInternalDomains(): array
$domains = [$this->getDomainRegex($urlManager->hostInfo)];
if ($urlManager->enablePrettyUrl) {
foreach ($urlManager->rules as $rule) {
/**
* @var \yii\web\UrlRule $rule
*/
if ($rule->host !== null) {
if (isset($rule->host)) {
$domains[] = $this->getDomainRegex($rule->host);
}
}
Expand Down
8 changes: 8 additions & 0 deletions tests/Yii.stub
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,12 @@ namespace yii\web {
public function setScriptFile($path): void {}
}

interface UrlRuleInterface{}
class UrlManager {
/**
* @var UrlRuleInterface[] $rules;
*/
public array $rules = [];
}

}