Skip to content

Conversation

@BertrandF23
Copy link
Contributor

@BertrandF23 BertrandF23 commented Oct 27, 2017

  • Explicit error message in the Mapper for keyExists function

const CONF_RECOVERABLE = 'recoverable';

const CONF_NO_RESULTS = 'noResults';
const CONF_NO_RESULTS = 'no_results';
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @BertrandF23 ,

This is potentially a breaking change on the framework for other user of the bundle.

I would recommend not to do it as part of this pull request.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, was split and put in another pull request :-).

*/
public function keyExists(array $obj, $key)
{
if (!is_string($key) and !is_integer($key)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@BertrandF23 we should add/update the tests for this change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tests are done for keyExists, testing true or false result, but also exceptions due to wrong type of parameters.

@BertrandF23 BertrandF23 changed the title Unify parameter and improve error message Improve error message Nov 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants