Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

optimize-use: Duplicate imports #33

Open
tobyS opened this issue Sep 8, 2013 · 3 comments
Open

optimize-use: Duplicate imports #33

tobyS opened this issue Sep 8, 2013 · 3 comments

Comments

@tobyS
Copy link
Contributor

tobyS commented Sep 8, 2013

I usually reference \RuntimeException absolutely without importing it. The optimize-use attempts to fix this, but creates duplicate imports, e.g.:

--- a/test/features/bootstrap/FeatureContext.php
+++ b/test/features/bootstrap/FeatureContext.php
@@ -10,15 +10,26 @@
 use Qafoo\ChangeTrack\Analyzer;
 use Qafoo\ChangeTrack\Calculator;
 use Qafoo\ChangeTrack\Change;
+use FeatureContext;

+use RuntimeException;
 require __DIR__ . '/../../../vendor/autoload.php';
+use RuntimeException;

+use RuntimeException;
 //
+use RuntimeException;
 // Require 3rd-party libraries here:
+use RuntimeException;
 //
+use RuntimeException;
@pscheit
Copy link
Contributor

pscheit commented Sep 11, 2013

I would love to have a look at this - the other issue is related. But I have a lot of other stuff todo before this. So if it's not needed to be fixed asap, I'll do it :)

@beberlei
Copy link
Contributor

@pscheit no rush, we just tested this on a large code basis.

@pscheit
Copy link
Contributor

pscheit commented Oct 6, 2013

this depends on #32, I have another test for it and will send a PR then.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants