1
0
Fork 0
mirror of synced 2024-06-24 01:00:35 +12:00

Merge branch '0.7.x' of github.com:appwrite/appwrite into swoole-and-functions

This commit is contained in:
Eldad Fux 2020-10-15 11:01:54 +03:00
commit 4f28f1c773
35 changed files with 491 additions and 212 deletions

View file

@ -3,6 +3,8 @@ arch:
os: linux
language: minimal
notifications:
email:
- team@appwrite.io

View file

@ -15,8 +15,8 @@ RUN composer update --ignore-platform-reqs --optimize-autoloader \
FROM php:7.4-cli-alpine as step1
ENV TZ=Asia/Tel_Aviv \
PHP_REDIS_VERSION=5.3.1 \
PHP_SWOOLE_VERSION=4.5.3 \
PHP_REDIS_VERSION=5.3.0 \
PHP_SWOOLE_VERSION=4.5.5 \
PHP_XDEBUG_VERSION=sdebug_2_9-beta
RUN \
@ -113,7 +113,8 @@ RUN \
&& pecl install imagick yaml \
&& docker-php-ext-enable imagick yaml \
&& docker-php-ext-install sockets opcache pdo_mysql \
&& apk del .deps
&& apk del .deps \
&& rm -rf /var/cache/apk/*
WORKDIR /usr/src/code

View file

@ -35,9 +35,9 @@ Table of Contents:
- [SDKs](#sdks)
- [Client](#client)
- [Server](#server)
- [Contributing](#contributing)
- [Security](#security)
- [Follow Us](#follow-us)
- [Contributing](#contributing)
- [License](#license)
## Installation
@ -53,7 +53,7 @@ docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:0.7.0
appwrite/appwrite:0.7.0 --version=0.7.0
```
### Windows
@ -65,7 +65,7 @@ docker run -it --rm ^
--volume //var/run/docker.sock:/var/run/docker.sock ^
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
--entrypoint="install" ^
appwrite/appwrite:0.7.0
appwrite/appwrite:0.7.0 --version=0.7.0
```
#### PowerShell
@ -75,7 +75,7 @@ docker run -it --rm ,
--volume /var/run/docker.sock:/var/run/docker.sock ,
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ,
--entrypoint="install" ,
appwrite/appwrite:0.7.0
appwrite/appwrite:0.7.0 --version=0.7.0
```
Once the Docker installation completes, go to http://localhost to access the Appwrite console from your browser. Please note that on non-linux native hosts, the server might take a few minutes to start after installation completes.

View file

@ -1,4 +1,3 @@
#!/bin/env php
<?php
require_once __DIR__.'/init.php';

View file

@ -31,11 +31,12 @@ return [
'ko', // Korean
'lt', // Lithuanian
'ml', // Malayalam
'mr', //Marathi
'mr', // Marathi
'ms', // Malay
'nl', // Dutch
'no', // Norwegian
'np', //Nepali
'np', // Nepali
'od', // Odia
'ph', // Filipino
'pl', // Polish
'pt-br', // Portuguese - Brazil

View file

@ -86,7 +86,7 @@ return [
'IL' => 'Israele',
'IT' => 'Italia',
'JM' => 'Giamaica',
'JO' => 'Jordan',
'JO' => 'Giordania',
'JP' => 'Giappone',
'KZ' => 'Kazakistan',
'KE' => 'Kenya',

View file

@ -0,0 +1,11 @@
<?php
return [
'AF' => 'ଆଫ୍ରିକା',
'AN' => 'ଆଣ୍ଟାର୍କଟିକା',
'AS' => 'ଏସିଆ',
'EU' => 'ଇଉରୋପ',
'NA' => 'ନର୍ଥ ଆମେରିକା',
'OC' => 'ଓସାନିଆ',
'SA' => 'ସାଉଥ ଆମେରିକା',
];

View file

@ -0,0 +1,198 @@
<?php
return [
'AF' => 'ଅଫଘନିସ୍ତାନ',
'AO' => 'ଅଙ୍ଗୋଲା',
'AL' => 'ଆଲବେନିଆ',
'AD' => 'ଆଣ୍ଡୋରା',
'AE' => 'ୟୁନାଇଟେଡ୍ ଆରବ ଏମିରେଟେସ୍',
'AR' => 'ଆର୍ଜେଣ୍ଟିନା',
'AM' => 'ଆର୍ମେନିଆ',
'AG' => 'ଆଣ୍ଟିଗୁଆ ଏବଂ ବାରବୁଦା',
'AU' => 'ଅଷ୍ଟ୍ରେଲିଆ',
'AT' => 'ଅଷ୍ଟ୍ରିଆ',
'AZ' => 'ଆଜେରବାଇଜାନ',
'BI' => 'ବୁରୁଣ୍ଡି',
'BE' => 'ବେଲଜିୟମ',
'BJ' => 'ବେନିନ୍',
'BF' => 'ବୁର୍କିନା ଫାସୋ',
'BD' => 'ବାଂଲାଦେଶ',
'BG' => 'ବୁଲଗେରିଆ',
'BH' => 'ବହାରେନ',
'BS' => 'ବାହାମା',
'BA' => 'ବୋସନିଆ ଏବଂ ହେର୍ଜେଗୋଭିନା',
'BY' => 'ବେଳରୁଷ',
'BZ' => 'ବେଲିଜ଼ଏ',
'BO' => 'ବୋଲିଭିଆ',
'BR' => 'ବ୍ରାଜିଲ୍',
'BB' => 'ବାରବାଡୋସ୍',
'BN' => 'ବ୍ରୁନେଇ',
'BT' => 'ଭୁଟାନ',
'BW' => 'ବୋତସ୍ୱାନା',
'CF' => 'କେନ୍ଦ୍ରୀୟ ଆଫ୍ରିକୀୟ ଗଣତନ୍ତ୍ର',
'CA' => 'କାନାଡା',
'CH' => 'ସ୍ୱିଜରଲ୍ୟାଣ୍ଡ',
'CL' => 'ଚିଲି',
'CN' => 'ଚୀନ୍',
'CI' => 'ଆଇଭୋରୀ କୋଷ୍ଟ',
'CM' => 'କାମେରୁନ୍',
'CD' => 'ଡ଼ ର କଙ୍ଗୋ',
'CG' => 'କଙ୍ଗୋ ଗଣତନ୍ତ୍ର',
'CO' => 'କଲମ୍ବିଆ',
'KM' => 'କୋମୋରସ୍',
'CV' => 'କେପ୍ ଭର୍ଡେ',
'CR' => 'କୋଷ୍ଟାରିକା',
'CU' => 'କ୍ୟୁବା',
'CY' => 'ସାଇପ୍ରସ୍',
'CZ' => 'ଚେକିଆ',
'DE' => 'ଜର୍ମାନୀ',
'DJ' => 'ଜିବୁଟି',
'DM' => 'ଡୋମିନିକା',
'DK' => 'ଡେନମାର୍କ',
'DO' => 'ଡୋମିନିକାନ୍ ରିପବ୍ଲିକ୍',
'DZ' => 'ଆଲଜେରିଆ',
'EC' => 'ଇକ୍ୟୁଏଡର୍',
'EG' => 'ମିଶର',
'ER' => 'ଇରିଟ୍ରିଆ',
'ES' => 'ସ୍ପେନ୍',
'EE' => 'ଇଷ୍ଟୋନିଆ',
'ET' => 'ଇଥିଓପିଆ',
'FI' => 'ଫିନଲ୍ୟାଣ୍ଡ',
'FJ' => 'ଫିଜି',
'FR' => 'ଫ୍ରାନ୍ସ',
'FM' => 'ମାଇକ୍ରୋନେସିଆ',
'GA' => 'ଗାବନ୍',
'GB' => 'ୟୁନାଇଟେଡ୍ କିଙ୍ଗଡମ',
'GE' => 'ଜର୍ଜିଆ',
'GH' => 'ଘାନା',
'GN' => 'ଗିନି',
'GM' => 'ଗାମ୍ବିଆ',
'GW' => 'ଗିନି-ବିସାଉ',
'GQ' => 'ଏକ୍ୟୁଟୋରିଆଲ୍ ଗିନି',
'GR' => 'ଗ୍ରୀସ୍',
'GD' => 'ଗ୍ରେନାଡା',
'GT' => 'ଗୁଆଟେମାଲା',
'GY' => 'ଗୁଇନ୍ଦା',
'HN' => 'ହୋଣ୍ଡୁରାସ୍',
'HR' => 'କ୍ରୋଏସିଆ',
'HT' => 'ହାଇତି',
'HU' => 'ହଙ୍ଗେରୀ',
'ID' => 'ଇଣ୍ଡୋନେସିଆ',
'IN' => 'ଭାରତ',
'IE' => 'ଆୟର୍ଲାଣ୍ଡ',
'IR' => 'ଇରାନ',
'IQ' => 'ଇରାକ',
'IS' => 'ଆଇସଲ୍ୟାଣ୍ଡ',
'IL' => 'ଇସ୍ରାଏଲ',
'IT' => 'ଇଟାଲୀ',
'JM' => 'ଜାମାଇକା',
'JO' => 'ଜୋର୍ଡାନ',
'JP' => 'ଜାପାନ',
'KZ' => 'କାଜାଖସ୍ତାନ',
'KE' => 'କେନିଆ',
'KG' => 'କିର୍ଗିଜସ୍ଥାନ',
'KH' => 'କାମ୍ବୋଡିଆ',
'KI' => 'କିରିବାଟି',
'KN' => 'ସେଣ୍ଟ କିଟ୍ସ ଏବଂ ନେଭିସ୍',
'KR' => 'ଦକ୍ଷିଣ କୋରିଆ',
'KW' => 'କୁଏତ',
'LA' => 'ଲାଓସ୍',
'LB' => 'ଲିବାନୋନ୍',
'LR' => 'ଲାଇବେରିଆ',
'LY' => 'ଲିବିଆ',
'LC' => 'ସେଣ୍ଟ ଲୁସିଆ',
'LI' => 'ଲିଚଟେଷ୍ଟାଇନ୍',
'LK' => 'ଶ୍ରୀ ଲଙ୍କା',
'LS' => 'ଲେସୋଥୋ',
'LT' => 'ଲିଥୁଆନିଆ',
'LU' => 'ଲକ୍ସେମବର୍ଗ',
'LV' => 'ଲାଟଭିଆ',
'MA' => 'ମୋରୋକୋ',
'MC' => 'ମୋନାକୋ',
'MD' => 'ମଲଡୋଭା',
'MG' => 'ମାଡାଗାସ୍କର',
'MV' => 'ମାଲଦ୍ୱୀପ',
'MX' => 'ମେକ୍ସିକୋ',
'MH' => 'ମାର୍ଶଲ ଦ୍ୱୀପପୁଞ୍ଜ',
'MK' => 'ମାକେଡୋନିଆ',
'ML' => 'ମାଲି',
'MT' => 'ମାଲ୍ଟା',
'MM' => 'ମିଆଁମାର',
'ME' => 'ମୋଣ୍ଟେନେଗ୍ରୋ',
'MN' => 'ମୋଙ୍ଗୋଲିଆ',
'MZ' => 'ମୋଜାମ୍ବିକ୍',
'MR' => 'ମରିସାନିଆ',
'MU' => 'ମରିସସ୍',
'MW' => 'ମଲାୱି',
'MY' => 'ମାଲେସିଆ',
'NA' => 'ନାମିବିଆ',
'NE' => 'ନାଇଜର',
'NG' => 'ନାଇଜେରିଆ',
'NI' => 'ନିକାରାଗୁଆ',
'NL' => 'ନେଦରଲ୍ୟାଣ୍ଡ',
'NO' => 'ନରୱେ',
'NP' => 'ନେପାଳ',
'NR' => 'ନାଉରୁ',
'NZ' => 'ନିଉଜିଲାଣ୍ଡ୍',
'OM' => 'ଓମାନ',
'PK' => 'ପାକିସ୍ତାନ',
'PA' => 'ପାନାମା',
'PE' => 'ପେରୁ',
'PH' => 'ଫିଲିପାଇନ୍ସ',
'PW' => 'ପାଲାଉ',
'PG' => 'ପାପୁଆ ନ୍ୟୁ ଗିନି',
'PL' => 'ପୋଲାଣ୍ଡ',
'KP' => 'ଉତ୍ତର କୋରିଆ',
'PT' => 'ପର୍ତ୍ତୁଗାଲ୍',
'PY' => 'ପାରାଗୁଏ',
'QA' => 'କାତାର',
'RO' => 'ରୋମାନିଆ',
'RU' => 'ୠଷ୍ସିଆ',
'RW' => 'ରୁୱାଣ୍ଡା',
'SA' => 'ସାଉଦି ଆରବ',
'SD' => 'ସୁଦାନ',
'SN' => 'ସେନେଗାଲ୍',
'SG' => 'ସିଙ୍ଗାପୁର',
'SB' => 'ଶଲୋମନ ଦ୍ୱୀପପୁ୍ଜ',
'SL' => 'ସିଇରା ଲେଓନେ',
'SV' => 'ଏଲ ସାଲଭାଡୋର',
'SM' => 'ସାନ୍ ମାରିନୋ',
'SO' => 'ସୋମାଲିଆ',
'RS' => 'ସର୍ବିଆ',
'SS' => 'ଦକ୍ଷିଣ ସୁଦାନ',
'ST' => 'ସାଓ ଟୋମେ ଏବଂ ପ୍ରିନ୍ସିପି',
'SR' => 'ସୁରିନାମ',
'SK' => 'ସ୍ଲୋଭାକିଆ',
'SI' => 'ସ୍ଲୋଭେନିଆ',
'SE' => 'ସ୍ୱିଡେନ',
'SZ' => 'ସ୍ୱେଜ଼ୀଲାଣ୍ଡ',
'SC' => 'ସେଚେଲସ୍',
'SY' => 'ସିରିଆ',
'TD' => 'ଚାଡ',
'TG' => 'ଟୋଗୋ',
'TH' => 'ଥାଇଲ୍ୟାଣ୍ଡ',
'TJ' => 'ତାଜିକିସ୍ତାନ',
'TM' => 'ତୁର୍କମେନିସ୍ତାନ',
'TL' => 'ତିମୋର-ଲେଷ୍ଟେ',
'TO' => 'ଟୋଙ୍ଗା',
'TT' => 'ତ୍ରିନିଦାଦ ଏବଂ ଟୋବାଗୋ',
'TN' => 'ଟ୍ୟୁନିସିଆ',
'TR' => 'ତୁର୍କୀ',
'TV' => 'ତୁଭାଲୁ',
'TZ' => 'ତାଞ୍ଜାନିଆ',
'UG' => 'ଉଗାଣ୍ଡା',
'UA' => 'ୟୁକ୍ରେନ',
'UY' => 'ଉରୁଗୁଏ',
'US' => 'ଯୁକ୍ତ ରାଷ୍ଟ୍ର',
'UZ' => 'ଉଜବେକିସ୍ତାନ',
'VA' => 'ଭାଟିକାନ୍ ସିଟି',
'VC' => 'ସେଣ୍ଟ ଭିନ୍ସେଣ୍ଟ ଏବଂ ଗ୍ରେନାଡାଇନ୍ସ',
'VE' => 'ଭେନେଜୁଏଲା',
'VN' => 'ଭିଏତନାମ',
'VU' => 'ଭାନୁୟୁଟୁ',
'WS' => 'ସାମୋଆ',
'YE' => 'ୟେମେନ',
'ZA' => 'ଦକ୍ଷିଣ ଆଫ୍ରିକା',
'ZM' => 'ଜାମ୍ବିଆ',
'ZW' => 'ଜିମ୍ବାୱେ',
];

View file

@ -0,0 +1,21 @@
<?php
return [
'settings.inspire' => '"ଜ୍ଞାନୀ ହେବାର କଳା ହେଉଛି କ’ଣ ଅଣଦେଖା କରାଯିବ ଜାଣିବାର କଳା |"', // This is the line printed in the homepage and console 'view-source'
'settings.locale' => 'od',
'settings.direction' => 'ltr',
// Service - Users
'account.emails.team' => '%s ଟିମ',
'account.emails.verification.title' => 'ଏକାଉଣ୍ଟ ଭେରିଫିକେସନ',
'account.emails.verification.body' => 'od.email.auth.confirm.tpl',
'account.emails.recovery.title' => 'ପାସୱାର୍ଡ ରିସେଟ',
'account.emails.recovery.body' => 'od.email.auth.recovery.tpl',
'account.emails.invitation.title' => 'ଈଂଭିଟେସନ %s ଟିମ at %s',
'account.emails.invitation.body' => 'od.email.auth.invitation.tpl',
'locale.country.unknown' => 'ଅଜ୍ଞାତ',
'countries' => include 'od.countries.php',
'continents' => include 'od.continents.php',
];

View file

@ -0,0 +1,16 @@
<p>
ନମସ୍କାର {{name}},
</p>
<p>
ଆପଣଙ୍କର ଇମେଲ୍ ଠିକଣା ଯାଞ୍ଚ କରିବାକୁ ଏହି ଲିଙ୍କ୍ ଅନୁସରଣ କରନ୍ତୁ|
</p>
{{cta}}
<p>
ଯଦି ଆପଣ ଏହି ଠିକଣା ଯାଞ୍ଚ କରିବାକୁ କହି ନାହାଁନ୍ତି, ଆପଣ ଏହି ସନ୍ଦେଶକୁ ଉପେକ୍ଷା କରିପାରିବେ|
</p>
<p>
ଧନ୍ୟବାଦ,
<br />
{{project}} ଟିମ
</p>

View file

@ -0,0 +1,14 @@
<p>
ନମସ୍କାର,
</p>
<p>
ଏହି ମେଲ୍ ଆପଣଙ୍କୁ ପଠାଯାଇଥିଲା କାରଣ <b>{{owner}}</b> ଆପଣଙ୍କୁ {{project}} ପାଇଁ <b>{{team}}</b> ଦଳରେ ଦଳର ସଦସ୍ୟ ହେବାକୁ ଆମନ୍ତ୍ରିତ ହେବାକୁ ଚାହୁଁଥିଲେ|
</p>
{{cta}}
<p>
ଯଦି ଆପଣ ଆଗ୍ରହୀ ନୁହଁନ୍ତି, ଆପଣ ଏହି ସନ୍ଦେଶକୁ ଅଣଦେଖା କରିପାରିବେ |</p>
<p>
ଧନ୍ୟବାଦ,
<br />
{{project}} ଟିମ
</p>

View file

@ -0,0 +1,15 @@
<p>
ନମସ୍କାର {{name}},
</p>
<p>
{{project}} ପାସୱାର୍ଡ ରିସେଟ କରିବାକୁ ଏହି ଲିଙ୍କ୍ ଉପରେ କ୍ଲିକ୍ କରନ୍ତୁ |
</p>
{{cta}}
<p>
ଯଦି ଆପଣ ଏହି ଠିକଣା ଯାଞ୍ଚ କରିବାକୁ କହି ନାହାଁନ୍ତି, ଆପଣ ଏହି ସନ୍ଦେଶକୁ ଉପେକ୍ଷା କରିପାରିବେ|
</p>
<p>
ଧନ୍ୟବାଦ,
<br />
{{project}} ଟିମ
</p>

View file

@ -283,8 +283,8 @@ App::get('/v1/avatars/favicon')
case 'jpeg':
$size = \explode('x', \strtolower($sizes));
$sizeWidth = (isset($size[0])) ? (int) $size[0] : 0;
$sizeHeight = (isset($size[1])) ? (int) $size[1] : 0;
$sizeWidth = (int) $size[0] ?? 0;
$sizeHeight = (int) $size[1] ?? 0;
if (($sizeWidth * $sizeHeight) >= $space) {
$space = $sizeWidth * $sizeHeight;
@ -423,7 +423,7 @@ App::get('/v1/avatars/initials')
$code = 0;
foreach ($words as $key => $w) {
$initials .= (isset($w[0])) ? $w[0] : '';
$initials .= $w[0] ?? '';
$code += (isset($w[0])) ? \ord($w[0]) : 0;
if ($key == 1) {

View file

@ -331,8 +331,8 @@ App::post('/v1/database/collections/:collectionId/documents')
* Set default collection values
*/
foreach ($collection->getAttribute('rules') as $key => $rule) {
$key = (isset($rule['key'])) ? $rule['key'] : '';
$default = (isset($rule['default'])) ? $rule['default'] : null;
$key = $rule['key'] ?? '';
$default = $rule['default'] ?? null;
if (!isset($data[$key])) {
$data[$key] = $default;

View file

@ -278,14 +278,14 @@ App::get('/v1/health/stats') // Currently only used internally
'partitionFree' => Storage::human($device->getPartitionFreeSpace()),
],
'cache' => [
'uptime' => (isset($cacheStats['uptime_in_seconds'])) ? $cacheStats['uptime_in_seconds'] : 0,
'clients' => (isset($cacheStats['connected_clients'])) ? $cacheStats['connected_clients'] : 0,
'hits' => (isset($cacheStats['keyspace_hits'])) ? $cacheStats['keyspace_hits'] : 0,
'misses' => (isset($cacheStats['keyspace_misses'])) ? $cacheStats['keyspace_misses'] : 0,
'memory_used' => (isset($cacheStats['used_memory'])) ? $cacheStats['used_memory'] : 0,
'memory_used_human' => (isset($cacheStats['used_memory_human'])) ? $cacheStats['used_memory_human'] : 0,
'memory_used_peak' => (isset($cacheStats['used_memory_peak'])) ? $cacheStats['used_memory_peak'] : 0,
'memory_used_peak_human' => (isset($cacheStats['used_memory_peak_human'])) ? $cacheStats['used_memory_peak_human'] : 0,
'uptime' => $cacheStats['uptime_in_seconds'] ?? 0,
'clients' => $cacheStats['connected_clients'] ?? 0,
'hits' => $cacheStats['keyspace_hits'] ?? 0,
'misses' => $cacheStats['keyspace_misses'] ?? 0,
'memory_used' => $cacheStats['used_memory'] ?? 0,
'memory_used_human' => $cacheStats['used_memory_human'] ?? 0,
'memory_used_peak' => $cacheStats['used_memory_peak'] ?? 0,
'memory_used_peak_human' => $cacheStats['used_memory_peak_human'] ?? 0,
],
]);
}, ['response', 'register']);

