Skip to content

Commit 1e94e04

Browse files
committed
Released the version 1.0.0
1 parent e10fab5 commit 1e94e04

10 files changed

+13
-16
lines changed

.php-cs-fixer.dist.php

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
'@PSR1' => true,
1414
'@PSR2' => true,
1515
'no_unused_imports' => true,
16+
'ordered_imports' => true,
1617
'single_blank_line_before_namespace' => true,
1718
])
1819
->setFinder($finder)

src/AbstractTask.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
abstract class AbstractTask implements TaskInterface
1111
{
1212
use TaskLoopTrait;
13-
}
13+
}

src/Event/AddTaskEvent.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
*/
99
class AddTaskEvent extends Event
1010
{
11-
}
11+
}

src/Event/DropTaskEvent.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
*/
99
class DropTaskEvent extends Event
1010
{
11-
}
11+
}

src/Event/Event.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ public function setCancelled(bool $cancelled): void
3939
{
4040
$this->cancelled = $cancelled;
4141
}
42-
}
42+
}

src/Event/RunTaskEvent.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
*/
99
class RunTaskEvent extends Event
1010
{
11-
}
11+
}

src/TaskInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
interface TaskInterface
1010
{
1111
public function run(): void;
12-
}
12+
}

src/TaskLoop.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ public function runTasks(): void
9999
$task->run();
100100
}
101101
}
102-
}
102+
}

src/TaskLoopTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ public function setTaskLoop(TaskLoop $loop): void
2222
{
2323
$this->loop = $loop;
2424
}
25-
}
25+
}

tests/test-TaskLoop.php

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

33
use ThenLabs\TaskLoop\AbstractTask;
4-
use ThenLabs\TaskLoop\TaskLoop;
5-
use ThenLabs\TaskLoop\TaskInterface;
64
use ThenLabs\TaskLoop\Event\AddTaskEvent;
7-
use ThenLabs\TaskLoop\Event\RunTaskEvent;
85
use ThenLabs\TaskLoop\Event\DropTaskEvent;
6+
use ThenLabs\TaskLoop\Event\RunTaskEvent;
7+
use ThenLabs\TaskLoop\TaskInterface;
8+
use ThenLabs\TaskLoop\TaskLoop;
99

1010
testCase(function () {
1111
setUp(function () {
@@ -48,7 +48,6 @@
4848

4949
test(function () {
5050
$task1 = new class($this->loop) implements TaskInterface {
51-
5251
public $invokations = [];
5352
protected $loop;
5453

@@ -64,7 +63,6 @@ public function run(): void
6463
};
6564

6665
$task2 = new class($this->loop) implements TaskInterface {
67-
6866
public $invokations = [];
6967
protected $loop;
7068

@@ -112,7 +110,6 @@ public function run(): void
112110
});
113111

114112
$this->loop->addTask($task = new class implements TaskInterface {
115-
116113
public $executed = false;
117114

118115
public function run(): void
@@ -155,7 +152,6 @@ public function run(): void
155152

156153
test(function () {
157154
$task = new class extends AbstractTask {
158-
159155
protected $counter = 0;
160156

161157
public function run(): void
@@ -226,4 +222,4 @@ public function run(): void
226222
});
227223
});
228224
});
229-
});
225+
});

0 commit comments

Comments
 (0)