Skip to content

Commit

Permalink
used #[\SensitiveParameter] to mark sensitive parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Feb 28, 2023
1 parent 762f115 commit 5c713aa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Deployment/FtpServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ class FtpServer implements Server
* @param string $url ftp://... or ftps://...
* @throws \Exception
*/
public function __construct(string $url, bool $passiveMode = true)
{
public function __construct(
#[\SensitiveParameter]
string $url,
bool $passiveMode = true,
) {
if (!extension_loaded('ftp')) {
throw new \Exception('PHP extension FTP is not loaded.');
}
Expand Down
2 changes: 2 additions & 0 deletions src/Deployment/PhpsecServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ class PhpsecServer implements Server
public function __construct(
string $url,
string $publicKey = null,
#[\SensitiveParameter]
string $privateKey = null,
#[\SensitiveParameter]
string $passPhrase = null,
) {
$this->url = parse_url($url);
Expand Down
2 changes: 2 additions & 0 deletions src/Deployment/SshServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ class SshServer implements Server
public function __construct(
string $url,
string $publicKey = null,
#[\SensitiveParameter]
string $privateKey = null,
#[\SensitiveParameter]
string $passPhrase = null,
) {
if (!extension_loaded('ssh2')) {
Expand Down

0 comments on commit 5c713aa

Please sign in to comment.