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

it should not be possible to create a rule with an empty string as pattern #59

Open
jjanvier opened this issue Apr 10, 2020 · 0 comments
Labels

Comments

@jjanvier
Copy link
Contributor

the config

$builder->only([''])->in('Foo'),

the error

jjanvier:lambdas$ vendor/bin/php-coupling-detector detect --config-file=.phpcd                                                        ≠ ? {master}

Parsing 11 nodes...
Checking 3 rules...
PHP Warning:  strpos(): Empty needle in /home/jjanvier/workspaces/phpstorm/perso/c2p/lambdas/vendor/akeneo/php-coupling-detector/src/RuleChecker.php on line 122
PHP Stack trace:
PHP   1. {main}() /home/jjanvier/workspaces/phpstorm/perso/c2p/lambdas/vendor/akeneo/php-coupling-detector/bin/php-coupling-detector:0
PHP   2. Akeneo\CouplingDetector\Console\Application->run() /home/jjanvier/workspaces/phpstorm/perso/c2p/lambdas/vendor/akeneo/php-coupling-detector/bin/php-coupling-detector:18
PHP   3. Akeneo\CouplingDetector\Console\Application->doRun() /home/jjanvier/workspaces/phpstorm/perso/c2p/lambdas/vendor/symfony/console/Application.php:140
PHP   4. Akeneo\CouplingDetector\Console\Application->doRunCommand() /home/jjanvier/workspaces/phpstorm/perso/c2p/lambdas/vendor/symfony/console/Application.php:264
PHP   5. Akeneo\CouplingDetector\Console\Command\DetectCommand->run() /home/jjanvier/workspaces/phpstorm/perso/c2p/lambdas/vendor/symfony/console/Application.php:912
PHP   6. Akeneo\CouplingDetector\Console\Command\DetectCommand->execute() /home/jjanvier/workspaces/phpstorm/perso/c2p/lambdas/vendor/symfony/console/Command/Command.php:255
PHP   7. Akeneo\CouplingDetector\CouplingDetector->detect() /home/jjanvier/workspaces/phpstorm/perso/c2p/lambdas/vendor/akeneo/php-coupling-detector/src/Console/Command/DetectCommand.php:111
PHP   8. Akeneo\CouplingDetector\RuleChecker->check() /home/jjanvier/workspaces/phpstorm/perso/c2p/lambdas/vendor/akeneo/php-coupling-detector/src/CouplingDetector.php:78
PHP   9. Akeneo\CouplingDetector\RuleChecker->checkOnlyRule() /home/jjanvier/workspaces/phpstorm/perso/c2p/lambdas/vendor/akeneo/php-coupling-detector/src/RuleChecker.php:43
PHP  10. Akeneo\CouplingDetector\RuleChecker->doesTokenRespectOnlyRule() /home/jjanvier/workspaces/phpstorm/perso/c2p/lambdas/vendor/akeneo/php-coupling-detector/src/RuleChecker.php:102
PHP  11. strpos() /home/jjanvier/workspaces/phpstorm/perso/c2p/lambdas/vendor/akeneo/php-coupling-detector/src/RuleChecker.php:122

@jjanvier jjanvier added the bug label Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant