From 8fffe35ea509ed99fa5830a50d5515d001361cd2 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 1 Sep 2020 00:54:04 +0000 Subject: [PATCH 1/3] Restyled by jq --- app/composer.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/composer.json b/app/composer.json index 514f2bc..5f7c95a 100644 --- a/app/composer.json +++ b/app/composer.json @@ -1,8 +1,8 @@ { - "require": { - "ramsey/uuid": "^4.0", - "vlucas/phpdotenv": "^5.0", - "jumbojett/openid-connect-php": "^0.9.0", - "sentry/sdk": "^2.1" - } + "require": { + "ramsey/uuid": "^4.0", + "vlucas/phpdotenv": "^5.0", + "jumbojett/openid-connect-php": "^0.9.0", + "sentry/sdk": "^2.1" + } } -- 2.49.1 From 305856d36880a46e4bb28d9f95a584b9da7e0337 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 1 Sep 2020 00:54:12 +0000 Subject: [PATCH 2/3] Restyled by php-cs-fixer --- app/includes/app_functions.php | 26 +++++++++++++------------- app/includes/prereqs.php | 18 ++++++++++-------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/app/includes/app_functions.php b/app/includes/app_functions.php index 4cc589a..c70ea82 100644 --- a/app/includes/app_functions.php +++ b/app/includes/app_functions.php @@ -8,21 +8,21 @@ function oidc_set_vars($sub, $uid, $fname, $lname, $email) { - $_SESSION['uuid'] = $sub; - $_SESSION['username'] = $uid; - $_SESSION['given_name'] = $fname; - $_SESSION['family_name'] = $lname; - $_SESSION['full_name'] = $fname . " " . $lname; - $_SESSION['email'] = $email; + $_SESSION['uuid'] = $sub; + $_SESSION['username'] = $uid; + $_SESSION['given_name'] = $fname; + $_SESSION['family_name'] = $lname; + $_SESSION['full_name'] = $fname . " " . $lname; + $_SESSION['email'] = $email; } function is_signed_in() { - if (isset($_SESSION['is_signed_in'])) { - return true; - } else { - return false; - } + if (isset($_SESSION['is_signed_in'])) { + return true; + } else { + return false; + } } function user_exists($db, $uuid) @@ -38,9 +38,9 @@ die(); } if (empty($result)) { - return false; + return false; } else { - return true; + return true; } } diff --git a/app/includes/prereqs.php b/app/includes/prereqs.php index 10b4c45..45d0bab 100644 --- a/app/includes/prereqs.php +++ b/app/includes/prereqs.php @@ -18,15 +18,16 @@ Sentry\init([ // Database auto-generation if (file_exists("/../includes/install.php")) { - return; - add_action('run_db_populate'); + return; + add_action('run_db_populate'); } -function run_db_populate() { +function run_db_populate() +{ // all my glorious one-time-magic. - include( "/../includes/install.php" ); - // after all execution rename your file; - rename( "/../includes/install.php", "/../includes/install-backup.php"); + include("/../includes/install.php"); + // after all execution rename your file; + rename("/../includes/install.php", "/../includes/install-backup.php"); } // Session @@ -38,8 +39,9 @@ $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // OpenID Connect use Jumbojett\OpenIDConnectClient; + $oidc = new OpenIDConnectClient($_ENV['OIDC_HOST'], $_ENV['OIDC_CLIENT_ID'], $_ENV['OIDC_CLIENT_SECRET']); if ($_ENV['OIDC_DISABLE_SSL'] == "true") { - $oidc->setVerifyHost(false); - $oidc->setVerifyPeer(false); + $oidc->setVerifyHost(false); + $oidc->setVerifyPeer(false); } -- 2.49.1 From f7d56f09f3d91cd4e48eb06bec5999ccace5c0b4 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 1 Sep 2020 00:54:14 +0000 Subject: [PATCH 3/3] Restyled by whitespace --- app/.env.sample | 2 +- app/includes/app_functions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/.env.sample b/app/.env.sample index 9435306..410a96e 100644 --- a/app/.env.sample +++ b/app/.env.sample @@ -14,4 +14,4 @@ OIDC_CLIENT_ID = "" OIDC_CLIENT_SECRET = "" OIDC_DISABLE_SSL = "" -SENTRY_ENVIRONMENT = "" \ No newline at end of file +SENTRY_ENVIRONMENT = "" diff --git a/app/includes/app_functions.php b/app/includes/app_functions.php index c70ea82..61ceeaf 100644 --- a/app/includes/app_functions.php +++ b/app/includes/app_functions.php @@ -15,7 +15,7 @@ $_SESSION['full_name'] = $fname . " " . $lname; $_SESSION['email'] = $email; } - + function is_signed_in() { if (isset($_SESSION['is_signed_in'])) { -- 2.49.1