[HttpFoundation] Coding standards.

This commit is contained in:
Drak 2012-04-06 07:29:37 +00:00
parent bf33bd469d
commit aec133996e
2 changed files with 3 additions and 6 deletions

View File

@ -1019,13 +1019,13 @@ class Request
/** /**
* Checks if the request method is of specified type. * Checks if the request method is of specified type.
* *
* @param string $type Uppercase request type (GET, POST etc). * @param string $method Uppercase request method (GET, POST etc).
* *
* @return Boolean * @return Boolean
*/ */
public function isMethod($type) public function isMethod($method)
{ {
return ($this->getMethod() === strtoupper($type)); return $this->getMethod() === strtoupper($method);
} }
/** /**

View File

@ -935,9 +935,6 @@ class RequestTest extends \PHPUnit_Framework_TestCase
$request->setMethod('GET'); $request->setMethod('GET');
$this->assertTrue($request->isMethod('GET')); $this->assertTrue($request->isMethod('GET'));
$this->assertFalse($request->isMethod('POST')); $this->assertFalse($request->isMethod('POST'));
$this->assertSame(true, $request->isMethod('GET'));
$this->assertSame(false, $request->isMethod('POST'));
} }
private function startTrustingProxyData() private function startTrustingProxyData()