View file

@ -260,6 +260,7 @@ Locale::setLanguage('ms', include __DIR__.'/config/locale/translations/ms.php');
Locale::setLanguage('nl', include __DIR__.'/config/locale/translations/nl.php');
Locale::setLanguage('no', include __DIR__.'/config/locale/translations/no.php');
Locale::setLanguage('np', include __DIR__.'/config/locale/translations/np.php');
Locale::setLanguage('od', include __DIR__.'/config/locale/translations/od.php');
Locale::setLanguage('ph', include __DIR__.'/config/locale/translations/ph.php');
Locale::setLanguage('pl', include __DIR__.'/config/locale/translations/pl.php');
Locale::setLanguage('pt-br', include __DIR__.'/config/locale/translations/pt-br.php');

View file

@ -61,7 +61,7 @@ $callbacks = [
$offset = $offset + $limit;
}
$schema = (isset($_SERVER['_APP_DB_SCHEMA'])) ? $_SERVER['_APP_DB_SCHEMA'] : '';
$schema = $_SERVER['_APP_DB_SCHEMA'] ?? '';
try {
$statement = $db->prepare("

View file

@ -104,10 +104,10 @@ $maxCells = 10;
if($i > $maxCells) {
break;
}
$label = (isset($rule['label'])) ? $rule['label'] : '';
$key = (isset($rule['key'])) ? $rule['key'] : '';
$type = (isset($rule['type'])) ? $rule['type'] : '';
$array = (isset($rule['array'])) ? $rule['array'] : '';
$label = $rule['label'] ?? '';
$key = $rule['key'] ?? '';
$type = $rule['type'] ?? '';
$array = $rule['array'] ?? '';
?>
<td data-title="<?php echo $this->escape($label); ?>: " class="text-size-small text-height-small">
<a data-ls-attrs="href=/console/database/document?id={{node.$id}}&collection={{router.params.id}}&project={{router.params.project}}&buster={{project-collection.dateUpdated}}">

View file

@ -17,10 +17,10 @@ $collections = [];
<?php echo $searchFiles->render(); ?>
<?php foreach($rules as $rule): // Form to append child document
$key = (isset($rule['key'])) ? $rule['key'] : '';
$label = (isset($rule['label'])) ? $rule['label'] : '';
$type = (isset($rule['type'])) ? $rule['type'] : '';
$list = (isset($rule['list']) && !empty($list)) ? $rule['list'] : [];
$key = $rule['key'] ?? '';
$label = $rule['label'] ?? '';
$type = $rule['type'] ?? '';
$list = $rule['list'] ?? [];
?>
<?php foreach($list as $item):
if($item === $collection->getId()) {
@ -48,11 +48,11 @@ $collections = [];
<?php endforeach; ?>
<?php foreach($rules as $rule): // Form to append child document
$key = (isset($rule['key'])) ? $rule['key'] : '';
$label = (isset($rule['label'])) ? $rule['label'] : '';
$type = (isset($rule['type'])) ? $rule['type'] : '';
$list = (isset($rule['list'])) ? $rule['list'] : [];
$array = (isset($rule['array'])) ? $rule['array'] : false;
$key = $rule['key'] ?? '';
$label = $rule['label'] ?? '';
$type = $rule['type'] ?? '';
$list = $rule['list'] ?? [];
$array = $rule['array'] ?? false;
?>
<?php if($type !== 'document' && $array): ?>
@ -126,11 +126,11 @@ $collections = [];
<?php endforeach; ?>
<?php foreach($rules as $rule): // Form to remove array $index key
$key = (isset($rule['key'])) ? $rule['key'] : '';
$label = (isset($rule['label'])) ? $rule['label'] : '';
$type = (isset($rule['type'])) ? $rule['type'] : '';
$list = (isset($rule['list'])) ? $rule['list'] : false;
$array = (isset($rule['array'])) ? $rule['array'] : false;
$key = $rule['key'] ?? '';
$label = $rule['label'] ?? '';
$type = $rule['type'] ?? '';
$list = $rule['list'] ?? false;
$array = $rule['array'] ?? false;
if(!$array) {
continue;
@ -214,10 +214,10 @@ $collections = [];
<!-- <div class="document-nav" data-forms-nav>
<ul class="text-align-end margin-end-small">
<?php foreach($rules as $rule): // Form to append child document
$key = (isset($rule['key'])) ? $rule['key'] : '';
$label = (isset($rule['label'])) ? $rule['label'] : '';
$type = (isset($rule['type'])) ? $rule['type'] : '';
$list = (isset($rule['list'])) ? $rule['list'] : [];
$key = $rule['key'] ?? '';
$label = $rule['label'] ?? '';
$type = $rule['type'] ?? '';
$list = $rule['list'] ?? [];
?>
<li class="text-size-small">
<span class="link text-fade" data-forms-nav-link="<?php echo $this->escape($key); ?>"><?php echo $this->escape($label); ?></span>

View file

@ -35,12 +35,12 @@ $array = $this->getParam('array', false);
<ul>
<?php foreach($rules as $rule):
$key = (isset($rule['key'])) ? $rule['key'] : '';
$label = (isset($rule['label'])) ? $rule['label'] : '';
$type = (isset($rule['type'])) ? $rule['type'] : '';
$array = (isset($rule['array'])) ? $rule['array'] : false;
$required = (isset($rule['required'])) ? $rule['required'] : false;
$list = (isset($rule['list'])) ? $rule['list'] : false;
$key = $rule['key'] ?? '';
$label = $rule['label'] ?? '';
$type = $rule['type'] ?? '';
$array = $rule['array'] ?? false;
$required = $rule['required'] ?? false;
$list = $rule['list'] ?? false;
$comp = new View(__DIR__.'/rules/'.$type.'.phtml');
$loop = new View(__DIR__.'/rules/array.phtml');

View file

@ -9,7 +9,7 @@ $list = (is_array($list)) ? $list : [];
?>
<?php foreach($list as $item):
$collection = (isset($collections[$item])) ? $collections[$item] : null;
$collection = $collections[$item] ?? null;
if(empty($collection)) {
continue;
@ -31,8 +31,8 @@ $list = (is_array($list)) ? $list : [];
<div class="box line margin-bottom-small padding-small fade-bottom">
<ul>
<?php foreach($rules as $i => $rule):
$collectionLabel = (isset($rule['label'])) ? $rule['label'] : '';
$collectionKey = (isset($rule['key'])) ? $rule['key'] : '';
$collectionLabel = $rule['label'] ?? '';
$collectionKey = $rule['key'] ?? '';
if($i === 3) {break;}
?>

View file

@ -49,7 +49,7 @@ $rules = $collection->getAttribute('rules', []);
<tr>
<th width="40">&nbsp;</th>
<?php foreach($rules as $rule):
$label = (isset($rule['label'])) ? $rule['label'] : '';
$label = $rule['label'] ?? '';
?>
<th width="120"><?php echo $this->escape($label); ?></th>
<?php endforeach; ?>
@ -62,10 +62,10 @@ $rules = $collection->getAttribute('rules', []);
<input type="radio" name="selected" data-ls-attrs="value={{node.$id}}" data-ls-bind="{{search.selected}}" />
</td>
<?php foreach($rules as $rule):
$label = (isset($rule['label'])) ? $rule['label'] : '';
$key = (isset($rule['key'])) ? $rule['key'] : '';
$type = (isset($rule['type'])) ? $rule['type'] : '';
$array = (isset($rule['array'])) ? $rule['array'] : '';
$label = $rule['label'] ?? '';
$key = $rule['key'] ?? '';
$type = $rule['type'] ?? '';
$array = $rule['array'] ?? '';
?>
<td data-title="<?php echo $this->escape($label); ?>" class="text-size-small text-height-small">
<a data-ls-attrs="href=/console/database/document?id={{node.$id}}&collection=<?php echo $this->escape($id); ?>&project={{router.params.project}}" target="_blank">

View file

@ -308,9 +308,9 @@ $providers = $this->getParam('providers', []);
<?php foreach ($providers as $provider => $data):
if (isset($data['enabled']) && !$data['enabled']) { continue; }
if (isset($data['mock']) && $data['mock']) { continue; }
$form = (isset($data['form'])) ? $data['form'] : false;
$name = (isset($data['name'])) ? $data['name'] : 'Unknown';
$beta = (isset($data['beta'])) ? $data['beta'] : false;
$form = $data['form'] ?? false;
$name = $data['name'] ?? 'Unknown';
$beta = $data['beta'] ?? false;
?>
<li class="<?php echo (isset($data['enabled']) && !$data['enabled']) ? 'dev-feature' : ''; ?>">
<div data-ui-modal class="modal close" data-button-alias="none" data-open-event="provider-update-<?php echo $provider; ?>">

View file

@ -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 : '');

View file

@ -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

View file

@ -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);

68
composer.lock generated
View file

@ -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",

View file

@ -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, ';'))) {

View file

@ -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';
/**

View file

@ -13,7 +13,7 @@ trait FunctionsBase
// */
// public function testGetTeam($data):array
// {
// $id = (isset($data['teamUid'])) ? $data['teamUid'] : '';
// $id = $data['teamUid'] ?? '';
// /**
// * Test for SUCCESS

View file

@ -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']);

View file

@ -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',

View file

@ -75,7 +75,7 @@ trait TeamsBase
*/
public function testGetTeam($data):array
{
$id = (isset($data['teamUid'])) ? $data['teamUid'] : '';
$id = $data['teamUid'] ?? '';
/**
* Test for SUCCESS

View file

@ -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

View file

@ -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';
/**