-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API byIDs
added to ArrayList
#3828
Conversation
@silverstripe/core-team to be honest, I'm thinking that this function It's a function that is effectively a hard coded filter which doesn't add any real benefit over doing Having it as part of the code base increases code maintenance and doesn't really provide any special flexibility. |
It's probably ok, since filtering by ID (in |
@@ -746,7 +746,8 @@ public function testCanFilterByEmpty() { | |||
$this->assertFalse($list->canFilterBy('Age')); | |||
} | |||
|
|||
public function testByID() { | |||
public function testByID() | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super nitpicky mode
brace shouldn't be on a newline ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had setenv nitpickymode 0
, but yeah I saw that. :)
Welcome back @halkyon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHPStorm! Rage! Can I get away with saying.... PSR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't it you who added the .editorconfig files @dhensby ? :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately you can't dictate code style like this, it's more white space based. :(
The issue with travis is caused by travis-support generating the incorrect |
0a91fbe
to
a6aeb87
Compare
Ok, great. I've fixed that naughty curly brace going to the wrong line and I've also squashed the tests |
a6aeb87
to
ed68812
Compare
Ok, so I noticed that the I've also opened issue #3847 so we can have some clarity on what should be returned by the As I've now edited the interface, I think that either this needs to go against master OR I need to pull out the interface changes and add them to master. |
4d413c7
to
da6a752
Compare
As a compromise we could put all these changes into 3 (except the interface changes) and then put the interface changes into 4. Therefore we get a consistent API which is BC for 3.2 and then enforce the interface properly (non-BC) in 4? |
bump @silverstripe/core-team |
aeb49b9
to
ec897ce
Compare
f8e5625
to
d148804
Compare
As mentioned on #4557 I think there is a mistake in ArrayList::filterAny, and I think tests should be added for it. |
|
||
} | ||
|
||
protected function normaliseFilterArgs() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
phpdoc please.
feedback dealt with |
399dd07
to
a19b688
Compare
$itemsToKeep = array(); | ||
|
||
foreach ($this->items as $item) { | ||
$keepItem = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like you can remove this now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed, thanks :)
a19b688
to
f6fe142
Compare
Dealings-with with fed-back |
Hey @dhensby @tractorcow where are we at with this? |
We are at merged. |
yay, thanks |
Nice work @dhensby! |
Added
byIDs
for consistent API withDataList