php7.4 mixed
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Michel Roux 2023-06-18 02:09:28 +02:00
parent a663c3914d
commit 884e450cad
2 changed files with 5 additions and 2 deletions

View File

@ -24,7 +24,7 @@ abstract class ReaderEntity extends Entity {
* *
* @return string|array * @return string|array
*/ */
public function conditional_json_decode(string $el): mixed { public function conditional_json_decode(string $el) {
/** @var array $result */ /** @var array $result */
$result = json_decode($el); $result = json_decode($el);
if (json_last_error() === JSON_ERROR_NONE) { if (json_last_error() === JSON_ERROR_NONE) {

View File

@ -79,7 +79,10 @@ class Hooks {
$queryBuilder->executeStatement(); $queryBuilder->executeStatement();
} }
private static function isJson(mixed $string): bool { /**
* @param mixed $string
*/
private static function isJson($string): bool {
return is_string($string) && is_array(json_decode($string, true)) && json_last_error() == JSON_ERROR_NONE; return is_string($string) && is_array(json_decode($string, true)) && json_last_error() == JSON_ERROR_NONE;
} }
} }