From 6e2f2f1c1e98ecd86aa89c6547beb742d7385d18 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 11 May 2023 13:02:04 +0200 Subject: A few additional PHPStan rules (#5388) A subset of https://github.com/phpstan/phpstan-strict-rules --- app/Models/Share.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/Models/Share.php') diff --git a/app/Models/Share.php b/app/Models/Share.php index b01d285f3..a0bae22b3 100644 --- a/app/Models/Share.php +++ b/app/Models/Share.php @@ -137,11 +137,11 @@ class FreshRSS_Share { $this->isDeprecated = $isDeprecated; $this->transforms = $transforms; - if (!in_array($form_type, array('simple', 'advanced'))) { + if (!in_array($form_type, ['simple', 'advanced'], true)) { $form_type = 'simple'; } $this->form_type = $form_type; - if (!in_array($method, array('GET', 'POST'))) { + if (!in_array($method, ['GET', 'POST'], true)) { $method = 'GET'; } $this->method = $method; @@ -304,7 +304,7 @@ class FreshRSS_Share { * @return string the transformed data. */ private static function transform(string $data, array $transform): string { - if (!is_array($transform) || empty($transform)) { + if (empty($transform)) { return $data; } -- cgit v1.2.3