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

NativeFunctionInvocationFixer - use the NamespacesAnalyzer to remove duplicated code #3878

Merged
merged 1 commit into from Jul 6, 2018

Conversation

stof
Copy link
Contributor

@stof stof commented Jul 5, 2018

Instead of maintaining 2 different analyzers to find the beginning and the end of a namespace block, this reuses the existing NamespacesAnalyzer.

See #3877 which optimizes it based on existing optimization in the implementation I'm deleting here.

@keradus keradus changed the base branch from master to 2.12 July 6, 2018 09:27
@keradus keradus added this to the 2.12.2 milestone Jul 6, 2018
@keradus
Copy link
Member

keradus commented Jul 6, 2018

We do push code refactoring to oldest maintained branch, I have changed the target and recreated your branch @stof (force-push)

@keradus keradus changed the title Use the NamespacesAnalyzer in the NativeFunctionInvocationFixer NativeFunctionInvocationFixer - use the NamespacesAnalyzer to remove duplicated code Jul 6, 2018
@keradus
Copy link
Member

keradus commented Jul 6, 2018

Thank you @stof.

@keradus keradus merged commit b16c2f0 into PHP-CS-Fixer:2.12 Jul 6, 2018
keradus added a commit that referenced this pull request Jul 6, 2018
…r to remove duplicated code (stof)

This PR was merged into the 2.12 branch.

Discussion
----------

NativeFunctionInvocationFixer - use the NamespacesAnalyzer to remove duplicated code

Instead of maintaining 2 different analyzers to find the beginning and the end of a namespace block, this reuses the existing NamespacesAnalyzer.

See #3877 which optimizes it based on existing optimization in the implementation I'm deleting here.

Commits
-------

b16c2f0 Use the NamespacesAnalyzer in the NativeFunctionInvocationFixer
@stof stof deleted the reuse_namespace_analyzer branch July 6, 2018 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants