Skip to content

Commit 28e1113

Browse files
acasademontweaverryan
authored andcommitted
Use isMethod instead of a direct comparison
The code is neater if we use the dedicated method available in the Request class
1 parent b63750b commit 28e1113

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

book/forms.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ controller::
214214
->add('dueDate', 'date')
215215
->getForm();
216216

217-
if ($request->getMethod() == 'POST') {
217+
if ($request->isMethod('post')) {
218218
$form->bind($request);
219219

220220
if ($form->isValid()) {

0 commit comments

Comments
 (0)