Skip to content

Commit 4304af4

Browse files
authored
Add conventions around PHP code in the project (#68)
* Add convention tests over packages definitions * Add conventions around classes docblocks * Add conventions around public method docblocks
1 parent b8422e9 commit 4304af4

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/CommandRunner.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
use Symfony\Component\Console\Input\ArrayInput;
88
use Symfony\Component\Process\PhpExecutableFinder;
99

10+
/**
11+
* Utility class that knows how to run command asynchronously.
12+
*/
1013
class CommandRunner
1114
{
1215
private string $consolePath;
@@ -25,6 +28,8 @@ public function __construct(
2528
}
2629

2730
/**
31+
* Run a command asynchronously.
32+
*
2833
* @phpstan-param array<string, mixed> $arguments
2934
*/
3035
public function runAsync(string $commandName, string $logFilename, array $arguments = []): void

src/RunCommandJobLauncher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* This {@see JobLauncherInterface} will execute job via an asynchronous symfony command.
1515
*
16-
* Example, if you call {@see RunCommandJobLauncher::launch('import', ['foo'=>'bar'])},
16+
* Example, if you call RunCommandJobLauncher::launch('import', ['foo'=>'bar']),
1717
* this command will run (with absolute pathes) :
1818
*
1919
* php bin/console yokai:batch:run import '{"foo":"bar"}' >> var/log/batch_execute.log 2>&1 &

src/RunJobCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@
1313
use Yokai\Batch\Exception\UnexpectedValueException;
1414
use Yokai\Batch\Job\JobExecutionAccessor;
1515
use Yokai\Batch\Job\JobExecutor;
16+
use Yokai\Batch\Job\JobInterface;
1617
use Yokai\Batch\JobExecution;
1718

19+
/**
20+
* Execute any {@see JobInterface} within your CLI.
21+
*/
1822
final class RunJobCommand extends Command
1923
{
2024
protected static $defaultName = 'yokai:batch:run';

0 commit comments

Comments
 (0)