diff options
| author | 2023-05-11 13:02:04 +0200 | |
|---|---|---|
| committer | 2023-05-11 13:02:04 +0200 | |
| commit | 6e2f2f1c1e98ecd86aa89c6547beb742d7385d18 (patch) | |
| tree | 7ba9f5aebb01d12045b9067a86b5060ba13dca18 /app/Models/Share.php | |
| parent | fe7d9bbcd68660a59b813346c236b61b25a51c80 (diff) | |
A few additional PHPStan rules (#5388)
A subset of
https://github.com/phpstan/phpstan-strict-rules
Diffstat (limited to 'app/Models/Share.php')
| -rw-r--r-- | app/Models/Share.php | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |
