diff --git a/README.md b/README.md index 67effc0..7e39075 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ With a checkout of the code get [Composer](http://getcomposer.org) in your PATH ```sh composer install ./vendor/bin/phpunit -./vendor/bin/phpcs --standard=./vendor/chadicus/coding-standard/Chadicus -n src +./vendor/bin/phpcs ``` ## Available Operations diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 0000000..9dca1f8 --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,7 @@ + + + . + */vendor/* + + + diff --git a/tests/RequestBridgeTest.php b/tests/RequestBridgeTest.php index 3afb16d..585616a 100644 --- a/tests/RequestBridgeTest.php +++ b/tests/RequestBridgeTest.php @@ -25,29 +25,12 @@ final class RequestBridgeTest extends \PHPUnit_Framework_TestCase public function toOAuth2() { $uri = 'https://example.com/foo/bar'; + $headers = ['Host' => ['example.com'], 'Accept' => ['application/json', 'text/json']]; + $cookies = ['PHPSESSID' => uniqid()]; + $server = ['SCRIPT_NAME' => __FILE__, 'SCRIPT_FILENAME' => __FILE__]; + $json = json_encode(['foo' => 'bar', 'abc' => '123']); - $headers = [ - 'Host' => ['example.com'], - 'Accept' => ['application/json', 'text/json'], - ]; - - $cookies = [ - 'PHPSESSID' => uniqid(), - ]; - - $server = [ - 'SCRIPT_NAME' => __FILE__, - 'SCRIPT_FILENAME' => __FILE__, - ]; - - $json = json_encode( - [ - 'foo' => 'bar', - 'abc' => '123', - ] - ); - - $stream = fopen('php://memory','r+'); + $stream = fopen('php://memory', 'r+'); fwrite($stream, $json); rewind($stream); @@ -104,7 +87,7 @@ public function toOAuth2JsonContentType() $data = ['foo' => 'bar', 'abc' => '123']; $json = json_encode($data); - $stream = fopen('php://memory','r+'); + $stream = fopen('php://memory', 'r+'); fwrite($stream, $json); rewind($stream);