Fix DDC-1977 #425

Merged
merged 1 commit into from Aug 15, 2012

Conversation

Projects
None yet
3 participants

This pull request passes (merged ebe8ad9d into 185b4e0).

lib/Doctrine/ORM/Query/ParameterTypeInferer.php
return Connection::PARAM_INT_ARRAY;
}
return Connection::PARAM_STR_ARRAY;
-
- default:
@guilhermeblanco

guilhermeblanco Aug 15, 2012

Owner

I'd still keep the default.
Most reliable languages explode if they can't find an option in a case. PHP "smartly" ignores that and goes out of switch to the next statement.
Even though it's ok because the tool is written in PHP, it is too WTF for anyone reading our code.

@FabioBatSilva

FabioBatSilva Aug 15, 2012

Owner

@guilhermeblanco I see.

We can use return \PDO::PARAM_STR; as default instead a empty block ?

@guilhermeblanco

guilhermeblanco Aug 15, 2012

Owner

You can, for sure.

We don't pay too much attention at our coverage, but we were, code analyzers are stupid at this situation, telling that not all possibilities are returning a value and code coverage report will mark the close parenthesis as not tested.

I'm fine if you move the return. =)

Owner

guilhermeblanco commented Aug 15, 2012

Except my comment, I'm +1 on this

This pull request passes (merged ed7fd6a6 into 185b4e0).

Owner

FabioBatSilva commented Aug 15, 2012

@guilhermeblanco Please take a look on this new approach

This pull request passes (merged 641af15 into 185b4e0).

guilhermeblanco added a commit that referenced this pull request Aug 15, 2012

@guilhermeblanco guilhermeblanco merged commit ece6a00 into doctrine:master Aug 15, 2012

1 check passed

default The Travis build passed
Details

@FabioBatSilva FabioBatSilva deleted the FabioBatSilva:DDC-1977 branch Jan 18, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment