CustomDeployer::getRequirements()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
4
namespace Bencagri\Artisan\Deployer\Deployer;
5
6
use Bencagri\Artisan\Deployer\Configuration\CustomConfiguration;
7
use Bencagri\Artisan\Deployer\Requirement\AllowsLoginViaSsh;
8
use Bencagri\Artisan\Deployer\Requirement\CommandExists;
9
10
11
abstract class CustomDeployer extends AbstractDeployer
12
{
13
    public function getConfigBuilder() : CustomConfiguration
14
    {
15
        return new CustomConfiguration();
16
    }
17
18
    public function getRequirements() : array
19
    {
20
        return [
21
            new CommandExists([$this->getContext()->getLocalHost()], 'ssh'),
22
            new AllowsLoginViaSsh($this->getServers()->findAll()),
23
        ];
24
    }
25
}
26