diff --git a/app/workers/certificates.php b/app/workers/certificates.php
index 515fbb7b0..da3c4ec5c 100644
--- a/app/workers/certificates.php
+++ b/app/workers/certificates.php
@@ -52,8 +52,8 @@ class CertificatesV1
$domain = $this->args['domain'];
// Validation Args
- $validateTarget = (isset($this->args['validateTarget'])) ? $this->args['validateTarget'] : true;
- $validateCNAME = (isset($this->args['validateCNAME'])) ? $this->args['validateCNAME'] : true;
+ $validateTarget = $this->args['validateTarget'] ?? true;
+ $validateCNAME = $this->args['validateCNAME'] ?? true;
// Options
$domain = new Domain((!empty($domain)) ? $domain : '');
diff --git a/app/workers/tasks.php b/app/workers/tasks.php
index ca82abe59..f654748a6 100644
--- a/app/workers/tasks.php
+++ b/app/workers/tasks.php
@@ -48,9 +48,9 @@ class TasksV1
* If error count bigger than allowed change status to pause
*/
- $taskId = (isset($this->args['$id'])) ? $this->args['$id'] : null;
- $updated = (isset($this->args['updated'])) ? $this->args['updated'] : null;
- $next = (isset($this->args['next'])) ? $this->args['next'] : null;
+ $taskId = $this->args['$id'] ?? null;
+ $updated = $this->args['updated'] ?? null;
+ $next = $this->args['next'] ?? null;
$delay = \time() - $next;
$errors = [];
$timeout = 60 * 5; // 5 minutes
diff --git a/app/workers/webhooks.php b/app/workers/webhooks.php
index 25691a108..cfbc8a671 100644
--- a/app/workers/webhooks.php
+++ b/app/workers/webhooks.php
@@ -55,12 +55,12 @@ class WebhooksV1
continue;
}
- $name = (isset($webhook['name'])) ? $webhook['name'] : '';
- $signature = (isset($webhook['signature'])) ? $webhook['signature'] : 'not-yet-implemented';
- $url = (isset($webhook['url'])) ? $webhook['url'] : '';
- $security = (isset($webhook['security'])) ? (bool) $webhook['security'] : true;
- $httpUser = (isset($webhook['httpUser'])) ? $webhook['httpUser'] : null;
- $httpPass = (isset($webhook['httpPass'])) ? $webhook['httpPass'] : null;
+ $name = $webhook['name'] ?? '';
+ $signature = $webhook['signature'] ?? 'not-yet-implemented';
+ $url = $webhook['url'] ?? '';
+ $security = (bool) $webhook['security'] ?? true;
+ $httpUser = $webhook['httpUser'] ?? null;
+ $httpPass = $webhook['httpPass'] ?? null;
$ch = \curl_init($url);
diff --git a/composer.lock b/composer.lock
index 77769d64c..ff6d072bf 100644
--- a/composer.lock
+++ b/composer.lock
@@ -102,16 +102,16 @@
},
{
"name": "colinmollenhour/credis",
- "version": "1.11.2",
+ "version": "v1.11.4",
"source": {
"type": "git",
"url": "https://github.com/colinmollenhour/credis.git",
- "reference": "b8b2bd6b87d2d4df67065f3510efb80d5f9c4e53"
+ "reference": "b458b7c65d156744f5f0c4667c0f8ce45d955435"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/b8b2bd6b87d2d4df67065f3510efb80d5f9c4e53",
- "reference": "b8b2bd6b87d2d4df67065f3510efb80d5f9c4e53",
+ "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/b458b7c65d156744f5f0c4667c0f8ce45d955435",
+ "reference": "b458b7c65d156744f5f0c4667c0f8ce45d955435",
"shasum": ""
},
"require": {
@@ -138,7 +138,7 @@
],
"description": "Credis is a lightweight interface to the Redis key-value store which wraps the phpredis library when available for better performance.",
"homepage": "https://github.com/colinmollenhour/credis",
- "time": "2020-06-15T19:25:47+00:00"
+ "time": "2020-10-13T23:55:13+00:00"
},
{
"name": "composer/ca-bundle",
@@ -403,16 +403,16 @@
},
{
"name": "guzzlehttp/guzzle",
- "version": "dev-master",
+ "version": "7.2.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "b22ead0a39ca708da0bfdbb3e83bc652f7a03f2a"
+ "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b22ead0a39ca708da0bfdbb3e83bc652f7a03f2a",
- "reference": "b22ead0a39ca708da0bfdbb3e83bc652f7a03f2a",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0aa74dfb41ae110835923ef10a9d803a22d50e79",
+ "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79",
"shasum": ""
},
"require": {
@@ -497,7 +497,7 @@
"type": "github"
}
],
- "time": "2020-10-01T11:31:51+00:00"
+ "time": "2020-10-10T11:47:56+00:00"
},
{
"name": "guzzlehttp/promises",
@@ -1754,7 +1754,7 @@
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator",
- "reference": "552f9d872210c8a689727dd3a661c163b3816686"
+ "reference": "a57b3cd56c4bfe1538276cfc77456cf95d8835cb"
},
"require": {
"ext-curl": "*",
@@ -1784,7 +1784,7 @@
}
],
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
- "time": "2020-09-08T12:57:50+00:00"
+ "time": "2020-10-14T12:07:25+00:00"
},
{
"name": "doctrine/instantiator",
@@ -2389,12 +2389,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "53a4b737e83be724efd2bc4e7b929b9a30c48972"
+ "reference": "ece0c3ceee73810bd95226401bbfaea9e0f64de7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/53a4b737e83be724efd2bc4e7b929b9a30c48972",
- "reference": "53a4b737e83be724efd2bc4e7b929b9a30c48972",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ece0c3ceee73810bd95226401bbfaea9e0f64de7",
+ "reference": "ece0c3ceee73810bd95226401bbfaea9e0f64de7",
"shasum": ""
},
"require": {
@@ -2454,7 +2454,7 @@
"type": "github"
}
],
- "time": "2020-10-02T03:37:32+00:00"
+ "time": "2020-10-09T14:34:55+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -2687,12 +2687,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "3e541657ad6c1104935f6a6d3924b7226083aceb"
+ "reference": "8b79c2a70ae855e582cef1ca63a849fe07bdb01d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e541657ad6c1104935f6a6d3924b7226083aceb",
- "reference": "3e541657ad6c1104935f6a6d3924b7226083aceb",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8b79c2a70ae855e582cef1ca63a849fe07bdb01d",
+ "reference": "8b79c2a70ae855e582cef1ca63a849fe07bdb01d",
"shasum": ""
},
"require": {
@@ -2722,7 +2722,7 @@
"sebastian/global-state": "^5.0.1",
"sebastian/object-enumerator": "^4.0.3",
"sebastian/resource-operations": "^3.0.3",
- "sebastian/type": "^2.2.2",
+ "sebastian/type": "^2.3",
"sebastian/version": "^3.0.2"
},
"require-dev": {
@@ -2778,7 +2778,7 @@
"type": "github"
}
],
- "time": "2020-10-02T04:05:29+00:00"
+ "time": "2020-10-11T07:43:20+00:00"
},
{
"name": "sebastian/cli-parser",
@@ -3064,12 +3064,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "ffc949a1a2aae270ea064453d7535b82e4c32092"
+ "reference": "e3ec6059b3fe483d42fbaf1fe6eefa201f7b4a6d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ffc949a1a2aae270ea064453d7535b82e4c32092",
- "reference": "ffc949a1a2aae270ea064453d7535b82e4c32092",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/e3ec6059b3fe483d42fbaf1fe6eefa201f7b4a6d",
+ "reference": "e3ec6059b3fe483d42fbaf1fe6eefa201f7b4a6d",
"shasum": ""
},
"require": {
@@ -3118,7 +3118,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:32:55+00:00"
+ "time": "2020-10-13T11:48:30+00:00"
},
{
"name": "sebastian/environment",
@@ -3585,12 +3585,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
- "reference": "e494dcaeb89d1458c9ccd8c819745245a1669aea"
+ "reference": "fa592377f3923946cb90bf1f6a71ba2e5f229909"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/e494dcaeb89d1458c9ccd8c819745245a1669aea",
- "reference": "e494dcaeb89d1458c9ccd8c819745245a1669aea",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fa592377f3923946cb90bf1f6a71ba2e5f229909",
+ "reference": "fa592377f3923946cb90bf1f6a71ba2e5f229909",
"shasum": ""
},
"require": {
@@ -3602,7 +3602,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.2-dev"
+ "dev-master": "2.3-dev"
}
},
"autoload": {
@@ -3629,7 +3629,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:01:38+00:00"
+ "time": "2020-10-06T08:41:03+00:00"
},
{
"name": "sebastian/version",
@@ -3919,12 +3919,12 @@
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "f4aacffcbb556d443a15c4e49d62070903c05270"
+ "reference": "fa2f1ccdb44a973571235c4a78487c040f26f116"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/f4aacffcbb556d443a15c4e49d62070903c05270",
- "reference": "f4aacffcbb556d443a15c4e49d62070903c05270",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/fa2f1ccdb44a973571235c4a78487c040f26f116",
+ "reference": "fa2f1ccdb44a973571235c4a78487c040f26f116",
"shasum": ""
},
"require": {
@@ -3986,7 +3986,7 @@
"type": "tidelift"
}
],
- "time": "2020-09-27T05:01:29+00:00"
+ "time": "2020-10-14T06:37:57+00:00"
},
{
"name": "webmozart/assert",
diff --git a/tests/e2e/Client.php b/tests/e2e/Client.php
index e72733e8f..e2a805a2b 100644
--- a/tests/e2e/Client.php
+++ b/tests/e2e/Client.php
@@ -211,7 +211,7 @@ class Client
}
$responseBody = curl_exec($ch);
- $responseType = (isset($responseHeaders['content-type'])) ? $responseHeaders['content-type'] : '';
+ $responseType = $responseHeaders['content-type'] ?? '';
$responseStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);
switch (substr($responseType, 0, strpos($responseType, ';'))) {
diff --git a/tests/e2e/Services/Account/AccountBase.php b/tests/e2e/Services/Account/AccountBase.php
index 6004611e7..7d39b1664 100644
--- a/tests/e2e/Services/Account/AccountBase.php
+++ b/tests/e2e/Services/Account/AccountBase.php
@@ -65,8 +65,8 @@ trait AccountBase
public function testCreateAccountSession($data):array
{
sleep(10);
- $email = (isset($data['email'])) ? $data['email'] : '';
- $password = (isset($data['password'])) ? $data['password'] : '';
+ $email = $data['email'] ?? '';
+ $password = $data['password'] ?? '';
/**
* Test for SUCCESS
@@ -132,9 +132,9 @@ trait AccountBase
*/
public function testGetAccount($data):array
{
- $email = (isset($data['email'])) ? $data['email'] : '';
- $name = (isset($data['name'])) ? $data['name'] : '';
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $email = $data['email'] ?? '';
+ $name = $data['name'] ?? '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -183,7 +183,7 @@ trait AccountBase
*/
public function testGetAccountPrefs($data):array
{
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -219,8 +219,8 @@ trait AccountBase
*/
public function testGetAccountSessions($data):array
{
- $session = (isset($data['session'])) ? $data['session'] : '';
- $sessionId = (isset($data['sessionId'])) ? $data['sessionId'] : '';
+ $session = $data['session'] ?? '';
+ $sessionId = $data['sessionId'] ?? '';
/**
* Test for SUCCESS
@@ -278,7 +278,7 @@ trait AccountBase
public function testGetAccountLogs($data):array
{
sleep(10);
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -360,8 +360,8 @@ trait AccountBase
*/
public function testUpdateAccountName($data):array
{
- $email = (isset($data['email'])) ? $data['email'] : '';
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $email = $data['email'] ?? '';
+ $session = $data['session'] ?? '';
$newName = 'New Name';
/**
@@ -427,9 +427,9 @@ trait AccountBase
*/
public function testUpdateAccountPassword($data):array
{
- $email = (isset($data['email'])) ? $data['email'] : '';
- $password = (isset($data['password'])) ? $data['password'] : '';
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $email = $data['email'] ?? '';
+ $password = $data['password'] ?? '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -496,7 +496,7 @@ trait AccountBase
public function testUpdateAccountEmail($data):array
{
$newEmail = uniqid().'new@localhost.test';
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -552,7 +552,7 @@ trait AccountBase
public function testUpdateAccountPrefs($data):array
{
$newEmail = uniqid().'new@localhost.test';
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -629,9 +629,9 @@ trait AccountBase
*/
public function testCreateAccountVerification($data):array
{
- $email = (isset($data['email'])) ? $data['email'] : '';
- $name = (isset($data['name'])) ? $data['name'] : '';
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $email = $data['email'] ?? '';
+ $name = $data['name'] ?? '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -694,9 +694,9 @@ trait AccountBase
*/
public function testUpdateAccountVerification($data):array
{
- $id = (isset($data['id'])) ? $data['id'] : '';
- $session = (isset($data['session'])) ? $data['session'] : '';
- $verification = (isset($data['verification'])) ? $data['verification'] : '';
+ $id = $data['id'] ?? '';
+ $session = $data['session'] ?? '';
+ $verification = $data['verification'] ?? '';
/**
* Test for SUCCESS
@@ -748,9 +748,9 @@ trait AccountBase
*/
public function testDeleteAccountSession($data):array
{
- $email = (isset($data['email'])) ? $data['email'] : '';
- $password = (isset($data['password'])) ? $data['password'] : '';
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $email = $data['email'] ?? '';
+ $password = $data['password'] ?? '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -816,8 +816,8 @@ trait AccountBase
*/
public function testDeleteAccountSessionCurrent($data):array
{
- $email = (isset($data['email'])) ? $data['email'] : '';
- $password = (isset($data['password'])) ? $data['password'] : '';
+ $email = $data['email'] ?? '';
+ $password = $data['password'] ?? '';
/**
* Test for SUCCESS
@@ -873,7 +873,7 @@ trait AccountBase
*/
public function testDeleteAccountSessions($data):array
{
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -901,8 +901,8 @@ trait AccountBase
/**
* Create new fallback session
*/
- $email = (isset($data['email'])) ? $data['email'] : '';
- $password = (isset($data['password'])) ? $data['password'] : '';
+ $email = $data['email'] ?? '';
+ $password = $data['password'] ?? '';
$response = $this->client->call(Client::METHOD_POST, '/account/sessions', array_merge([
'origin' => 'http://localhost',
@@ -923,8 +923,8 @@ trait AccountBase
*/
public function testCreateAccountRecovery($data):array
{
- $email = (isset($data['email'])) ? $data['email'] : '';
- $name = (isset($data['name'])) ? $data['name'] : '';
+ $email = $data['email'] ?? '';
+ $name = $data['name'] ?? '';
/**
* Test for SUCCESS
@@ -997,8 +997,8 @@ trait AccountBase
*/
public function testUpdateAccountRecovery($data):array
{
- $id = (isset($data['id'])) ? $data['id'] : '';
- $recovery = (isset($data['recovery'])) ? $data['recovery'] : '';
+ $id = $data['id'] ?? '';
+ $recovery = $data['recovery'] ?? '';
$newPassowrd = 'test-recovery';
/**
diff --git a/tests/e2e/Services/Functions/FunctionsBase.php b/tests/e2e/Services/Functions/FunctionsBase.php
index 80ee47c72..a167b3763 100644
--- a/tests/e2e/Services/Functions/FunctionsBase.php
+++ b/tests/e2e/Services/Functions/FunctionsBase.php
@@ -13,7 +13,7 @@ trait FunctionsBase
// */
// public function testGetTeam($data):array
// {
- // $id = (isset($data['teamUid'])) ? $data['teamUid'] : '';
+ // $id = $data['teamUid'] ?? '';
// /**
// * Test for SUCCESS
diff --git a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php
index c781244e2..b8f31fb87 100644
--- a/tests/e2e/Services/Functions/FunctionsCustomServerTest.php
+++ b/tests/e2e/Services/Functions/FunctionsCustomServerTest.php
@@ -38,7 +38,7 @@ class FunctionsConsoleServerTest extends Scope
'timeout' => 10,
]);
- $functionId = (isset($response1['body']['$id'])) ? $response1['body']['$id'] : '';
+ $functionId = $response1['body']['$id'] ?? '';
$this->assertEquals(201, $response1['headers']['status-code']);
$this->assertNotEmpty($response1['body']['$id']);
@@ -186,7 +186,7 @@ class FunctionsConsoleServerTest extends Scope
'code' => new CURLFile(realpath(__DIR__ . '/../../../resources/functions/php-fx.tar.gz'), 'application/x-gzip', 'php-fx.tar.gz'),
]);
- $tagId = (isset($tag['body']['$id'])) ? $tag['body']['$id'] : '';
+ $tagId = $tag['body']['$id'] ?? '';
$this->assertEquals(201, $tag['headers']['status-code']);
$this->assertNotEmpty($tag['body']['$id']);
@@ -295,7 +295,7 @@ class FunctionsConsoleServerTest extends Scope
'async' => 1,
]);
- $executionId = (isset($execution['body']['$id'])) ? $execution['body']['$id'] : '';
+ $executionId = $execution['body']['$id'] ?? '';
$this->assertEquals(201, $execution['headers']['status-code']);
$this->assertNotEmpty($execution['body']['$id']);
diff --git a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php
index f979f56e4..5c7692f7c 100644
--- a/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php
+++ b/tests/e2e/Services/Projects/ProjectsConsoleClientTest.php
@@ -79,7 +79,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testListProject($data):array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
/**
* Test for SUCCESS
@@ -106,7 +106,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testGetProject($data):array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
/**
* Test for SUCCESS
@@ -147,7 +147,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testGetProjectUsage($data):array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
/**
* Test for SUCCESS
@@ -206,7 +206,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testUpdateProject($data):array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
/**
* Test for SUCCESS
@@ -249,7 +249,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testUpdateProjectOAuth($data):array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$providers = require('app/config/providers.php');
/**
@@ -307,7 +307,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testCreateProjectWebhook($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/webhooks', array_merge([
'content-type' => 'application/json',
@@ -358,7 +358,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testListProjectWebhook($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/webhooks', array_merge([
'content-type' => 'application/json',
@@ -380,8 +380,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testGetProjectWebhook($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $webhookId = (isset($data['webhookId'])) ? $data['webhookId'] : '';
+ $id = $data['projectId'] ?? '';
+ $webhookId = $data['webhookId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/webhooks/'.$webhookId, array_merge([
'content-type' => 'application/json',
@@ -416,8 +416,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testUpdateProjectWebhook($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $webhookId = (isset($data['webhookId'])) ? $data['webhookId'] : '';
+ $id = $data['projectId'] ?? '';
+ $webhookId = $data['webhookId'] ?? '';
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/webhooks/'.$webhookId, array_merge([
'content-type' => 'application/json',
@@ -503,8 +503,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testDeleteProjectWebhook($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $webhookId = (isset($data['webhookId'])) ? $data['webhookId'] : '';
+ $id = $data['projectId'] ?? '';
+ $webhookId = $data['webhookId'] ?? '';
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/webhooks/'.$webhookId, array_merge([
'content-type' => 'application/json',
@@ -541,7 +541,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testCreateProjectKey($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/keys', array_merge([
'content-type' => 'application/json',
@@ -581,7 +581,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testListProjectKey($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/keys', array_merge([
'content-type' => 'application/json',
@@ -603,8 +603,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testGetProjectKey($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $keyId = (isset($data['keyId'])) ? $data['keyId'] : '';
+ $id = $data['projectId'] ?? '';
+ $keyId = $data['keyId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/keys/'.$keyId, array_merge([
'content-type' => 'application/json',
@@ -638,8 +638,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testUpdateProjectKey($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $keyId = (isset($data['keyId'])) ? $data['keyId'] : '';
+ $id = $data['projectId'] ?? '';
+ $keyId = $data['keyId'] ?? '';
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/keys/'.$keyId, array_merge([
'content-type' => 'application/json',
@@ -693,8 +693,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testDeleteProjectKey($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $keyId = (isset($data['keyId'])) ? $data['keyId'] : '';
+ $id = $data['projectId'] ?? '';
+ $keyId = $data['keyId'] ?? '';
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/keys/'.$keyId, array_merge([
'content-type' => 'application/json',
@@ -731,7 +731,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testCreateProjectTask($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/tasks', array_merge([
'content-type' => 'application/json',
@@ -859,7 +859,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testListProjectTask($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/tasks', array_merge([
'content-type' => 'application/json',
@@ -881,8 +881,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testGetProjectTask($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $taskId = (isset($data['taskId'])) ? $data['taskId'] : '';
+ $id = $data['projectId'] ?? '';
+ $taskId = $data['taskId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/tasks/'.$taskId, array_merge([
'content-type' => 'application/json',
@@ -921,8 +921,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testUpdateProjectTask($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $taskId = (isset($data['taskId'])) ? $data['taskId'] : '';
+ $id = $data['projectId'] ?? '';
+ $taskId = $data['taskId'] ?? '';
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/tasks/'.$taskId, array_merge([
'content-type' => 'application/json',
@@ -1087,8 +1087,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testDeleteProjectTask($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $taskId = (isset($data['taskId'])) ? $data['taskId'] : '';
+ $id = $data['projectId'] ?? '';
+ $taskId = $data['taskId'] ?? '';
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/tasks/'.$taskId, array_merge([
'content-type' => 'application/json',
@@ -1125,7 +1125,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testCreateProjectPlatform($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/platforms', array_merge([
'content-type' => 'application/json',
@@ -1227,7 +1227,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testListProjectPlatform($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms', array_merge([
'content-type' => 'application/json',
@@ -1249,9 +1249,9 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testGetProjectPlatform($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
- $platformWebId = (isset($data['platformWebId'])) ? $data['platformWebId'] : '';
+ $platformWebId = $data['platformWebId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformWebId, array_merge([
'content-type' => 'application/json',
@@ -1267,7 +1267,7 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals('', $response['body']['store']);
$this->assertEquals('localhost', $response['body']['hostname']);
- $platformFultteriOSId = (isset($data['platformFultteriOSId'])) ? $data['platformFultteriOSId'] : '';
+ $platformFultteriOSId = $data['platformFultteriOSId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformFultteriOSId, array_merge([
'content-type' => 'application/json',
@@ -1283,7 +1283,7 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals('', $response['body']['store']);
$this->assertEquals('', $response['body']['hostname']);
- $platformFultterAndroidId = (isset($data['platformFultterAndroidId'])) ? $data['platformFultterAndroidId'] : '';
+ $platformFultterAndroidId = $data['platformFultterAndroidId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/platforms/'.$platformFultterAndroidId, array_merge([
'content-type' => 'application/json',
@@ -1317,9 +1317,9 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testUpdateProjectPlatform($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
- $platformWebId = (isset($data['platformWebId'])) ? $data['platformWebId'] : '';
+ $platformWebId = $data['platformWebId'] ?? '';
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/platforms/'.$platformWebId, array_merge([
'content-type' => 'application/json',
@@ -1340,7 +1340,7 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals('', $response['body']['store']);
$this->assertEquals('localhost-new', $response['body']['hostname']);
- $platformFultteriOSId = (isset($data['platformFultteriOSId'])) ? $data['platformFultteriOSId'] : '';
+ $platformFultteriOSId = $data['platformFultteriOSId'] ?? '';
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/platforms/'.$platformFultteriOSId, array_merge([
'content-type' => 'application/json',
@@ -1361,7 +1361,7 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals('', $response['body']['store']);
$this->assertEquals('', $response['body']['hostname']);
- $platformFultterAndroidId = (isset($data['platformFultterAndroidId'])) ? $data['platformFultterAndroidId'] : '';
+ $platformFultterAndroidId = $data['platformFultterAndroidId'] ?? '';
$response = $this->client->call(Client::METHOD_PUT, '/projects/'.$id.'/platforms/'.$platformFultterAndroidId, array_merge([
'content-type' => 'application/json',
@@ -1394,9 +1394,9 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testDeleteProjectPlatform($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
- $platformWebId = (isset($data['platformWebId'])) ? $data['platformWebId'] : '';
+ $platformWebId = $data['platformWebId'] ?? '';
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/platforms/'.$platformWebId, array_merge([
'content-type' => 'application/json',
@@ -1413,7 +1413,7 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals(404, $response['headers']['status-code']);
- $platformFultteriOSId = (isset($data['platformFultteriOSId'])) ? $data['platformFultteriOSId'] : '';
+ $platformFultteriOSId = $data['platformFultteriOSId'] ?? '';
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/platforms/'.$platformFultteriOSId, array_merge([
'content-type' => 'application/json',
@@ -1430,7 +1430,7 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals(404, $response['headers']['status-code']);
- $platformFultterAndroidId = (isset($data['platformFultterAndroidId'])) ? $data['platformFultterAndroidId'] : '';
+ $platformFultterAndroidId = $data['platformFultterAndroidId'] ?? '';
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/platforms/'.$platformFultterAndroidId, array_merge([
'content-type' => 'application/json',
@@ -1467,7 +1467,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testCreateProjectDomain($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_POST, '/projects/'.$id.'/domains', array_merge([
'content-type' => 'application/json',
@@ -1506,7 +1506,7 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testListProjectDomain($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
+ $id = $data['projectId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/domains', array_merge([
'content-type' => 'application/json',
@@ -1528,8 +1528,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testGetProjectDomain($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $domainId = (isset($data['domainId'])) ? $data['domainId'] : '';
+ $id = $data['projectId'] ?? '';
+ $domainId = $data['domainId'] ?? '';
$response = $this->client->call(Client::METHOD_GET, '/projects/'.$id.'/domains/'.$domainId, array_merge([
'content-type' => 'application/json',
@@ -1563,8 +1563,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testUpdateProjectDomain($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $domainId = (isset($data['domainId'])) ? $data['domainId'] : '';
+ $id = $data['projectId'] ?? '';
+ $domainId = $data['domainId'] ?? '';
$response = $this->client->call(Client::METHOD_PATCH, '/projects/'.$id.'/domains/'.$domainId.'/verification', array_merge([
'content-type' => 'application/json',
@@ -1585,8 +1585,8 @@ class ProjectsConsoleClientTest extends Scope
*/
public function testDeleteProjectDomain($data): array
{
- $id = (isset($data['projectId'])) ? $data['projectId'] : '';
- $domainId = (isset($data['domainId'])) ? $data['domainId'] : '';
+ $id = $data['projectId'] ?? '';
+ $domainId = $data['domainId'] ?? '';
$response = $this->client->call(Client::METHOD_DELETE, '/projects/'.$id.'/domains/'.$domainId, array_merge([
'content-type' => 'application/json',
diff --git a/tests/e2e/Services/Teams/TeamsBase.php b/tests/e2e/Services/Teams/TeamsBase.php
index 73bdfe719..a8ac2ac43 100644
--- a/tests/e2e/Services/Teams/TeamsBase.php
+++ b/tests/e2e/Services/Teams/TeamsBase.php
@@ -75,7 +75,7 @@ trait TeamsBase
*/
public function testGetTeam($data):array
{
- $id = (isset($data['teamUid'])) ? $data['teamUid'] : '';
+ $id = $data['teamUid'] ?? '';
/**
* Test for SUCCESS
diff --git a/tests/e2e/Services/Teams/TeamsBaseClient.php b/tests/e2e/Services/Teams/TeamsBaseClient.php
index ceb0d86e5..25bbcbdd5 100644
--- a/tests/e2e/Services/Teams/TeamsBaseClient.php
+++ b/tests/e2e/Services/Teams/TeamsBaseClient.php
@@ -11,7 +11,7 @@ trait TeamsBaseClient
*/
public function testGetTeamMemberships($data):array
{
- $teamUid = (isset($data['teamUid'])) ? $data['teamUid'] : '';
+ $teamUid = $data['teamUid'] ?? '';
/**
* Test for SUCCESS
@@ -40,8 +40,8 @@ trait TeamsBaseClient
*/
public function testCreateTeamMembership($data):array
{
- $teamUid = (isset($data['teamUid'])) ? $data['teamUid'] : '';
- $teamName = (isset($data['teamName'])) ? $data['teamName'] : '';
+ $teamUid = $data['teamUid'] ?? '';
+ $teamName = $data['teamName'] ?? '';
$email = uniqid().'friend@localhost.test';
/**
@@ -127,10 +127,10 @@ trait TeamsBaseClient
*/
public function testUpdateTeamMembership($data):array
{
- $teamUid = (isset($data['teamUid'])) ? $data['teamUid'] : '';
- $secret = (isset($data['secret'])) ? $data['secret'] : '';
- $inviteUid = (isset($data['inviteUid'])) ? $data['inviteUid'] : '';
- $userUid = (isset($data['userUid'])) ? $data['userUid'] : '';
+ $teamUid = $data['teamUid'] ?? '';
+ $secret = $data['secret'] ?? '';
+ $inviteUid = $data['inviteUid'] ?? '';
+ $userUid = $data['userUid'] ?? '';
/**
* Test for SUCCESS
@@ -207,8 +207,8 @@ trait TeamsBaseClient
*/
public function testDeleteTeamMembership($data):array
{
- $teamUid = (isset($data['teamUid'])) ? $data['teamUid'] : '';
- $inviteUid = (isset($data['inviteUid'])) ? $data['inviteUid'] : '';
+ $teamUid = $data['teamUid'] ?? '';
+ $inviteUid = $data['inviteUid'] ?? '';
/**
* Test for SUCCESS
diff --git a/tests/e2e/Services/Teams/TeamsBaseServer.php b/tests/e2e/Services/Teams/TeamsBaseServer.php
index 1547a4e28..9869ce590 100644
--- a/tests/e2e/Services/Teams/TeamsBaseServer.php
+++ b/tests/e2e/Services/Teams/TeamsBaseServer.php
@@ -11,7 +11,7 @@ trait TeamsBaseServer
*/
public function testGetTeamMemberships($data):array
{
- $id = (isset($data['teamUid'])) ? $data['teamUid'] : '';
+ $id = $data['teamUid'] ?? '';
/**
* Test for SUCCESS
@@ -37,8 +37,8 @@ trait TeamsBaseServer
*/
public function testCreateTeamMembership($data):array
{
- $teamUid = (isset($data['teamUid'])) ? $data['teamUid'] : '';
- $teamName = (isset($data['teamName'])) ? $data['teamName'] : '';
+ $teamUid = $data['teamUid'] ?? '';
+ $teamName = $data['teamName'] ?? '';
$email = uniqid().'friend@localhost.test';
/**