Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: phpstan issues #316

Merged
merged 2 commits into from
Oct 2, 2023
Merged

fix: phpstan issues #316

merged 2 commits into from
Oct 2, 2023

Conversation

millnut
Copy link
Member

@millnut millnut commented Sep 30, 2023

Fix issues reported in #315

@finnlewis
Copy link
Member

woops - approved the wrong one, sorry, too many tabs!

@millnut millnut linked an issue Oct 2, 2023 that may be closed by this pull request
Copy link
Contributor

@Adnan-cds Adnan-cds left a comment

Choose a reason for hiding this comment

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

Thanks.

@@ -215,7 +215,7 @@ public function insertedTitleSortField(FieldConfigInterface $field): void {
*/
public function importConfigEntity(string $entity_type, string $config_path, string $config_filename): bool {
$config_src = new ConfigFileStorage($config_path);
if (empty($config_src)) {
if (!$config_src instanceof ConfigFileStorage) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's unfortunate we are having to go through all these gymnastics simply because of a bug in PHPStan. This one, for example, reduces the readability of the code by a tiny amount :(

@finnlewis finnlewis merged commit 18f0754 into 3.x Oct 2, 2023
4 checks passed
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.

Drupal 10, PHP 8.2 and PHPStan issues
3 participants