Skip to content

Commit

Permalink
Fix phpstan!
Browse files Browse the repository at this point in the history
  • Loading branch information
VennDev authored Aug 18, 2024
1 parent 3e27f24 commit 47d247e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/vennv/vapm/ClosureThread.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function onRun(): void
} else {
$callback = (string) $callback;
}
self::post($callback);
self::post(is_bool($callback) ? $callback ? 'true' : 'false' : $callback);

Check failure on line 72 in src/vennv/vapm/ClosureThread.php

View workflow job for this annotation

GitHub Actions / Jobs (8.2)

Ternary operator condition is always false.
}
}

Expand Down
1 change: 1 addition & 0 deletions src/vennv/vapm/MacroTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public static function isPrepare(): bool
public static function run(): void
{
foreach (self::getTasks() as $task) {
/** @var SampleMacro $task */
if ($task->checkTimeOut()) {
$task->run();
!$task->isRepeat() ? self::removeTask($task) : $task->resetTimeOut();
Expand Down
1 change: 1 addition & 0 deletions src/vennv/vapm/MicroTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public static function isPrepare(): bool
public static function run(): void
{
foreach (self::getTasks() as $id => $promise) {
/** @var Promise $promise */
$promise->useCallbacks();
$promise->setTimeEnd(microtime(true));
EventLoop::addReturn($promise);
Expand Down

0 comments on commit 47d247e

Please sign in to comment.