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

Fill is a static factory function it should be moved to Chain #48

Closed
nreynis opened this issue Dec 14, 2019 · 1 comment
Closed

Fill is a static factory function it should be moved to Chain #48

nreynis opened this issue Dec 14, 2019 · 1 comment

Comments

@nreynis
Copy link
Contributor

nreynis commented Dec 14, 2019

Fill is actually a Trait.
https://github.com/cocur/chain/blob/master/src/Link/Fill.php

This is the only Trait that don't operate on an instance and also the only one that is static.
Other Traits are all instance methods, this one is a factory.

This code should be moved to the Chain class which host other factory methods create and createFormString. This would be an entirely transparent change, it would make the code more consistent and would prevent statistical analysis failing:

https://scrutinizer-ci.com/g/cocur/chain/inspections/fba87ae0-dc03-4190-966a-64fd5f908b9b/issues/files/src/Link/Fill.php?status=all&orderField=path&order=asc&honorSelectedPaths=0

@florianeckerstorfer
Copy link
Member

Fixed in #49

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

No branches or pull requests

2 participants