Skip to content

Conversation

@kenjis
Copy link
Member

@kenjis kenjis commented Jul 21, 2023

Needs #7722

Description
Update phpstan-baseline.php for #7713
Fixes https://github.com/codeigniter4/CodeIgniter4/actions/runs/5617352335/job/15221317246

Checklist:

  • Securely signed commits
  • [] Component(s) with PHPDoc blocks, only if necessary or adds value
  • [] Unit testing, with >80% coverage
  • [] User guide updated
  • [] Conforms to style guide

@kenjis kenjis added the 4.4 label Jul 21, 2023
@kenjis kenjis force-pushed the fix-phpstan-errors branch from b3beb4c to b5bea41 Compare July 21, 2023 01:09
@kenjis kenjis marked this pull request as draft July 21, 2023 01:09
@kenjis kenjis force-pushed the fix-phpstan-errors branch from b5bea41 to 66429c3 Compare July 21, 2023 02:06
@kenjis kenjis marked this pull request as ready for review July 21, 2023 02:06
@paulbalandan
Copy link
Member

Since the 4.4 branch is not yet released, can we instead add the type declarations/ PHPDocs to those new classes (HotReloader, SiteURI, etc.) and other additions?

'message' => '#^Method CodeIgniter\\\\Exceptions\\\\FrameworkException\\:\\:forInvalidDirectory\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Exceptions/FrameworkException.php',
];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paulbalandan The return type should be static, but we cannot use it yet:

public static function forInvalidDirectory(string $path)
{
return new static(lang('Core.invalidDirectory', [$path]));
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then a PHPDoc should suffice.

@kenjis kenjis marked this pull request as draft July 21, 2023 03:15
@kenjis
Copy link
Member Author

kenjis commented Jul 22, 2023

Closed by #7723

@kenjis kenjis closed this Jul 22, 2023
@kenjis kenjis deleted the fix-phpstan-errors branch July 22, 2023 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants