Skip to content

Commit

Permalink
attempt to make stan happy
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Oct 11, 2023
1 parent 7935073 commit 1cc327b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions framework/core/src/Extend/Conditional.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,15 @@ public function extend(Container $container, Extension $extension = null)

if ($condition['condition']) {
$extenders = $condition['extenders'];
$resolvedExtenders = [];

if (is_string($extenders)) {
$extenders = $container->call($extenders);
} elseif (is_callable($extenders)) {
$extenders = $container->call($extenders);
if (is_string($extenders) || is_callable($extenders)) {

Check failure on line 86 in framework/core/src/Extend/Conditional.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 7.3

Call to function is_callable() with array<Flarum\Extend\ExtenderInterface> will always evaluate to false.

Check failure on line 86 in framework/core/src/Extend/Conditional.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 7.3

Call to function is_string() with array<Flarum\Extend\ExtenderInterface> will always evaluate to false.

Check failure on line 86 in framework/core/src/Extend/Conditional.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 7.3

Result of || is always false.

Check failure on line 86 in framework/core/src/Extend/Conditional.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 7.4

Call to function is_callable() with array<Flarum\Extend\ExtenderInterface> will always evaluate to false.

Check failure on line 86 in framework/core/src/Extend/Conditional.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 7.4

Call to function is_string() with array<Flarum\Extend\ExtenderInterface> will always evaluate to false.

Check failure on line 86 in framework/core/src/Extend/Conditional.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 7.4

Result of || is always false.

Check failure on line 86 in framework/core/src/Extend/Conditional.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.0

Call to function is_callable() with array<Flarum\Extend\ExtenderInterface> will always evaluate to false.

Check failure on line 86 in framework/core/src/Extend/Conditional.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.0

Call to function is_string() with array<Flarum\Extend\ExtenderInterface> will always evaluate to false.

Check failure on line 86 in framework/core/src/Extend/Conditional.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.0

Result of || is always false.

Check failure on line 86 in framework/core/src/Extend/Conditional.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.1

Call to function is_callable() with array<Flarum\Extend\ExtenderInterface> will always evaluate to false.

Check failure on line 86 in framework/core/src/Extend/Conditional.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.1

Call to function is_string() with array<Flarum\Extend\ExtenderInterface> will always evaluate to false.

Check failure on line 86 in framework/core/src/Extend/Conditional.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.1

Result of || is always false.

Check failure on line 86 in framework/core/src/Extend/Conditional.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.2

Call to function is_callable() with array<Flarum\Extend\ExtenderInterface> will always evaluate to false.

Check failure on line 86 in framework/core/src/Extend/Conditional.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.2

Call to function is_string() with array<Flarum\Extend\ExtenderInterface> will always evaluate to false.

Check failure on line 86 in framework/core/src/Extend/Conditional.php

View workflow job for this annotation

GitHub Actions / run / PHPStan PHP 8.2

Result of || is always false.
$resolvedExtenders = $container->call($extenders);
} else {
$resolvedExtenders = $extenders;
}

foreach ($extenders as $extender) {
foreach ($resolvedExtenders as $extender) {
$extender->extend($container, $extension);
}
}
Expand Down

0 comments on commit 1cc327b

Please sign in to comment.