GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#290)
by
unknown
01:28
created

Manager::getCommand()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 4
1
<?php
2
3
namespace App\Queue;
4
5
use AsyncPHP\Doorman\Manager\ProcessManager;
6
7
/**
8
 * Class Manager
9
 *
10
 * customise shell command to allow child tasks to persist even after manager process is terminated
11
 * this lets the started jobs to finish properly in case the management process terminates
12
 * fore example there are no more jobs to start or queue is paused
13
 *
14
 * @package App\Queue
15
 */
16
class Manager extends ProcessManager
17
{
18
19
    /**
20
     * @param string $binary
21
     * @param string $worker
22
     * @param string $stdout
23
     * @param string $stderr
24
     * @return string
25
     */
26
    protected function getCommand($binary, $worker, $stdout, $stderr) // phpcs:ignore SlevomatCodingStandard.TypeHints
27
    {
28
        return sprintf('nohup %s %s %%s %s %s & echo $!', $binary, $worker, $stdout, $stderr);
29
    }
30
31
    public function __destruct()
32
    {
33
        // Prevent background tasks from being killed when this script finishes
34
        // this is an override for the default behaviour of killing background tasks
35
    }
36
}
37