Skip to content

Commit

Permalink
Psalm & Rector Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
rotimi committed May 23, 2024
1 parent 71a7c28 commit 3cb91c3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
// \Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector::class,
// \Rector\Php71\Rector\FuncCall\CountOnNullRector::class,
// //\Rector\TypeDeclaration\Rector\FunctionLike\ParamTypeDeclarationRector::class,
// \Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector::class
// \Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector::class,
\Rector\Php80\Rector\FunctionLike\MixedTypeRector::class,
];

$rectorConfigurator->skip($skipables);
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public function updateSelectedLanguage() : void {
$this->vespula_locale->setCode($query_params[self::GET_QUERY_PARAM_SELECTED_LANG]);

if (session_status() !== \PHP_SESSION_ACTIVE) {

$session_start_settings =
$this->getAppSetting('session_start_options') !== null
? (array)$this->getAppSetting('session_start_options')
Expand Down
20 changes: 10 additions & 10 deletions src/functions/framework-helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,18 @@ function sMVC_DumpVar(...$vals): void {
/**
* This function stores a snapshot of the following super globals $_SERVER, $_GET,
* $_POST, $_FILES, $_COOKIE, $_SESSION & $_ENV and then returns the stored values
* on subsequent calls. (In the case of $_SESSION, a reference to it is kept so
* that modifying sMVC_GetSuperGlobal('session') will also modify $_SESSION).
* on subsequent calls. (In the case of $_SESSION, a reference to it is kept so
* that modifying sMVC_GetSuperGlobal('session') will also modify $_SESSION).
* If a session has not been started sMVC_GetSuperGlobal('session') will always
* return null, likewise sMVC_GetSuperGlobal('session', 'some_key') will always
* return $default_val.
*
* IT IS STRONGLY RECOMMENDED THAY YOU USE LIBRARIES LIKE aura/session
* IT IS STRONGLY RECOMMENDED THAY YOU USE LIBRARIES LIKE aura/session
* (https://github.com/auraphp/Aura.Session) TO WORK WITH $_SESSION.
* USING sMVC_GetSuperGlobal('session') IS HIGHLY DISCOURAGED.
*
* @param string $global_name the name (case-insensitive) of a any of the super
* globals mentioned above (excluding the $_). For
* @param string $global_name the name (case-insensitive) of a any of the super
* globals mentioned above (excluding the $_). For
* example 'Post', 'pOst', etc.
* sMVC_GetSuperGlobal('get') === sMVC_GetSuperGlobal('gEt'), etc.
*
Expand All @@ -144,15 +144,15 @@ function sMVC_DumpVar(...$vals): void {
* @param mixed $default_val the value to return if $key is not an actual key in
* the specified super global.
*
* @return mixed Returns an array containing all values in the specified super
* @return mixed Returns an array containing all values in the specified super
* global if $key and $default_val were not supplied. A value associated
* with a specific key in the specified super global is returned or the
* $default_val if the specific key is not found in the specified super
* $default_val if the specific key is not found in the specified super
* global (this happens when $global_name and $key are supplied;
* $default_val may be supplied too). If no parameters were supplied
* an array with the following keys
* (`server`, `get`, `post`, `files`, `cookie`, `env` and `session`)
* is returned (the corresponding values will be the value of the
* an array with the following keys
* (`server`, `get`, `post`, `files`, `cookie`, `env` and `session`)
* is returned (the corresponding values will be the value of the
* super global associated with each key).
*
*/
Expand Down

0 comments on commit 3cb91c3

Please sign in to comment.