@@ -27,21 +27,21 @@ |
||
27 | 27 | */ |
28 | 28 | public function getCommand($hostConnection = true) |
29 | 29 | { |
30 | - if(is_null($this->username)) |
|
30 | + if (is_null($this->username)) |
|
31 | 31 | throw new \InvalidArgumentException("You must specify a SSH username"); |
32 | 32 | |
33 | - if(is_null($this->host)) |
|
33 | + if (is_null($this->host)) |
|
34 | 34 | throw new \InvalidArgumentException("You must specify a SSH host to connect"); |
35 | 35 | |
36 | 36 | $command = new ShellCommand($this->executable); |
37 | 37 | |
38 | - if($this->port != 22) |
|
38 | + if ($this->port != 22) |
|
39 | 39 | $command->addArgument("p", $this->port); |
40 | 40 | |
41 | - if(!is_null($this->publicKey)) |
|
41 | + if (!is_null($this->publicKey)) |
|
42 | 42 | $command->addArgument("i", $this->publicKey); |
43 | 43 | |
44 | - if($hostConnection) |
|
44 | + if ($hostConnection) |
|
45 | 45 | $command->addParameter($this->getHostConnection()); |
46 | 46 | |
47 | 47 | return $command; |
@@ -27,22 +27,27 @@ |
||
27 | 27 | */ |
28 | 28 | public function getCommand($hostConnection = true) |
29 | 29 | { |
30 | - if(is_null($this->username)) |
|
31 | - throw new \InvalidArgumentException("You must specify a SSH username"); |
|
30 | + if(is_null($this->username)) { |
|
31 | + throw new \InvalidArgumentException("You must specify a SSH username"); |
|
32 | + } |
|
32 | 33 | |
33 | - if(is_null($this->host)) |
|
34 | - throw new \InvalidArgumentException("You must specify a SSH host to connect"); |
|
34 | + if(is_null($this->host)) { |
|
35 | + throw new \InvalidArgumentException("You must specify a SSH host to connect"); |
|
36 | + } |
|
35 | 37 | |
36 | 38 | $command = new ShellCommand($this->executable); |
37 | 39 | |
38 | - if($this->port != 22) |
|
39 | - $command->addArgument("p", $this->port); |
|
40 | + if($this->port != 22) { |
|
41 | + $command->addArgument("p", $this->port); |
|
42 | + } |
|
40 | 43 | |
41 | - if(!is_null($this->publicKey)) |
|
42 | - $command->addArgument("i", $this->publicKey); |
|
44 | + if(!is_null($this->publicKey)) { |
|
45 | + $command->addArgument("i", $this->publicKey); |
|
46 | + } |
|
43 | 47 | |
44 | - if($hostConnection) |
|
45 | - $command->addParameter($this->getHostConnection()); |
|
48 | + if($hostConnection) { |
|
49 | + $command->addParameter($this->getHostConnection()); |
|
50 | + } |
|
46 | 51 | |
47 | 52 | return $command; |
48 | 53 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | $sotName = $sotRosterItem->getRoster()->getLocation()->getName(); |
80 | 80 | $sotFileName = $sotRosterItem->getRelativeFileName(); |
81 | - $sotItem = realpath($sotName .'/'.$sotFileName); |
|
81 | + $sotItem = realpath($sotName . '/' . $sotFileName); |
|
82 | 82 | $sotHash = $sotRosterItem->getHash(); |
83 | 83 | } |
84 | 84 | else { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $targetName = $targetRosterItem->getRoster()->getLocation()->getName(); |
98 | 98 | $targetFileName = $targetRosterItem->getRelativeFileName(); |
99 | 99 | |
100 | - $targetItem =realpath($targetName .'/'. $targetFileName); |
|
100 | + $targetItem = realpath($targetName . '/' . $targetFileName); |
|
101 | 101 | $targetHash = $targetRosterItem->getHash(); |
102 | 102 | } |
103 | 103 | else { |
@@ -80,8 +80,7 @@ discard block |
||
80 | 80 | $sotFileName = $sotRosterItem->getRelativeFileName(); |
81 | 81 | $sotItem = realpath($sotName .'/'.$sotFileName); |
82 | 82 | $sotHash = $sotRosterItem->getHash(); |
83 | - } |
|
84 | - else { |
|
83 | + } else { |
|
85 | 84 | $sotItem = 'Missing'; |
86 | 85 | $sotHash = 'Missing'; |
87 | 86 | } |
@@ -99,8 +98,7 @@ discard block |
||
99 | 98 | |
100 | 99 | $targetItem =realpath($targetName .'/'. $targetFileName); |
101 | 100 | $targetHash = $targetRosterItem->getHash(); |
102 | - } |
|
103 | - else { |
|
101 | + } else { |
|
104 | 102 | $targetItem = 'Missing'; |
105 | 103 | $targetHash = 'Missing'; |
106 | 104 | } |