[Serializer] error handling inconsistencies fixed in the serializer decoders#9586
[Serializer] error handling inconsistencies fixed in the serializer decoders#9586rodrigodiez wants to merge 14 commits intosymfony:masterfrom rodrigodiez:ticket_9393
Conversation
rodrigodiez
commented
Nov 23, 2013
| Q | A |
|---|---|
| Bug fix? | no |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | yes |
| Tests pass? | yes |
| Fixed tickets | #9393 |
| License | MIT |
| Doc PR | none |
There was a problem hiding this comment.
Instead of using variable, you can use return:
if (!function_exists('json_last_error_msg')) {
switch (json_last_error()) {
default:
return 'Unknown error';
}
}
return json_last_error_msg();There was a problem hiding this comment.
Also, default should probably be the last case.
There was a problem hiding this comment.
As you call return, the break is redundant here.
There was a problem hiding this comment.
don't you need also here the use statement?
There was a problem hiding this comment.
Yep. Sorry guys, first code PR, still learning
There was a problem hiding this comment.
The deprecation message should not be the short description of the method. It should go with the @see tag (the first line of the phpdoc is special).
and you should remove the extra indentation space you added.
|
Seems ok to you guys? |
|
Ping |
|
Closing this one in favor of #9876 as you seem to have removed your Symfony fork. |