Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function getProcessCommand(): string |
||
21 | { |
||
22 | $delimiter = 'EOF-LARAVEL-SERVER-MONITOR'; |
||
23 | |||
24 | $definition = $this->getDefinition(); |
||
25 | |||
26 | $portArgument = empty($this->host->port) ? '' : "-p {$this->host->port}"; |
||
27 | |||
28 | return "ssh {$this->getTarget()} {$portArgument} 'bash -se <<$delimiter".PHP_EOL |
||
29 | .'set -e'.PHP_EOL |
||
30 | .$definition->getCommand().PHP_EOL |
||
31 | .$delimiter."'"; |
||
32 | } |
||
33 | |||
46 | } |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: