Skip to content

Commit 602c499

Browse files
committed
Refactor translator instantiation in LaravelTranslator.php
1 parent d07ac8a commit 602c499

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/LaravelTranslator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static function translator(string $translator): Translator
4646
/**
4747
* @var class-string<Translators[T]> $instance
4848
*/
49-
$instance = str($translator)->ucfirst()->prepend('Ferdiunal\LaravelTranslator\Translators\\')->append('Translator')->toString();
49+
$instance = str($translator)->ucfirst()->prepend('\Ferdiunal\LaravelTranslator\Translators\\')->append('Translator')->toString();
5050
if (! class_exists($instance)) {
5151
throw new \Exception(sprintf('The translator %s does not exist.', $instance));
5252
}

tests/TestCase.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ protected function getPackageProviders($app)
2626

2727
public function getEnvironmentSetUp($app)
2828
{
29-
config()->set('database.default', 'testing');
3029

31-
/*
32-
$migration = include __DIR__.'/../database/migrations/create_laravel-translator_table.php.stub';
33-
$migration->up();
34-
*/
3530
}
3631
}

0 commit comments

Comments
 (0)