Skip to content

Commit b76bf39

Browse files
laravel-shiftStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent 68155c0 commit b76bf39

File tree

2 files changed

+23
-25
lines changed

2 files changed

+23
-25
lines changed

src/Blueprint.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ class Blueprint
1111
private $lexers = [];
1212
private $generators = [];
1313

14-
public static function relativeNamespace(string $fullyQualifiedClassName)
15-
{
16-
$newClassName = preg_replace(
17-
'!^'.preg_quote(config('blueprint.namespace')).'!',
18-
'',
19-
$fullyQualifiedClassName,
20-
1
21-
);
22-
23-
return ltrim($newClassName,'\\');
24-
}
14+
public static function relativeNamespace(string $fullyQualifiedClassName)
15+
{
16+
$newClassName = preg_replace(
17+
'!^'.preg_quote(config('blueprint.namespace')).'!',
18+
'',
19+
$fullyQualifiedClassName,
20+
1
21+
);
22+
23+
return ltrim($newClassName, '\\');
24+
}
2525

2626
public function parse($content)
2727
{

tests/Feature/BlueprintTest.php

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -276,25 +276,23 @@ public function generate_uses_registered_generators_and_returns_generated_files(
276276
], $this->subject->generate($tree));
277277
}
278278

279-
/**
280-
* @test
281-
*/
282-
public function relative_namespace_only_replace_first_occurrence_of_default_namespace()
283-
{
284-
$string = "App\Appointments";
285-
286-
$actual = Blueprint::relativeNamespace($string);
287-
288-
$this->assertEquals("Appointments", $actual);
279+
/**
280+
* @test
281+
*/
282+
public function relative_namespace_only_replace_first_occurrence_of_default_namespace()
283+
{
284+
$string = "App\Appointments";
289285

290-
config(['blueprint.namespace'=>'Foo']);
286+
$actual = Blueprint::relativeNamespace($string);
291287

292-
$string = "Foo\Appointments";
288+
$this->assertEquals("Appointments", $actual);
293289

294-
$actual = Blueprint::relativeNamespace($string);
290+
config(['blueprint.namespace'=>'Foo']);
295291

296-
$this->assertEquals("Appointments", $actual);
292+
$string = "Foo\Appointments";
297293

294+
$actual = Blueprint::relativeNamespace($string);
298295

296+
$this->assertEquals("Appointments", $actual);
299297
}
300298
}

0 commit comments

Comments
 (0)