Skip to content

Commit

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

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

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

Check failure on line 85 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 85 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 85 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 85 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.
$extenders = $container->call($extenders);
} elseif (is_callable($extenders)) {

Check failure on line 87 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 87 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 87 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 87 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.
$extenders = $container->call($extenders);
}

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

0 comments on commit 4eba41a

Please sign in to comment.