diff --git a/app/workers/certificates.php b/app/workers/certificates.php
index 515fbb7b0d..da3c4ec5c4 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 ca82abe59b..f654748a6d 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 25691a108c..cfbc8a6712 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 1392b6fdd0..297b144e81 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",
@@ -212,16 +212,16 @@
},
{
"name": "dasprid/enum",
- "version": "1.0.2",
+ "version": "1.0.3",
"source": {
"type": "git",
"url": "https://github.com/DASPRiD/Enum.git",
- "reference": "6ccc0d7141a7f149e3c56cb0ce5f05d9152cfd07"
+ "reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/6ccc0d7141a7f149e3c56cb0ce5f05d9152cfd07",
- "reference": "6ccc0d7141a7f149e3c56cb0ce5f05d9152cfd07",
+ "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/5abf82f213618696dda8e3bf6f64dd042d8542b2",
+ "reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2",
"shasum": ""
},
"require-dev": {
@@ -251,7 +251,7 @@
"enum",
"map"
],
- "time": "2020-07-30T16:37:13+00:00"
+ "time": "2020-10-02T16:03:48+00:00"
},
{
"name": "domnikl/statsd",
@@ -412,23 +412,23 @@
},
{
"name": "guzzlehttp/guzzle",
- "version": "dev-master",
+ "version": "7.2.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "616288af85deea154a61f5b996b0df69f7252e36"
+ "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/616288af85deea154a61f5b996b0df69f7252e36",
- "reference": "616288af85deea154a61f5b996b0df69f7252e36",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0aa74dfb41ae110835923ef10a9d803a22d50e79",
+ "reference": "0aa74dfb41ae110835923ef10a9d803a22d50e79",
"shasum": ""
},
"require": {
"ext-json": "*",
"guzzlehttp/promises": "^1.4",
"guzzlehttp/psr7": "^1.7",
- "php": "^7.2.5",
+ "php": "^7.2.5 || ^8.0",
"psr/http-client": "^1.0"
},
"provide": {
@@ -436,8 +436,8 @@
},
"require-dev": {
"ext-curl": "*",
- "php-http/client-integration-tests": "dev-phpunit8",
- "phpunit/phpunit": "^8.5.5",
+ "php-http/client-integration-tests": "^3.0",
+ "phpunit/phpunit": "^8.5.5 || ^9.3.5",
"psr/log": "^1.1"
},
"suggest": {
@@ -506,7 +506,7 @@
"type": "github"
}
],
- "time": "2020-09-30T15:03:52+00:00"
+ "time": "2020-10-10T11:47:56+00:00"
},
{
"name": "guzzlehttp/promises",
@@ -693,23 +693,23 @@
},
{
"name": "maxmind-db/reader",
- "version": "v1.7.0",
+ "version": "v1.8.0",
"source": {
"type": "git",
"url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git",
- "reference": "942553da239f12051275f9c666538b5dd09e2908"
+ "reference": "b566d429ac9aec10594b0935be8ff38302f8d5c8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/942553da239f12051275f9c666538b5dd09e2908",
- "reference": "942553da239f12051275f9c666538b5dd09e2908",
+ "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/b566d429ac9aec10594b0935be8ff38302f8d5c8",
+ "reference": "b566d429ac9aec10594b0935be8ff38302f8d5c8",
"shasum": ""
},
"require": {
"php": ">=7.2"
},
"conflict": {
- "ext-maxminddb": "<1.7.0,>=2.0.0"
+ "ext-maxminddb": "<1.8.0,>=2.0.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "2.*",
@@ -749,31 +749,31 @@
"geolocation",
"maxmind"
],
- "time": "2020-08-07T22:10:05+00:00"
+ "time": "2020-10-01T17:30:21+00:00"
},
{
"name": "maxmind/web-service-common",
- "version": "v0.7.0",
+ "version": "v0.8.0",
"source": {
"type": "git",
"url": "https://github.com/maxmind/web-service-common-php.git",
- "reference": "74c996c218ada5c639c8c2f076756e059f5552fc"
+ "reference": "ba67d9532cfaf499bd71774b8170d05df4f75fb7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/maxmind/web-service-common-php/zipball/74c996c218ada5c639c8c2f076756e059f5552fc",
- "reference": "74c996c218ada5c639c8c2f076756e059f5552fc",
+ "url": "https://api.github.com/repos/maxmind/web-service-common-php/zipball/ba67d9532cfaf499bd71774b8170d05df4f75fb7",
+ "reference": "ba67d9532cfaf499bd71774b8170d05df4f75fb7",
"shasum": ""
},
"require": {
"composer/ca-bundle": "^1.0.3",
"ext-curl": "*",
"ext-json": "*",
- "php": ">=5.6"
+ "php": ">=7.2"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "2.*",
- "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0",
+ "phpunit/phpunit": "^8.0 || ^9.0",
"squizlabs/php_codesniffer": "3.*"
},
"type": "library",
@@ -795,7 +795,7 @@
],
"description": "Internal MaxMind Web Service API",
"homepage": "https://github.com/maxmind/web-service-common-php",
- "time": "2020-05-06T14:07:26+00:00"
+ "time": "2020-10-01T15:28:36+00:00"
},
{
"name": "mustangostang/spyc",
@@ -1665,7 +1665,7 @@
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator",
- "reference": "552f9d872210c8a689727dd3a661c163b3816686"
+ "reference": "a57b3cd56c4bfe1538276cfc77456cf95d8835cb"
},
"require": {
"ext-curl": "*",
@@ -1695,7 +1695,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",
@@ -1882,12 +1882,12 @@
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "a3409d10079990eeb489c3fead0ac070b5b38895"
+ "reference": "00aba97fc36feabc8d94667eebd5d43959e60008"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/a3409d10079990eeb489c3fead0ac070b5b38895",
- "reference": "a3409d10079990eeb489c3fead0ac070b5b38895",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/00aba97fc36feabc8d94667eebd5d43959e60008",
+ "reference": "00aba97fc36feabc8d94667eebd5d43959e60008",
"shasum": ""
},
"require": {
@@ -1928,7 +1928,7 @@
"type": "tidelift"
}
],
- "time": "2020-08-28T16:31:07+00:00"
+ "time": "2020-10-01T09:35:15+00:00"
},
{
"name": "nikic/php-parser",
@@ -2300,12 +2300,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "a6037d775070cc82732c21809664c63fb4f19916"
+ "reference": "ece0c3ceee73810bd95226401bbfaea9e0f64de7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/a6037d775070cc82732c21809664c63fb4f19916",
- "reference": "a6037d775070cc82732c21809664c63fb4f19916",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ece0c3ceee73810bd95226401bbfaea9e0f64de7",
+ "reference": "ece0c3ceee73810bd95226401bbfaea9e0f64de7",
"shasum": ""
},
"require": {
@@ -2365,7 +2365,7 @@
"type": "github"
}
],
- "time": "2020-09-27T04:42:46+00:00"
+ "time": "2020-10-09T14:34:55+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -2594,16 +2594,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "9.3.11",
+ "version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "f7316ea106df7c9507f4fdaa88c47bc10a3b27a1"
+ "reference": "8b79c2a70ae855e582cef1ca63a849fe07bdb01d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f7316ea106df7c9507f4fdaa88c47bc10a3b27a1",
- "reference": "f7316ea106df7c9507f4fdaa88c47bc10a3b27a1",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8b79c2a70ae855e582cef1ca63a849fe07bdb01d",
+ "reference": "8b79c2a70ae855e582cef1ca63a849fe07bdb01d",
"shasum": ""
},
"require": {
@@ -2618,23 +2618,23 @@
"phar-io/manifest": "^2.0.1",
"phar-io/version": "^3.0.2",
"php": ">=7.3",
- "phpspec/prophecy": "^1.11.1",
- "phpunit/php-code-coverage": "^9.1.11",
- "phpunit/php-file-iterator": "^3.0.4",
- "phpunit/php-invoker": "^3.1",
- "phpunit/php-text-template": "^2.0.2",
- "phpunit/php-timer": "^5.0.1",
- "sebastian/cli-parser": "^1.0",
- "sebastian/code-unit": "^1.0.5",
- "sebastian/comparator": "^4.0.3",
- "sebastian/diff": "^4.0.2",
- "sebastian/environment": "^5.1.2",
- "sebastian/exporter": "^4.0.2",
- "sebastian/global-state": "^5.0",
- "sebastian/object-enumerator": "^4.0.2",
- "sebastian/resource-operations": "^3.0.2",
- "sebastian/type": "^2.2.1",
- "sebastian/version": "^3.0.1"
+ "phpspec/prophecy": "^1.12.1",
+ "phpunit/php-code-coverage": "^9.2",
+ "phpunit/php-file-iterator": "^3.0.5",
+ "phpunit/php-invoker": "^3.1.1",
+ "phpunit/php-text-template": "^2.0.3",
+ "phpunit/php-timer": "^5.0.2",
+ "sebastian/cli-parser": "^1.0.1",
+ "sebastian/code-unit": "^1.0.6",
+ "sebastian/comparator": "^4.0.5",
+ "sebastian/diff": "^4.0.3",
+ "sebastian/environment": "^5.1.3",
+ "sebastian/exporter": "^4.0.3",
+ "sebastian/global-state": "^5.0.1",
+ "sebastian/object-enumerator": "^4.0.3",
+ "sebastian/resource-operations": "^3.0.3",
+ "sebastian/type": "^2.3",
+ "sebastian/version": "^3.0.2"
},
"require-dev": {
"ext-pdo": "*",
@@ -2650,7 +2650,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "9.3-dev"
+ "dev-master": "9.5-dev"
}
},
"autoload": {
@@ -2689,7 +2689,7 @@
"type": "github"
}
],
- "time": "2020-09-24T08:08:49+00:00"
+ "time": "2020-10-11T07:43:20+00:00"
},
{
"name": "sebastian/cli-parser",
@@ -2749,12 +2749,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit.git",
- "reference": "d3a241b6028ff9d8e97d2b6ebd4090d01f92fad8"
+ "reference": "59236be62b1bb9919e6d7f60b0b832dc05cef9ab"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/d3a241b6028ff9d8e97d2b6ebd4090d01f92fad8",
- "reference": "d3a241b6028ff9d8e97d2b6ebd4090d01f92fad8",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/59236be62b1bb9919e6d7f60b0b832dc05cef9ab",
+ "reference": "59236be62b1bb9919e6d7f60b0b832dc05cef9ab",
"shasum": ""
},
"require": {
@@ -2793,7 +2793,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:28:46+00:00"
+ "time": "2020-10-02T14:47:54+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
@@ -2975,12 +2975,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": {
@@ -3029,7 +3029,7 @@
"type": "github"
}
],
- "time": "2020-09-28T05:32:55+00:00"
+ "time": "2020-10-13T11:48:30+00:00"
},
{
"name": "sebastian/environment",
@@ -3496,12 +3496,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": {
@@ -3513,7 +3513,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.2-dev"
+ "dev-master": "2.3-dev"
}
},
"autoload": {
@@ -3540,7 +3540,7 @@
"type": "github"
}
],
- "time": "2020-09-28T06:01:38+00:00"
+ "time": "2020-10-06T08:41:03+00:00"
},
{
"name": "sebastian/version",
@@ -3830,12 +3830,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": {
@@ -3897,7 +3897,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 5a84716b52..e9a47c7350 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 4e95148a65..d070ed3e7f 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
@@ -281,7 +281,7 @@ trait AccountBase
public function testGetAccountLogs($data):array
{
sleep(10);
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -369,8 +369,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';
/**
@@ -436,9 +436,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
@@ -505,7 +505,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
@@ -561,7 +561,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
@@ -638,9 +638,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
@@ -703,9 +703,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
@@ -757,9 +757,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
@@ -825,8 +825,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
@@ -882,7 +882,7 @@ trait AccountBase
*/
public function testDeleteAccountSessions($data):array
{
- $session = (isset($data['session'])) ? $data['session'] : '';
+ $session = $data['session'] ?? '';
/**
* Test for SUCCESS
@@ -910,8 +910,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',
@@ -932,8 +932,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
@@ -1006,8 +1006,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 80ee47c72a..a167b3763a 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 7f0441a88d..9aac863039 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']);
@@ -296,7 +296,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 7e4e6c1e41..ac3ff87240 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 73bdfe7199..a8ac2ac433 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 ceb0d86e5c..25bbcbdd58 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 1547a4e289..9869ce5906 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';
/**