From ee6f87c6d8184a8cffe71c0515a7fb91d5db4ad4 Mon Sep 17 00:00:00 2001 From: korelstar Date: Sun, 29 Mar 2020 14:02:58 +0200 Subject: [PATCH] code formatting --- tests/nextcloud-version.php | 35 +++++++++++++++++------------------ tests/phan-config.php | 14 +++++++------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/tests/nextcloud-version.php b/tests/nextcloud-version.php index b85eb357..2886eda9 100644 --- a/tests/nextcloud-version.php +++ b/tests/nextcloud-version.php @@ -1,20 +1,20 @@ {$prop}; } -function getNCVersionFromAppInfo($path, $minmax='min') { - if(!file_exists($path)) { +function getNCVersionFromAppInfo($path, $minmax = 'min') { + if (!file_exists($path)) { throw new Exception('AppInfo does not exists: '.$path); } - if(!is_readable($path)) { + if (!is_readable($path)) { throw new Exception('AppInfo is not readable: '.$path); } $content = file_get_contents($path); @@ -68,8 +68,8 @@ function versionCompare($sv1, $sv2) { $v1 = explode('.', $sv1); $v2 = explode('.', $sv2); $count = min(count($v1), count($v2)); - for($i=0; $i<$count; $i++) { - if($v1[$i] !== $v2[$i]) { + for ($i=0; $i<$count; $i++) { + if ($v1[$i] !== $v2[$i]) { return false; } } @@ -79,7 +79,7 @@ function versionCompare($sv1, $sv2) { echo 'Testing Nextcloud version '; try { $vComposer = getNCVersionFromComposer(__DIR__.'/../composer.json'); - if($vComposer === 'dev-master') { + if ($vComposer === 'dev-master') { $vComposer = getNCVersionFromComposerBranchAlias(__DIR__.'/../vendor/christophwurst/nextcloud/composer.json'); $vAppInfo = getNCVersionFromAppInfo(__DIR__.'/../appinfo/info.xml', 'max'); echo 'max'; @@ -88,14 +88,13 @@ try { echo 'min'; } echo ': '.$vAppInfo.' (AppInfo) vs. '.$vComposer.' (Composer) => '; - if(versionCompare($vComposer, $vAppInfo)) { + if (versionCompare($vComposer, $vAppInfo)) { echo 'OK'.PHP_EOL; } else { echo 'FAILED'.PHP_EOL; exit(1); } -} catch(Exception $e) { +} catch (Exception $e) { echo $e->getMessage().PHP_EOL; exit(1); } -?> diff --git a/tests/phan-config.php b/tests/phan-config.php index f2d8657f..7b5658d6 100644 --- a/tests/phan-config.php +++ b/tests/phan-config.php @@ -1,11 +1,11 @@ [ - 'lib/', - 'vendor/', - ], - "exclude_analysis_directory_list" => [ - 'vendor/', - ], + 'directory_list' => [ + 'lib/', + 'vendor/', + ], + "exclude_analysis_directory_list" => [ + 'vendor/', + ], ];