diff --git a/lib/Request.php b/lib/Request.php index 5f25e7f..48472bc 100644 --- a/lib/Request.php +++ b/lib/Request.php @@ -85,9 +85,9 @@ class Request foreach ($_GET as $key => $value) { // only return if value is empty and key matches RegEx - if (($value === "") and preg_match($pasteIdRegEx, $key, $match)) { + if (($value === '') and preg_match($pasteIdRegEx, $key, $match)) { return $match[0]; - }; + } } return 'invalid id'; diff --git a/tst/ControllerTest.php b/tst/ControllerTest.php index 6c6f575..88d5301 100644 --- a/tst/ControllerTest.php +++ b/tst/ControllerTest.php @@ -680,7 +680,7 @@ class ControllerTest extends PHPUnit_Framework_TestCase public function testReadInvalidId() { $_SERVER['QUERY_STRING'] = 'foo'; - $_GET["foo"] = ''; + $_GET['foo'] = ''; $_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest'; ob_start(); new Controller; diff --git a/tst/RequestTest.php b/tst/RequestTest.php index b23104f..e5567d6 100644 --- a/tst/RequestTest.php +++ b/tst/RequestTest.php @@ -135,7 +135,7 @@ class RequestTest extends PHPUnit_Framework_TestCase $_SERVER['REQUEST_METHOD'] = 'POST'; $_SERVER['HTTP_X_REQUESTED_WITH'] = 'JSONHttpRequest'; $_SERVER['QUERY_STRING'] = $id; - $_GET = [$id => '']; + $_GET = array($id => ''); $_POST['deletetoken'] = 'bar'; $request = new Request; $this->assertTrue($request->isJsonApiCall(), 'is JSON Api call');