From 290c4fdd0dba36d90e464257344901754bcb6679 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Sat, 22 Jul 2023 19:20:33 +0000 Subject: [PATCH] Apply fixes from StyleCI --- examples/post_form.php | 10 +++++----- tests/Httpful/ClientTest.php | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/post_form.php b/examples/post_form.php index 9a192f8..22d3c8d 100644 --- a/examples/post_form.php +++ b/examples/post_form.php @@ -19,11 +19,11 @@ $response = (new \Httpful\Client())->sendRequest( $http->createRequest( - \Httpful\Http::POST, - 'https://postman-echo.com/post', - \Httpful\Mime::FORM, - $query -) + \Httpful\Http::POST, + 'https://postman-echo.com/post', + \Httpful\Mime::FORM, + $query + ) ); $result = $response->getRawBody(); echo $result['form']['foo1'] . "\n"; // response from postman diff --git a/tests/Httpful/ClientTest.php b/tests/Httpful/ClientTest.php index 6d9f1a9..14b9954 100644 --- a/tests/Httpful/ClientTest.php +++ b/tests/Httpful/ClientTest.php @@ -161,7 +161,7 @@ public function testBasicAuthRequest() ->withBasicAuth('postman', 'password') ); - static::assertSame('{"authenticated":true}', str_replace(["\n", ' '], '',(string) $response)); + static::assertSame('{"authenticated":true}', str_replace(["\n", ' '], '', (string) $response)); } public function testDigestAuthRequest() @@ -172,7 +172,7 @@ public function testDigestAuthRequest() ->withDigestAuth('postman', 'password') ); - static::assertSame('{"authenticated":true}', str_replace(["\n", ' '], '',(string) $response)); + static::assertSame('{"authenticated":true}', str_replace(["\n", ' '], '', (string) $response)); } public function testSendJsonRequest() @@ -211,9 +211,9 @@ public function testPutCall() $response = Client::put('https://postman-echo.com/put', 'lall'); if (\method_exists(__CLASS__, 'assertStringContainsString')) { - static::assertStringContainsString('"data":"lall"', str_replace(["\n", ' '], '',(string) $response)); + static::assertStringContainsString('"data":"lall"', str_replace(["\n", ' '], '', (string) $response)); } else { - static::assertContains('"data":"lall"', str_replace(["\n", ' '], '',(string) $response)); + static::assertContains('"data":"lall"', str_replace(["\n", ' '], '', (string) $response)); } } @@ -222,9 +222,9 @@ public function testPatchCall() $response = Client::patch('https://postman-echo.com/patch', 'lall'); if (\method_exists(__CLASS__, 'assertStringContainsString')) { - static::assertStringContainsString('"data":"lall"', str_replace(["\n", ' '], '',(string) $response)); + static::assertStringContainsString('"data":"lall"', str_replace(["\n", ' '], '', (string) $response)); } else { - static::assertContains('"data":"lall"', str_replace(["\n", ' '], '',(string) $response)); + static::assertContains('"data":"lall"', str_replace(["\n", ' '], '', (string) $response)); } }