Skip to content

Commit

Permalink
Not adding prefixes to names after use statements (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic authored Apr 14, 2021
1 parent 023b231 commit f7c991b
Show file tree
Hide file tree
Showing 77 changed files with 251 additions and 207 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Foo
{
}
use Humbug\Foo as X;
\Humbug\Foo::MAIN_CONST;
X::MAIN_CONST;

PHP
],
Expand Down Expand Up @@ -88,7 +88,7 @@ class X
namespace Humbug;
use Reflector as X;
\Reflector::MAIN_CONST;
X::MAIN_CONST;

PHP
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Command
{
}
use Humbug\Command;
\Humbug\Command::MAIN_CONST;
Command::MAIN_CONST;

PHP
],
Expand Down Expand Up @@ -84,7 +84,7 @@ class Command
namespace Humbug;
use Reflector;
\Reflector::MAIN_CONST;
Reflector::MAIN_CONST;

PHP
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Bar
namespace Humbug;
use Humbug\Foo as X;
\Humbug\Foo\Bar::MAIN_CONST;
X\Bar::MAIN_CONST;

PHP
],
Expand Down Expand Up @@ -87,7 +87,7 @@ class Bar
namespace Humbug;
use Humbug\Foo\Bar as X;
\Humbug\Foo\Bar::MAIN_CONST;
X::MAIN_CONST;

PHP
],
Expand Down Expand Up @@ -168,7 +168,7 @@ class Bar
namespace Humbug;
use Humbug\Foo as X;
\Humbug\Foo\Bar::MAIN_CONST;
X\Bar::MAIN_CONST;

PHP
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Bar
namespace Humbug;
use Humbug\Foo;
\Humbug\Foo\Bar::MAIN_CONST;
Foo\Bar::MAIN_CONST;

PHP
],
Expand Down Expand Up @@ -96,7 +96,7 @@ class X
namespace Humbug;
use Humbug\Foo\Bar;
\Humbug\Foo\Bar\X::MAIN_CONST;
Bar\X::MAIN_CONST;

PHP
],
Expand Down Expand Up @@ -177,7 +177,7 @@ class Bar
namespace Humbug;
use Humbug\Foo;
\Humbug\Foo\Bar::MAIN_CONST;
Foo\Bar::MAIN_CONST;

PHP
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Foo
namespace Humbug\A;
use Humbug\Foo as X;
\Humbug\Foo::MAIN_CONST;
X::MAIN_CONST;

PHP
],
Expand Down Expand Up @@ -102,7 +102,7 @@ class X
namespace Humbug\A;
use Reflector as X;
\Reflector::MAIN_CONST;
X::MAIN_CONST;

PHP
],
Expand Down
2 changes: 1 addition & 1 deletion specs/class-const/namespace-scope-single-level.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Command
namespace Humbug\X;
use Reflector;
\Reflector::MAIN_CONST;
Reflector::MAIN_CONST;

PHP
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Bar
namespace Humbug\A;
use Humbug\Foo as X;
\Humbug\Foo\Bar::MAIN_CONST;
X\Bar::MAIN_CONST;

PHP
],
Expand Down Expand Up @@ -87,7 +87,7 @@ class Bar
namespace Humbug\A;
use Humbug\Foo\Bar as X;
\Humbug\Foo\Bar::MAIN_CONST;
X::MAIN_CONST;

PHP
],
Expand Down Expand Up @@ -168,7 +168,7 @@ class Bar
namespace Humbug\A;
use Humbug\Foo as X;
\Humbug\Foo\Bar::MAIN_CONST;
X\Bar::MAIN_CONST;

PHP
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Bar
namespace Humbug\X;
use Humbug\Foo;
\Humbug\Foo\Bar::MAIN_CONST;
Foo\Bar::MAIN_CONST;

PHP
],
Expand Down Expand Up @@ -96,7 +96,7 @@ class X
namespace Humbug\X;
use Humbug\Foo\Bar;
\Humbug\Foo\Bar\X::MAIN_CONST;
Bar\X::MAIN_CONST;

PHP
],
Expand Down Expand Up @@ -177,7 +177,7 @@ class Bar
namespace Humbug\X;
use Humbug\Foo;
\Humbug\Foo\Bar::MAIN_CONST;
Foo\Bar::MAIN_CONST;

PHP
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Foo
namespace Humbug\X;
use Humbug\Foo;
\Humbug\Foo::MAIN_CONST;
Foo::MAIN_CONST;

PHP
],
Expand Down Expand Up @@ -98,7 +98,7 @@ class Command
namespace Humbug\X;
use Reflector;
\Reflector::MAIN_CONST;
Reflector::MAIN_CONST;

PHP
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Foo
{
}
use Humbug\Foo as X;
\Humbug\Foo::$mainStaticProp;
X::$mainStaticProp;

