Skip to content

Commit

Permalink
Cleaned small mistakes.
Browse files Browse the repository at this point in the history
  • Loading branch information
msyk committed Nov 2, 2024
1 parent 90dacb8 commit 5d5733a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/php/DB/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ public function getAuthentication(): ?array
* @param string|null $key
* @return float|int|mixed|string|null
*/
public function getAuthenticationItem(?string $key) :mixed
public function getAuthenticationItem(?string $key): mixed
{
if (isset($this->authentication[$key])) {
return $this->authentication[$key];
Expand Down
2 changes: 1 addition & 1 deletion src/php/DB/Support/ProxyVisitors/DescribeVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function visitIsAuthAccessing(OperationElement $e): bool

/**
* @param OperationElement $e
* @return void
* @return bool
*/
public function visitCheckAuthentication(OperationElement $e): bool
{
Expand Down
4 changes: 1 addition & 3 deletions src/php/DB/Support/ProxyVisitors/OperationVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Exception;
use INTERMediator\DB\Logger;
use INTERMediator\DB\Proxy;
use INTERMediator\DB\Support\ProxyElements\CheckAuthenticationElement;
use INTERMediator\DB\Support\ProxyElements\OperationElement;
use INTERMediator\FileUploader;
use INTERMediator\IMUtil;
Expand Down Expand Up @@ -346,8 +345,7 @@ function CreateReplaceImpl(string $access): void
/**
* @return void
*/
protected
function defaultHandleChallenge()
protected function defaultHandleChallenge(): void
{
$proxy = $this->proxy;
Logger::getInstance()->setDebugMessage("[handleChallenge] access={$proxy->access}, succeed={$proxy->authSucceed}", 2);
Expand Down
11 changes: 9 additions & 2 deletions src/php/IMUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public static function isPHPExecutingUNIX(): bool
* @param $str
* @return array|string
*/
public static function removeNull($str):array|string
public static function removeNull($str): array|string
{
return str_replace("\x00", '', $str ?? "");
}
Expand Down Expand Up @@ -846,8 +846,15 @@ public static function isRunAsWebApp(): bool
return true;
}

public static function getFromProfileIfAvailable(string $str): string
/**
* @param string|null $str
* @return string|null
*/
public static function getFromProfileIfAvailable(?string $str): string|null
{
if (is_null($str)) {
return null;
}
$comp = array_map(function ($elm) {
return strtolower(trim($elm));
}, explode('|', $str));
Expand Down
2 changes: 1 addition & 1 deletion src/php/Params.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private static function readParamsPHPFile(): void
}

/**
* @param mixed $vName
* @param string|array $vName
* @param mixed $defValue
* @return mixed
*/
Expand Down

0 comments on commit 5d5733a

Please sign in to comment.