Skip to content
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

Add finders #89

Merged
merged 3 commits into from
Aug 5, 2017
Merged

Add finders #89

merged 3 commits into from
Aug 5, 2017

Conversation

theofidry
Copy link
Member

Closes #84.

@theofidry
Copy link
Member Author

Not sure why Scrutinizer is failing, it might be easier to just upload the clover.xml rather than running their CI which I guess may require its own config.

I also don't have access to the Scrutinizer config but we should exclude fixtures from the inspection.

@theofidry theofidry requested a review from padraic July 20, 2017 23:00
@padraic
Copy link
Collaborator

padraic commented Jul 21, 2017

I've updated the Scrutinizer config.

@theofidry
Copy link
Member Author

theofidry commented Jul 21, 2017

I find the Symfony Finder exclude methods not very easy to use and unhelpful. For example:

$finder = (new Finder())
    ->files()
    ->in(__DIR__)
    ->exclude(__DIR__.__DIRECTORY_SEPARATOR__.'tests')
;

with:

bin/
    foo
src/
    Foz.php
    Bar.php
tests/
    FozTest.php
composer.json

will not exclude tests/FozTest.php. So I think I'll add a blacklist-finders entry as well

if (false === is_array($finders)) {
throw new InvalidArgumentException(
sprintf(
'Expected finders to be an array of callables, found "%s" instead.',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can leave the of callables part as it isn't asserted here.

@theofidry
Copy link
Member Author

ping @padraic

@theofidry theofidry merged commit f36c818 into humbug:master Aug 5, 2017
@theofidry theofidry deleted the feature/finders branch August 5, 2017 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants