-
Notifications
You must be signed in to change notification settings - Fork 435
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
Provide option to run a single/list of tasks from the config #587
Conversation
src/Console/Command/RunCommand.php
Outdated
* @param string $value | ||
* @return string[] | ||
*/ | ||
protected function parseCommaSeparatedOption(string $value) |
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.
It is better to move this method to the \GrumPHP\Util\Str
class.
Maybe something like:
public static function explodeWithCleanup(string $delimiter, string $string): array
This way the logic can be tested in a normal way and it is reusable if we want to add more comma separated options?
Hi @paslandau. Thanks for your PR! Can you rebase against master? I will review it soon. |
55dadde
to
51bab84
Compare
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.
Code looks good. I've added 2 small remarks.
@@ -0,0 +1,63 @@ | |||
<?php |
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.
Add e2e tests instead; (this namespace is not in a testsuite)
src/Collection/TasksCollection.php
Outdated
public function filterByTaskNames(array $tasks): self | ||
{ | ||
if (empty($tasks)) { | ||
return new self($this->toArray()); |
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.
return $this;
? No need to create a new instance in that case right?
e76708e
to
e3fc41d
Compare
Fixes #580