Skip to content

Commit 1369ac9

Browse files
committed
Code cleanup
1 parent 9f20499 commit 1369ac9

File tree

6 files changed

+12
-11
lines changed

6 files changed

+12
-11
lines changed

src/ShinyDeploy/Action/WsDataAction/WsDataAction.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
2+
23
namespace ShinyDeploy\Action\WsDataAction;
34

45
use ShinyDeploy\Action\WsAction;
5-
use ShinyDeploy\Core\Responder;
66
use ShinyDeploy\Responder\WsDataResponder;
77

88
abstract class WsDataAction extends WsAction
99
{
1010
/** @var WsDataResponder $responder */
11-
protected $responder;
11+
protected WsDataResponder $responder;
1212

1313
/**
1414
* @param array $actionPayload
@@ -20,10 +20,10 @@ abstract public function __invoke(array $actionPayload): bool;
2020
/**
2121
* Sets a responder.
2222
*
23-
* @param Responder $responder
23+
* @param WsDataResponder $responder
2424
* @return void
2525
*/
26-
public function setResponder(Responder $responder): void
26+
public function setResponder(WsDataResponder $responder): void
2727
{
2828
$this->responder = $responder;
2929
}

src/ShinyDeploy/Core/Connections/Ssh.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace ShinyDeploy\Core\Connections;
34

45
use phpseclib3\Net\SFTP;
@@ -142,8 +143,8 @@ public function unlink(string $file): bool
142143
/**
143144
* Renames a file on remote server.
144145
*
145-
* @param $filenameFrom
146-
* @param $filenameTo
146+
* @param string $filenameFrom
147+
* @param string $filenameTo
147148
* @return bool
148149
*/
149150
public function rename(string $filenameFrom, string $filenameTo): bool

src/ShinyDeploy/Core/WsGateway.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function onCall(ConnectionInterface $conn, $id, $topic, array $params)
9090
$actionName = $topic->getId();
9191
$clientId = $params['clientId'];
9292
$token = (!empty($params['token'])) ? $params['token'] : '';
93-
$callbackId = (isset($params['callbackId'])) ? $params['callbackId'] : null;
93+
$callbackId = (int) (isset($params['callbackId'])) ? $params['callbackId'] : 0;
9494
$actionPayload = (isset($params['actionPayload'])) ? $params['actionPayload'] : [];
9595
if (!empty($callbackId)) {
9696
$this->handleDataRequest($clientId, $token, $callbackId, $actionName, $actionPayload);

src/ShinyDeploy/Domain/Git.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ public function checkRemoteConnectivity(string $repoUrl): bool
390390
/**
391391
* Executes a git command and returns response.
392392
*
393-
* @param $command
393+
* @param string $command
394394
* @throws GitException
395395
* @return string
396396
*/

src/ShinyDeploy/Responder/WsDataResponder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
class WsDataResponder extends Responder
88
{
99
/**
10-
* @var string $callbackId
10+
* @var int $callbackId
1111
*/
12-
protected string $callbackId;
12+
protected int $callbackId;
1313

1414
/**
1515
* @var string $responseType

src/ShinyDeploy/Traits/CryptableDomain.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function setEnryptionKey(string $encryptionKey): void
2222
*
2323
* @param array $data
2424
* @param array $fields
25-
* @return array|bool
25+
* @return array
2626
* @throws \RuntimeException
2727
* @throws \ShinyDeploy\Exceptions\CryptographyException
2828
*/

0 commit comments

Comments
 (0)