diff --git a/src/Module/Api/Friendica/Activity.php b/src/Module/Api/Friendica/Activity.php index 3915c2089e..3c892b3030 100644 --- a/src/Module/Api/Friendica/Activity.php +++ b/src/Module/Api/Friendica/Activity.php @@ -52,7 +52,7 @@ class Activity extends BaseApi $res = Item::performActivity($request['id'], $this->parameters['verb'], $uid); if ($res) { - if ($this->parameters['extension'] ?? '' == 'xml') { + if (($this->parameters['extension'] ?? '') == 'xml') { $ok = 'true'; } else { $ok = 'ok'; diff --git a/src/Module/Api/Friendica/Notification.php b/src/Module/Api/Friendica/Notification.php index d16e0e2b0d..46320df153 100644 --- a/src/Module/Api/Friendica/Notification.php +++ b/src/Module/Api/Friendica/Notification.php @@ -43,7 +43,7 @@ class Notification extends BaseApi $notifications[] = new ApiNotification($Notify); } - if ($this->parameters['extension'] ?? '' == 'xml') { + if (($this->parameters['extension'] ?? '') == 'xml') { $xmlnotes = []; foreach ($notifications as $notification) { $xmlnotes[] = ['@attributes' => $notification->toArray()]; diff --git a/src/Module/Api/Friendica/Profile/Show.php b/src/Module/Api/Friendica/Profile/Show.php index 2507b7e275..2d686d9cae 100644 --- a/src/Module/Api/Friendica/Profile/Show.php +++ b/src/Module/Api/Friendica/Profile/Show.php @@ -48,7 +48,7 @@ class Show extends BaseApi $profile = self::formatProfile($profile, $profileFields); $profiles = []; - if ($this->parameters['extension'] ?? '' == 'xml') { + if (($this->parameters['extension'] ?? '') == 'xml') { $profiles['0:profile'] = $profile; } else { $profiles[] = $profile; diff --git a/src/Module/Api/GNUSocial/Help/Test.php b/src/Module/Api/GNUSocial/Help/Test.php index 44a31ba880..ecf99c78bf 100644 --- a/src/Module/Api/GNUSocial/Help/Test.php +++ b/src/Module/Api/GNUSocial/Help/Test.php @@ -31,7 +31,7 @@ class Test extends BaseApi { protected function rawContent(array $request = []) { - if ($this->parameters['extension'] ?? '' == 'xml') { + if (($this->parameters['extension'] ?? '') == 'xml') { $ok = 'true'; } else { $ok = 'ok'; diff --git a/src/Module/Api/Twitter/Account/RateLimitStatus.php b/src/Module/Api/Twitter/Account/RateLimitStatus.php index 60cee6ce34..c5f052b394 100644 --- a/src/Module/Api/Twitter/Account/RateLimitStatus.php +++ b/src/Module/Api/Twitter/Account/RateLimitStatus.php @@ -31,7 +31,7 @@ class RateLimitStatus extends BaseApi { protected function rawContent(array $request = []) { - if ($this->parameters['extension'] ?? '' == 'xml') { + if (($this->parameters['extension'] ?? '') == 'xml') { $hash = [ 'remaining-hits' => '150', '@attributes' => ["type" => "integer"], diff --git a/tests/src/Module/Api/GnuSocial/Help/TestTest.php b/tests/src/Module/Api/GnuSocial/Help/TestTest.php index 28e7ab5ea3..be0e187a63 100644 --- a/tests/src/Module/Api/GnuSocial/Help/TestTest.php +++ b/tests/src/Module/Api/GnuSocial/Help/TestTest.php @@ -51,6 +51,6 @@ class TestTest extends ApiTest 'Content-type' => ['text/xml'], ICanCreateResponses::X_HEADER => ['xml'] ], $response->getHeaders()); - self::assertxml($response->getBody(), 'true'); + self::assertxml($response->getBody(), 'ok'); } }