aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Share.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-05-11 13:02:04 +0200
committerGravatar GitHub <noreply@github.com> 2023-05-11 13:02:04 +0200
commit6e2f2f1c1e98ecd86aa89c6547beb742d7385d18 (patch)
tree7ba9f5aebb01d12045b9067a86b5060ba13dca18 /app/Models/Share.php
parentfe7d9bbcd68660a59b813346c236b61b25a51c80 (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.php6
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;
}