Skip to content

Instantly share code, notes, and snippets.

@ezzatron
Created May 9, 2011 09:51
Show Gist options
  • Save ezzatron/962302 to your computer and use it in GitHub Desktop.
Save ezzatron/962302 to your computer and use it in GitHub Desktop.
Scisr clean-use
<?php
namespace Foo;
use Bar\Baz\Qux;
use Bar\Baz\Splat;
class Donk
{
public function foo(Qux $qux) {}
/** @returns Splat */
public function bar() {}
}
<?php
namespace Foo;
use Bar\Baz\Qux; // used in type hint
use Bar\Baz\Doom; // not used
use Bar\Baz\Splat; // used in DocBlock - utilised by some IDEs (NetBeans)
class Donk
{
public function foo(Qux $qux) {}
/** @returns Splat */
public function bar() {}
}
scisr clean-use [path] ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment