Apply StyleCi recommendation

This commit is contained in:
rugk 2019-01-22 00:12:02 +01:00
parent c2a46b7af7
commit 34c64acb75
No known key found for this signature in database
GPG Key ID: 05D40A636AFAB34D
3 changed files with 4 additions and 4 deletions

View File

@ -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';

View File

@ -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;

View File

@ -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');