symfony/symfony — pull request #11670 by stloyd (2014-08-14 09:30:06+00:00)
Title: [DX][HttpFoundation] Allow to check multiple methods at once

| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT

This code allows to replace calls like:
```php
if (in_array($request->getMethod(), array('POST', 'PUT', 'PATCH'))) {
// do something
}
```
With:
```php
if ($request->isMethod(array('POST', 'PUT', 'PATCH'))) {
// do something
}