Update README.md, consistent use of spaces instead of tabs, better examples
This commit is contained in:
19
bin/classes/Job.php
Normal file
19
bin/classes/Job.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
class Job
|
||||
{
|
||||
private string $title;
|
||||
|
||||
public function __construct(string $title)
|
||||
{
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
public function __invoke()
|
||||
{
|
||||
cli_set_process_title("php {$this->title}");
|
||||
print("* {$this->title}");
|
||||
sleep(1);
|
||||
print("\r {$this->title}\n");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user