Skip to content

Commit 37d0e3f

Browse files
committed
improved phpDoc
1 parent 142181d commit 37d0e3f

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

src/Bootstrap/Configurator.php

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class Configurator
3434
/** @var array<callable(self, DI\Compiler): void> Occurs after the compiler is created */
3535
public array $onCompile = [];
3636

37+
/** @var array<string, string|array{class-string, list<mixed>}> */
3738
public array $defaultExtensions = [
3839
'application' => [Nette\Bridges\ApplicationDI\ApplicationExtension::class, ['%debugMode%', ['%appDir%'], '%tempDir%/cache/nette.application']],
3940
'assets' => [Nette\Bridges\AssetsDI\DIExtension::class, ['%baseUrl%', '%wwwDir%', '%debugMode%']],
@@ -56,7 +57,7 @@ class Configurator
5657
'tracy' => [Tracy\Bridges\Nette\TracyExtension::class, ['%debugMode%', '%consoleMode%']],
5758
];
5859

59-
/** @var string[] of classes which shouldn't be autowired */
60+
/** @var list<class-string> classes which shouldn't be autowired */
6061
public array $autowireExcludedClasses = [
6162
\ArrayAccess::class,
6263
\Countable::class,
@@ -65,11 +66,16 @@ class Configurator
6566
\Traversable::class,
6667
];
6768

69+
/** @var array<string, mixed> */
6870
protected array $staticParameters;
71+
72+
/** @var array<string, mixed> */
6973
protected array $dynamicParameters = [];
74+
75+
/** @var array<string, object> */
7076
protected array $services = [];
7177

72-
/** @var array<string|array> */
78+
/** @var list<string|array<string, mixed>> */
7379
protected array $configs = [];
7480

7581

@@ -87,7 +93,8 @@ public function __construct()
8793

8894

8995
/**
90-
* Set parameter %debugMode%.
96+
* Sets parameter %debugMode%.
97+
* @param bool|string|list<string> $value true/false or IP addresses/computer names whitelist
9198
*/
9299
public function setDebugMode(bool|string|array $value): static
93100
{
@@ -137,6 +144,7 @@ public function addParameters(array $params): static
137144

138145
/**
139146
* Adds new static parameters.
147+
* @param array<string, mixed> $params
140148
*/
141149
public function addStaticParameters(array $params): static
142150
{
@@ -147,6 +155,7 @@ public function addStaticParameters(array $params): static
147155

148156
/**
149157
* Adds new dynamic parameters.
158+
* @param array<string, mixed> $params
150159
*/
151160
public function addDynamicParameters(array $params): static
152161
{
@@ -156,7 +165,8 @@ public function addDynamicParameters(array $params): static
156165

157166

158167
/**
159-
* Add instances of services.
168+
* Adds instances of services.
169+
* @param array<string, object> $services
160170
*/
161171
public function addServices(array $services): static
162172
{
@@ -236,6 +246,7 @@ public function createRobotLoader(): Nette\Loaders\RobotLoader
236246

237247
/**
238248
* Adds configuration file.
249+
* @param string|array<string, mixed> $config file path or configuration array
239250
*/
240251
public function addConfig(string|array $config): static
241252
{
@@ -349,6 +360,7 @@ protected function getCacheDirectory(): string
349360

350361
/**
351362
* Detects debug mode by IP addresses or computer names whitelist detection.
363+
* @param string|list<string>|null $list IP addresses or computer names whitelist
352364
*/
353365
public static function detectDebugMode(string|array|null $list = null): bool
354366
{

0 commit comments

Comments
 (0)