Skip to content

Commit

Permalink
Further scrutizer fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
typhonius committed Nov 25, 2017
1 parent 08e6541 commit a955549
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 48 deletions.
38 changes: 19 additions & 19 deletions src/CloudApi/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,13 @@ public function databaseBackups($environmentUuid, $dbName)
*/
public function databaseBackup($environmentUuid, $backupId)
{
return new BackupResponse(
$this->connector->request(
'get',
"/environments/${environmentUuid}/database-backups/${backupId}",
$this->query
)
);
return new BackupResponse(
$this->connector->request(
'get',
"/environments/${environmentUuid}/database-backups/${backupId}",
$this->query
)
);
}

/**
Expand Down Expand Up @@ -327,9 +327,9 @@ public function restoreDatabaseBackup($environmentUuid, $backupId)
public function copyFiles($environmentUuidFrom, $environmentUuidTo)
{
$options = [
'form_params' => [
'source' => $environmentUuidFrom,
],
'form_params' => [
'source' => $environmentUuidFrom,
],
];

return new OperationResponse(
Expand Down Expand Up @@ -869,15 +869,15 @@ public function teams()
*/
public function renameTeam($teamUuid, $name)
{
$options = [
'form_params' => [
'name' => $name,
],
];

return new OperationResponse(
$this->connector->request('put', "/teams/${teamUuid}", $options)
);
$options = [
'form_params' => [
'name' => $name,
],
];

return new OperationResponse(
$this->connector->request('put', "/teams/${teamUuid}", $options)
);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/CloudApi/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function processResponse(ResponseInterface $response)
if (property_exists($object, '_embedded') && property_exists($object->_embedded, 'items')) {
$return = $object->_embedded->items;
} elseif (property_exists($object, 'error')) {
throw new \Exception($object->message);
throw new \Exception($object->message);
} else {
$return = $object;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Response/EnvironmentsResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class EnvironmentsResponse extends \ArrayObject
{

/**
* EnvironmentsResponse constructor.
* @param array $environments
*/
* EnvironmentsResponse constructor.
* @param array $environments
*/
public function __construct($environments)
{
parent::__construct(array_map(function ($environment) {
Expand Down
6 changes: 3 additions & 3 deletions src/Response/InvitationsResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class InvitationsResponse extends \ArrayObject
{

/**
* MembersResponse constructor.
* @param array $invitations
*/
* MembersResponse constructor.
* @param array $invitations
*/
public function __construct($invitations)
{
parent::__construct(array_map(function ($invitation) {
Expand Down
6 changes: 3 additions & 3 deletions src/Response/MembersResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class MembersResponse extends \ArrayObject
{

/**
* MembersResponse constructor.
* @param array $members
*/
* MembersResponse constructor.
* @param array $members
*/
public function __construct($members)
{
parent::__construct(array_map(function ($member) {
Expand Down
6 changes: 3 additions & 3 deletions src/Response/PermissionsResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class PermissionsResponse extends \ArrayObject
{

/**
* PermissionsResponse constructor.
* @param array $permissions
*/
* PermissionsResponse constructor.
* @param array $permissions
*/
public function __construct($permissions)
{
parent::__construct(array_map(function ($permission) {
Expand Down
6 changes: 3 additions & 3 deletions src/Response/RolesResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class RolesResponse extends \ArrayObject
{

/**
* RolesResponse constructor.
* @param array $roles
*/
* RolesResponse constructor.
* @param array $roles
*/
public function __construct($roles)
{
parent::__construct(array_map(function ($role) {
Expand Down
20 changes: 10 additions & 10 deletions src/Response/ServerResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ class ServerResponse
*/
public function __construct($server)
{
$this->id = $server->id;
$this->name = $server->name;
$this->hostname = $server->hostname;
$this->ip = $server->ip;
$this->status = $server->status;
$this->region = $server->region;
$this->roles = $server->roles;
$this->amiType = $server->ami_type;
$this->configuration = $server->configuration;
$this->flags = $server->flags;
$this->id = $server->id;
$this->name = $server->name;
$this->hostname = $server->hostname;
$this->ip = $server->ip;
$this->status = $server->status;
$this->region = $server->region;
$this->roles = $server->roles;
$this->amiType = $server->ami_type;
$this->configuration = $server->configuration;
$this->flags = $server->flags;
}
}
6 changes: 3 additions & 3 deletions src/Response/TeamsResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ class TeamsResponse extends \ArrayObject
{

/**
* TeamsResponse constructor.
* @param array $teams
*/
* TeamsResponse constructor.
* @param array $teams
*/
public function __construct($teams)
{
parent::__construct(array_map(function ($team) {
Expand Down

0 comments on commit a955549

Please sign in to comment.