orklah

Results 221 comments of orklah

It's not a risk if you're the one that added it in your code. The risk is having it in your code without realizing it. For example, if someone already...

Yeah, it would be cool to help migrate everything :)

Yeah totally, we should have used usleep from beggining

> It could be implemented for `strlen()` and `mb_strlen()` for strings too. Just checked, there is an inspection that suggest replacing strlen and mb_strlen to !== '' already, but yes,...

Well spotted. I suppose the !== '' is justified then

Yeah, that could be cleaner, but I don't think I like the syntax ```php if($strictly_an_array !== array()){ } ``` for older versions of PHP...

> > > Any expression inside `if` must be a boolean, let's not abuse PHP's type juggling. The only valid variants would be then: > > 1. `if (\count($someArray) >...

> `\is_array($array) && \count($array) === 0` In the example, it was given that the variable was an array so \is_array is redundant and breaks the whole purpose to simplify and...

To summarize, I think it's clear the clean way would be "=== []" or "\count() === 0". I agree, even if it was not my point. I wanted to simplify...

> I think that is very hard to predict that this class will never been extended by another class in some moment. Both by the own dev or by a...