Skip to content

Commit

Permalink
chore(sa): update stub file
Browse files Browse the repository at this point in the history
  • Loading branch information
SamMousa committed Feb 25, 2025
1 parent b89b65a commit bf3c801
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 18 deletions.
13 changes: 0 additions & 13 deletions src/Codeception/Lib/Connector/Yii2.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,19 +231,6 @@ public function clearEmails(): void
$this->emails = [];
}

/**
* @internal
*/
public function getComponent(string $name): object|null
{
$app = $this->getApplication();
$result = $app->get($name, false);
if (! isset($result)) {
throw new ConfigurationException("Component $name is not available in current application");
}
return $result;
}

/**
* Getting domain regex from rule host template
*/
Expand Down
9 changes: 4 additions & 5 deletions src/Codeception/Lib/Connector/Yii2/ConnectionWatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@
/**
* Class ConnectionWatcher
* This class will watch for new database connection and store a reference to the connection object.
*
* @package Codeception\Lib\Connector\Yii2
* @internal
*/
final class ConnectionWatcher
class ConnectionWatcher
{
private Closure $handler;
private readonly Closure $handler;

/**
* @var Connection[]
* @var list<Connection>
*/
private array $connections = [];

Expand Down
39 changes: 39 additions & 0 deletions tests/Yii.stub
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,45 @@ namespace yii\web {
* @return void
*/
public function setBaseUrl($url) {}

/**
* @param array<mixed>|object|null $params
*/
public function setBodyParams($params): void {}

/**
* @param list<string>|null $params
*/
public function setAcceptableContentTypes($params): void {}
/**
* @param list<string>|null $params
*/
public function setAcceptableLanguages($params): void {}

/**
* @param string|null $body
*/
public function setRawBody($body): void {}

/**
* @param string|null $path
*/
public function setPathInfo($path): void {}

/**
* @param string|null $path
*/
public function setScriptUrl($path): void {}

/**
* @param string|null $path
*/
public function setUrl($path): void {}

/**
* @param string|null $path
*/
public function setScriptFile($path): void {}
}

}

0 comments on commit bf3c801

Please sign in to comment.