Simon Podlipsky
Simon Podlipsky
I had no idea it had any configuration. Right now I do this 🙃 ```php public function foo(Collection $collection) { $collection->add($this->bar); $collection->add($this->bar); if ($collection instanceof BOOM) { $collection->add($this->some) } return;...
I'd try asking panel developer. I don't know the panel and what is their logic.
@videni is it fixed or can you provide a test?
Got it, thanks. Found the actual mapping here https://github.com/overblog/dataloader-php/blob/master/src/DataLoader.php#L366 There is a property `key` on `$data`. Can be probably used for value lookup when result is indexed by that key.
IMO people should use packagist.org to search for a things like that.
There's similar attempt going on here https://github.com/reactphp/promise/pull/188. I think there's still a lot to be done on the SA side before we can do this.
@spawnia I missed the mention of a solution for default types, that was the main blocker IIRC. With conditional types it might work actually. (SA - static analysis)
@vhenzl I don't think the PR there is in working state right now, will have to give it some time.
@gsherwood with newer php versions trailing commas are more and more common thing. Also it confuses people because they don't really know why fixer failed on the file.