Compare commits

...

8 Commits

Author SHA1 Message Date
Clemens Schwaighofer
254635b023 Merge branch 'phpstan-strict' of github-omc:TBWA-EGPlus-Japan/Client-Projects.php-core-libraries into phpstan-strict 2025-05-15 21:45:06 +09:00
Clemens Schwaighofer
b4a193a6bd Merge branch 'development' into phpstan-strict 2025-05-15 21:42:47 +09:00
Clemens Schwaighofer
5c461a6fea core composer settings update 2024-10-18 09:29:44 +09:00
Clemens Schwaighofer
2e59e50df8 Set phpstan to max level for update testing 2024-10-18 09:22:02 +09:00
Clemens Schwaighofer
4b45f8d556 Update and fix composer json file, phars file 2024-10-18 09:20:53 +09:00
Clemens Schwaighofer
4b4e655374 Merge branch 'NewFeatures' into phpstan-strict 2024-10-18 09:16:16 +09:00
Clemens Schwaighofer
da0d939068 First phpstan strict check 2023-02-28 06:54:20 +09:00
Clemens Schwaighofer
537bc0a477 add phpstan strict 2023-02-28 06:39:36 +09:00
2 changed files with 21 additions and 3 deletions

View File

@@ -17,6 +17,20 @@ parameters:
# phpVersion: # phpVersion:
# min: 80200 # PHP 8.2.0 # min: 80200 # PHP 8.2.0
# max: 80300 # PHP latest # max: 80300 # PHP latest
strictRules:
allRules: false
disallowedLooseComparison: false
booleansInConditions: false
uselessCast: true
requireParentConstructorCall: false
disallowedConstructs: false
overwriteVariablesWithLoop: false
closureUsesThis: false
matchingInheritedMethodNames: false
numericOperandsInArithmeticOperators: false
strictCalls: false
switchConditionsMatchingType: false
noVariableVariables: false
paths: paths:
- %currentWorkingDirectory%/www - %currentWorkingDirectory%/www
bootstrapFiles: bootstrapFiles:
@@ -46,6 +60,8 @@ parameters:
- www/log - www/log
- www/media - www/media
- www/tmp - www/tmp
# File uploader
- www/lib/FileUpload
# ignore composer # ignore composer
- www/vendor - www/vendor
# ignore errores with # ignore errores with

View File

@@ -163,11 +163,13 @@ if (
} }
// set SSL on // set SSL on
$is_secure = false; $is_secure = false;
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') { if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') {
$is_secure = true; $is_secure = true;
} elseif ( } elseif (
!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || !empty($_SERVER['HTTP_X_FORWARDED_PROTO']) &&
!empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on' $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' ||
!empty($_SERVER['HTTP_X_FORWARDED_SSL']) &&
$_SERVER['HTTP_X_FORWARDED_SSL'] === 'on'
) { ) {
$is_secure = true; $is_secure = true;
} }