8000 [Form] Add phpdoc to `RequestHandlerInterface::isFileUpload()` method by issei-m · Pull Request #25040 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] Add phpdoc to RequestHandlerInterface::isFileUpload() method #25040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[Form] Add phpdoc to RequestHandlerInterface::isFileUpload() method
  • Loading branch information
issei-m committed Nov 20, 2017
commit 9a3f3f295bd836e2acc4efdf4240c9dc687df6b9
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ public function handleRequest(FormInterface $form, $request = null)
$form->submit($data, 'PATCH' !== $method);
}

/**
* {@inheritdoc}
*/
public function isFileUpload($data)
{
return $data instanceof File;
Expand Down
3 changes: 3 additions & 0 deletions src/Symfony/Component/Form/NativeRequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ public function handleRequest(FormInterface $form, $request = null)
$form->submit($data, 'PATCH' !== $method);
}

/**
* {@inheritdoc}
*/
public function isFileUpload($data)
{
// POST data will always be strings or arrays of strings. Thus, we can be sure
Expand Down
4 changes: 3 additions & 1 deletion src/Symfony/Component/Form/RequestHandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ interface RequestHandlerInterface
public function handleRequest(FormInterface $form, $request = null);

/**
* @param mixed $data
* Returns true if the given data is used to upload the file.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returns true if the given data is a file upload?

*
* @param mixed $data the form field data
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uppercase "T" [The...]

*
* @return bool
*/
Expand Down
0