Skip to content

Commit 25ec5db

Browse files
authored
Format code (#6882)
1 parent 4815738 commit 25ec5db

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

src/LazyLoader/AbstractLazyProxyBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function addClassBoilerplate(string $proxyClassName, string $originalClas
5858
$this->originalClassName = $originalClassName;
5959
$this->builder = $this->factory->class(class_basename($proxyClassName))
6060
->addStmt(new ClassConst([new Const_('PROXY_TARGET', new String_($originalClassName))]))
61-
->addStmt($this->factory->useTrait('\\Hyperf\\Di\\LazyLoader\\LazyProxyTrait'))
61+
->addStmt($this->factory->useTrait('\Hyperf\Di\LazyLoader\LazyProxyTrait'))
6262
->setDocComment("/**
6363
* Be careful: This is a lazy proxy, not the real {$originalClassName} from container.
6464
*

tests/AstTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,11 +368,11 @@ public function getId() : int
368368

369369
$code = $ast->proxy(FooTrait::class);
370370
$this->assertSame($this->license . '
371-
namespace HyperfTest\\Di\\Stub\\Ast;
371+
namespace HyperfTest\Di\Stub\Ast;
372372
373373
trait FooTrait
374374
{
375-
use \\Hyperf\\Di\\Aop\\ProxyTrait;
375+
use \Hyperf\Di\Aop\ProxyTrait;
376376
public function getString() : string
377377
{
378378
$__function__ = __FUNCTION__;

tests/ClassLazyProxyBuilderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function fluent(bool $a, float $b = 1) : \foo\foo
8484
CODETEMPLATE;
8585

8686
$builder = new ClassLazyProxyBuilder();
87-
$builder->addClassBoilerplate('Lazy\\SomeClass', 'App\\SomeClass');
87+
$builder->addClassBoilerplate('Lazy\SomeClass', 'App\SomeClass');
8888
$builder->addClassRelationship();
8989
$parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7);
9090
$ast = $parser->parse($code);
@@ -104,6 +104,6 @@ public function fluent(bool $a, float $b = 1) : \foo\foo
104104
private function getStmt($ast)
105105
{
106106
$stmts = PhpParser::getInstance()->getAllMethodsFromStmts($ast);
107-
return [$stmts, 'foo\\foo'];
107+
return [$stmts, 'foo\foo'];
108108
}
109109
}

tests/InterfaceLazyProxyBuilderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function works(bool $a, float $b = 1) : int
7474
CODETEMPLATE;
7575

7676
$builder = new InterfaceLazyProxyBuilder();
77-
$builder->addClassBoilerplate('Lazy\\SomeClass', 'App\\SomeInterface');
77+
$builder->addClassBoilerplate('Lazy\SomeClass', 'App\SomeInterface');
7878
$builder->addClassRelationship();
7979
$parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7);
8080
$ast = $parser->parse($code);
@@ -94,6 +94,6 @@ public function works(bool $a, float $b = 1) : int
9494
private function getStmt($ast)
9595
{
9696
$stmts = PhpParser::getInstance()->getAllMethodsFromStmts($ast);
97-
return [$stmts, 'foo\\foo'];
97+
return [$stmts, 'foo\foo'];
9898
}
9999
}

tests/PublicMethodVisitorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,6 @@ public function fluent() : \foo\foo
131131
private function getStmt($ast)
132132
{
133133
$stmts = PhpParser::getInstance()->getAllMethodsFromStmts($ast);
134-
return [$stmts, 'foo\\foo'];
134+
return [$stmts, 'foo\foo'];
135135
}
136136
}

tests/Stub/LazyProxy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ class LazyProxy extends Proxied
1818
{
1919
use LazyProxyTrait;
2020

21-
public const PROXY_TARGET = 'HyperfTest\\Di\\Stub\\Proxied';
21+
public const PROXY_TARGET = 'HyperfTest\Di\Stub\Proxied';
2222
}

0 commit comments

Comments
 (0)