PHP
,
Expand Down Expand Up @@ -85,7 +85,7 @@ class X
namespace Humbug;
use Reflector as X;
\Reflector::$mainStaticProp;
X::$mainStaticProp;

PHP
,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Command
{
}
use Humbug\Command;
\Humbug\Command::$mainStaticProp;
Command::$mainStaticProp;

PHP
,
Expand Down Expand Up @@ -81,7 +81,7 @@ class Command
namespace Humbug;
use Reflector;
\Reflector::$mainStaticProp;
Reflector::$mainStaticProp;

PHP
,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Bar
namespace Humbug;
use Humbug\Foo as X;
\Humbug\Foo\Bar::$mainStaticProp;
X\Bar::$mainStaticProp;

PHP
,
Expand Down Expand Up @@ -85,7 +85,7 @@ class Bar
namespace Humbug;
use Humbug\Foo\Bar as X;
\Humbug\Foo\Bar::$mainStaticProp;
X::$mainStaticProp;

PHP
,
Expand Down Expand Up @@ -165,7 +165,7 @@ class Bar
namespace Humbug;
use Humbug\Foo as X;
\Humbug\Foo\Bar::$mainStaticProp;
X\Bar::$mainStaticProp;

PHP
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Bar
namespace Humbug;
use Humbug\Foo;
\Humbug\Foo\Bar::$mainStaticProp;
Foo\Bar::$mainStaticProp;

PHP
,
Expand Down Expand Up @@ -94,7 +94,7 @@ class X
namespace Humbug;
use Humbug\Foo\Bar;
\Humbug\Foo\Bar\X::$mainStaticProp;
Bar\X::$mainStaticProp;

PHP
,
Expand Down Expand Up @@ -174,7 +174,7 @@ class Bar
namespace Humbug;
use Humbug\Foo;
\Humbug\Foo\Bar::$mainStaticProp;
Foo\Bar::$mainStaticProp;

PHP
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Foo
namespace Humbug\A;
use Humbug\Foo as X;
\Humbug\Foo::$mainStaticProp;
X::$mainStaticProp;

PHP
,
Expand Down Expand Up @@ -99,7 +99,7 @@ class X
namespace Humbug\A;
use Reflector as X;
\Reflector::$mainStaticProp;
X::$mainStaticProp;

PHP
,
Expand Down
2 changes: 1 addition & 1 deletion specs/class-static-prop/namespace-scope-single-level.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Command
namespace Humbug\X;
use Reflector;
\Reflector::$mainStaticProp;
Reflector::$mainStaticProp;

PHP
,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Bar
namespace Humbug\A;
use Humbug\Foo as X;
\Humbug\Foo\Bar::$mainStaticProp;
X\Bar::$mainStaticProp;

PHP
,
Expand Down Expand Up @@ -85,7 +85,7 @@ class Bar
namespace Humbug\A;
use Humbug\Foo\Bar as X;
\Humbug\Foo\Bar::$mainStaticProp;
X::$mainStaticProp;

PHP
,
Expand Down Expand Up @@ -165,7 +165,7 @@ class Bar
namespace Humbug\A;
use Humbug\Foo as X;
\Humbug\Foo\Bar::$mainStaticProp;
X\Bar::$mainStaticProp;

PHP
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Bar
namespace Humbug\X;
use Humbug\Foo;
\Humbug\Foo\Bar::$mainStaticProp;
Foo\Bar::$mainStaticProp;

PHP
,
Expand Down Expand Up @@ -94,7 +94,7 @@ class X
namespace Humbug\X;
use Humbug\Foo\Bar;
\Humbug\Foo\Bar\X::$mainStaticProp;
Bar\X::$mainStaticProp;

PHP
,
Expand Down Expand Up @@ -174,7 +174,7 @@ class Bar
namespace Humbug\X;
use Humbug\Foo;
\Humbug\Foo\Bar::$mainStaticProp;
Foo\Bar::$mainStaticProp;

PHP
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Foo
namespace Humbug\X;
use Humbug\Foo;
\Humbug\Foo::$mainStaticProp;
Foo::$mainStaticProp;

PHP
,
Expand Down Expand Up @@ -95,7 +95,7 @@ class Command
namespace Humbug\X;
use Reflector;
\Reflector::$mainStaticProp;
Reflector::$mainStaticProp;

PHP
,
Expand Down
4 changes: 2 additions & 2 deletions specs/class/anonymous.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ public function test()
{
}
};
new class extends \Humbug\A implements \Humbug\Foo\B, \Humbug\Foo\C, \Iterator
new class extends A implements \Humbug\Foo\B, \Humbug\Foo\C, \Iterator
{
};
namespace Humbug\Bar;
Expand All @@ -459,7 +459,7 @@ public function test()
{
public $foo;
};
new class($a, $b) extends \Humbug\A
new class($a, $b) extends A
{
use T;
};
Expand Down
Loading

0 comments on commit f7c991b

Please sign in to comment.