Skip to content

Commit 1649677

Browse files
lrljoegithub-actions[bot]
authored andcommitted
Fix styling
1 parent 19dbaa2 commit 1649677

File tree

3 files changed

+16
-23
lines changed

3 files changed

+16
-23
lines changed

tests/Localisations/BaseLocalisationCase.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,27 @@
22

33
namespace Rappasoft\LaravelLivewireTables\Tests\Localisations;
44

5+
use PHPUnit\Framework\Attributes\DataProvider;
56
use Rappasoft\LaravelLivewireTables\Tests\Models\Pet;
67
use Rappasoft\LaravelLivewireTables\Tests\TestCase;
7-
use PHPUnit\Framework\Attributes\DataProvider;
88

99
class BaseLocalisationCase extends TestCase
1010
{
11-
1211
public static function getEnLocaleStrings(): array
1312
{
1413
$baseDir = __DIR__.'/../../resources/lang/';
1514

16-
$items = require($baseDir."en/core.php");
15+
$items = require $baseDir.'en/core.php';
16+
1717
return $items;
1818
}
1919

2020
public static function getLocaleStrings($locale): array
2121
{
2222
$baseDir = __DIR__.'/../../resources/lang/';
2323

24-
$items = require($baseDir.$locale."/core.php");
24+
$items = require $baseDir.$locale.'/core.php';
25+
2526
return $items;
2627
}
2728

@@ -58,15 +59,14 @@ public static function localisationProvider(): array
5859
];
5960
//return $availableLocales;
6061

61-
foreach ($availableLocales as $availableLocale)
62-
{
62+
foreach ($availableLocales as $availableLocale) {
6363
//$array = require($baseDir.$availableLocale.'/core.php');
6464
$localisations[] = [
65-
'locale' => $availableLocale,
66-
// 'localisationStrings' => $array,
65+
'locale' => $availableLocale,
66+
// 'localisationStrings' => $array,
6767
];
6868
}
69+
6970
return $localisations;
7071
}
71-
72-
}
72+
}

tests/Localisations/Presence/CheckKeyPresenceTest.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22

33
namespace Rappasoft\LaravelLivewireTables\Tests\Localisations\Presence;
44

5-
use Rappasoft\LaravelLivewireTables\Tests\Localisations\BaseLocalisationCase;
65
use PHPUnit\Framework\Attributes\DataProvider;
6+
use Rappasoft\LaravelLivewireTables\Tests\Localisations\BaseLocalisationCase;
77

88
final class CheckKeyPresenceTest extends BaseLocalisationCase
99
{
10-
1110
#[DataProvider('localisationProvider')]
1211
public function test_can_get_localised_empty_message(string $locale): void
1312
{
14-
$localisedStrings = static::getLocaleStrings($locale);
13+
$localisedStrings = self::getLocaleStrings($locale);
1514

1615
$localisedString = $localisedStrings['No items found, try to broaden your search'] ?? $locale;
1716
$this->basicTable->changeLocale($locale);
@@ -21,14 +20,10 @@ public function test_can_get_localised_empty_message(string $locale): void
2120
#[DataProvider('localisationProvider')]
2221
public function test_can_check_presence_of_keys(string $locale): void
2322
{
24-
$engStrings = static::getEnLocaleStrings();
25-
$localisedStrings = static::getLocaleStrings($locale);
26-
foreach ($engStrings as $key => $value)
27-
{
23+
$engStrings = self::getEnLocaleStrings();
24+
$localisedStrings = self::getLocaleStrings($locale);
25+
foreach ($engStrings as $key => $value) {
2826
$this->assertNotNull($localisedStrings[$key]);
2927
}
3028
}
31-
32-
33-
3429
}

tests/Localisations/Unit/Component/EmptyStringTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,16 @@
22

33
namespace Rappasoft\LaravelLivewireTables\Tests\Localisations\Unit\Component;
44

5-
use Rappasoft\LaravelLivewireTables\Tests\Localisations\BaseLocalisationCase;
65
use PHPUnit\Framework\Attributes\DataProvider;
6+
use Rappasoft\LaravelLivewireTables\Tests\Localisations\BaseLocalisationCase;
77

88
final class EmptyStringTest extends BaseLocalisationCase
99
{
10-
1110
#[DataProvider('localisationProvider')]
1211
public function test_can_get_localised_empty_message(string $locale): void
1312
{
1413
$localisedString = $localisationStrings['No items found, try to broaden your search'] ?? $locale;
1514
$this->basicTable->changeLocale($locale);
1615
$this->assertEquals($localisedString, $this->basicTable->getEmptyMessage());
1716
}
18-
1917
}

0 commit comments

Comments
 (0)