Apply StyleCi recommendation
This commit is contained in:
parent
c2a46b7af7
commit
34c64acb75
@ -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';
|
||||
|
@ -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;
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user