Skip to content

Commit e5d1848

Browse files
committed
Dev: Remove the config ignore errors.
1 parent 06e5089 commit e5d1848

9 files changed

Lines changed: 26 additions & 65 deletions

File tree

phpstan-baseline.php

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -316,71 +316,6 @@
316316
'count' => 1,
317317
'path' => __DIR__ . '/system/ComposerScripts.php',
318318
];
319-
$ignoreErrors[] = [
320-
'message' => '#^Method CodeIgniter\\\\Config\\\\BaseConfig\\:\\:registerProperties\\(\\) has no return type specified\\.$#',
321-
'count' => 1,
322-
'path' => __DIR__ . '/system/Config/BaseConfig.php',
323-
];
324-
$ignoreErrors[] = [
325-
'message' => '#^Method CodeIgniter\\\\Config\\\\BaseService\\:\\:injectMock\\(\\) has no return type specified\\.$#',
326-
'count' => 1,
327-
'path' => __DIR__ . '/system/Config/BaseService.php',
328-
];
329-
$ignoreErrors[] = [
330-
'message' => '#^Method CodeIgniter\\\\Config\\\\BaseService\\:\\:reset\\(\\) has no return type specified\\.$#',
331-
'count' => 1,
332-
'path' => __DIR__ . '/system/Config/BaseService.php',
333-
];
334-
$ignoreErrors[] = [
335-
'message' => '#^Method CodeIgniter\\\\Config\\\\BaseService\\:\\:resetSingle\\(\\) has no return type specified\\.$#',
336-
'count' => 1,
337-
'path' => __DIR__ . '/system/Config/BaseService.php',
338-
];
339-
$ignoreErrors[] = [
340-
'message' => '#^Method CodeIgniter\\\\Config\\\\Config\\:\\:injectMock\\(\\) has no return type specified\\.$#',
341-
'count' => 1,
342-
'path' => __DIR__ . '/system/Config/Config.php',
343-
];
344-
$ignoreErrors[] = [
345-
'message' => '#^Method CodeIgniter\\\\Config\\\\Config\\:\\:reset\\(\\) has no return type specified\\.$#',
346-
'count' => 1,
347-
'path' => __DIR__ . '/system/Config/Config.php',
348-
];
349-
$ignoreErrors[] = [
350-
'message' => '#^Method CodeIgniter\\\\Config\\\\DotEnv\\:\\:setVariable\\(\\) has no return type specified\\.$#',
351-
'count' => 1,
352-
'path' => __DIR__ . '/system/Config/DotEnv.php',
353-
];
354-
$ignoreErrors[] = [
355-
'message' => '#^Method CodeIgniter\\\\Config\\\\Factories\\:\\:injectMock\\(\\) has no return type specified\\.$#',
356-
'count' => 1,
357-
'path' => __DIR__ . '/system/Config/Factories.php',
358-
];
359-
$ignoreErrors[] = [
360-
'message' => '#^Method CodeIgniter\\\\Config\\\\Factories\\:\\:reset\\(\\) has no return type specified\\.$#',
361-
'count' => 1,
362-
'path' => __DIR__ . '/system/Config/Factories.php',
363-
];
364-
$ignoreErrors[] = [
365-
'message' => '#^Property CodeIgniter\\\\Config\\\\ForeignCharacters\\:\\:\\$characterList has no type specified\\.$#',
366-
'count' => 1,
367-
'path' => __DIR__ . '/system/Config/ForeignCharacters.php',
368-
];
369-
$ignoreErrors[] = [
370-
'message' => '#^Method CodeIgniter\\\\Config\\\\Publisher\\:\\:registerProperties\\(\\) has no return type specified\\.$#',
371-
'count' => 1,
372-
'path' => __DIR__ . '/system/Config/Publisher.php',
373-
];
374-
$ignoreErrors[] = [
375-
'message' => '#^Property CodeIgniter\\\\Config\\\\View\\:\\:\\$filters has no type specified\\.$#',
376-
'count' => 1,
377-
'path' => __DIR__ . '/system/Config/View.php',
378-
];
379-
$ignoreErrors[] = [
380-
'message' => '#^Property CodeIgniter\\\\Config\\\\View\\:\\:\\$plugins has no type specified\\.$#',
381-
'count' => 1,
382-
'path' => __DIR__ . '/system/Config/View.php',
383-
];
384319
$ignoreErrors[] = [
385320
'message' => '#^Method CodeIgniter\\\\Controller\\:\\:cachePage\\(\\) has no return type specified\\.$#',
386321
'count' => 1,

system/Config/BaseConfig.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ protected function getEnvValue(string $property, string $prefix, string $shortPr
169169
* Provides external libraries a simple way to register one or more
170170
* options into a config file.
171171
*
172+
* @return void
173+
*
172174
* @throws ReflectionException
173175
*/
174176
protected function registerProperties()

system/Config/BaseService.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ public static function serviceExists(string $name): ?string
273273

274274
/**
275275
* Reset shared instances and mocks for testing.
276+
*
277+
* @return void
276278
*/
277279
public static function reset(bool $initAutoloader = true)
278280
{
@@ -286,6 +288,8 @@ public static function reset(bool $initAutoloader = true)
286288

287289
/**
288290
* Resets any mock and shared instances for a single service.
291+
*
292+
* @return void
289293
*/
290294
public static function resetSingle(string $name)
291295
{
@@ -297,6 +301,8 @@ public static function resetSingle(string $name)
297301
* Inject mock object for testing.
298302
*
299303
* @param object $mock
304+
*
305+
* @return void
300306
*/
301307
public static function injectMock(string $name, $mock)
302308
{

system/Config/Config.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ public static function get(string $name, bool $getShared = true)
3434
* Helper method for injecting mock instances while testing.
3535
*
3636
* @param object $instance
37+
*
38+
* @return void
3739
*/
3840
public static function injectMock(string $name, $instance)
3941
{
@@ -42,6 +44,8 @@ public static function injectMock(string $name, $instance)
4244

4345
/**
4446
* Resets the static arrays
47+
*
48+
* @return void
4549
*/
4650
public static function reset()
4751
{

system/Config/DotEnv.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ public function parse(): ?array
8585
* Sets the variable into the environment. Will parse the string
8686
* first to look for {name}={value} pattern, ensure that nested
8787
* variables are handled, and strip it of single and double quotes.
88+
*
89+
* @return void
8890
*/
8991
protected function setVariable(string $name, string $value = '')
9092
{

system/Config/Factories.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ public static function setOptions(string $component, array $values): array
267267
* Resets the static arrays, optionally just for one component
268268
*
269269
* @param string|null $component Lowercase, plural component name
270+
*
271+
* @return void
270272
*/
271273
public static function reset(?string $component = null)
272274
{
@@ -290,6 +292,8 @@ public static function reset(?string $component = null)
290292
*
291293
* @param string $component Lowercase, plural component name
292294
* @param string $name The name of the instance
295+
*
296+
* @return void
293297
*/
294298
public static function injectMock(string $component, string $name, object $instance)
295299
{

system/Config/ForeignCharacters.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class ForeignCharacters
1818
{
1919
/**
2020
* Without further ado, the list of foreign characters.
21+
*
22+
* @var array
2123
*/
2224
public $characterList = [
2325
'/ä|æ|ǽ/' => 'ae',

system/Config/Publisher.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class Publisher extends BaseConfig
3535

3636
/**
3737
* Disables Registrars to prevent modules from altering the restrictions.
38+
*
39+
* @return void
3840
*/
3941
final protected function registerProperties()
4042
{

system/Config/View.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,17 @@ class View extends BaseConfig
3333
*
3434
* To prevent potential abuse, all filters MUST be defined here
3535
* in order for them to be available for use within the Parser.
36+
*
37+
* @var array
3638
*/
3739
public $filters = [];
3840

3941
/**
4042
* Parser Plugins provide a way to extend the functionality provided
4143
* by the core Parser by creating aliases that will be replaced with
4244
* any callable. Can be single or tag pair.
45+
*
46+
* @var array
4347
*/
4448
public $plugins = [];
4549

0 commit comments

Comments
 (0)