style: apply Laravel Pint formatting across codebase

Auto-formatted by Laravel Pint (default Laravel preset): string
concatenation spacing, anonymous class brace placement, constructor
body shorthand, import ordering, and assertion indentation.
This commit is contained in:
Thorsten Bus 2026-03-02 23:02:03 +01:00
parent 5b35afb31d
commit 04d271f96a
48 changed files with 173 additions and 174 deletions

View file

@ -18,6 +18,5 @@ public function __construct(
public int $processedPages = 0, public int $processedPages = 0,
public int $totalPages = 0, public int $totalPages = 0,
public array $convertedFiles = [], public array $convertedFiles = [],
) { ) {}
}
} }

View file

@ -27,7 +27,7 @@ public function importPro(Request $request): JsonResponse
} }
try { try {
$service = new ProImportService(); $service = new ProImportService;
$songs = $service->import($file); $songs = $service->import($file);
return response()->json([ return response()->json([
@ -53,7 +53,7 @@ public function downloadPro(Song $song): BinaryFileResponse
abort(422, 'Song hat keine Gruppen oder Slides zum Exportieren.'); abort(422, 'Song hat keine Gruppen oder Slides zum Exportieren.');
} }
$exportService = new ProExportService(); $exportService = new ProExportService;
$tempPath = $exportService->generateProFile($song); $tempPath = $exportService->generateProFile($song);
$filename = preg_replace('/[^a-zA-Z0-9äöüÄÖÜß\-_ ]/', '', $song->title).'.pro'; $filename = preg_replace('/[^a-zA-Z0-9äöüÄÖÜß\-_ ]/', '', $song->title).'.pro';

View file

@ -12,8 +12,7 @@ class ServiceSongController extends Controller
{ {
public function __construct( public function __construct(
private readonly SongMatchingService $songMatchingService, private readonly SongMatchingService $songMatchingService,
) { ) {}
}
/** /**
* Manuell einen Song aus der DB einem ServiceSong zuordnen. * Manuell einen Song aus der DB einem ServiceSong zuordnen.

View file

@ -13,8 +13,7 @@ class SongController extends Controller
{ {
public function __construct( public function __construct(
private readonly SongService $songService, private readonly SongService $songService,
) { ) {}
}
/** /**
* Alle Songs auflisten (paginiert, durchsuchbar). * Alle Songs auflisten (paginiert, durchsuchbar).

View file

@ -13,8 +13,7 @@ class TranslationController extends Controller
{ {
public function __construct( public function __construct(
private readonly TranslationService $translationService, private readonly TranslationService $translationService,
) { ) {}
}
public function page(Song $song): Response public function page(Song $song): Response
{ {

View file

@ -23,8 +23,7 @@ class ConvertPowerPointJob implements ShouldQueue
public function __construct( public function __construct(
public string $inputPath, public string $inputPath,
public string $jobId, public string $jobId,
) { ) {}
}
public function handle(FileConversionService $conversionService): void public function handle(FileConversionService $conversionService): void
{ {

View file

@ -15,8 +15,7 @@ public function __construct(
public string $songName, public string $songName,
public ?string $ccliId, public ?string $ccliId,
public mixed $service, public mixed $service,
) { ) {}
}
public function build() public function build()
{ {

View file

@ -2,11 +2,11 @@
namespace App\Models; namespace App\Models;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Casts\Attribute;
class Song extends Model class Song extends Model
{ {

View file

@ -11,6 +11,7 @@ class User extends Authenticatable
{ {
/** @use HasFactory<\Database\Factories\UserFactory> */ /** @use HasFactory<\Database\Factories\UserFactory> */
use HasFactory; use HasFactory;
use Notifiable; use Notifiable;
/** /**

View file

@ -2,9 +2,9 @@
namespace App\Providers; namespace App\Providers;
use App\Socialite\ChurchToolsProvider;
use Illuminate\Support\Facades\Vite; use Illuminate\Support\Facades\Vite;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use App\Socialite\ChurchToolsProvider;
use Laravel\Socialite\Facades\Socialite; use Laravel\Socialite\Facades\Socialite;
class AppServiceProvider extends ServiceProvider class AppServiceProvider extends ServiceProvider

View file

@ -3,11 +3,11 @@
namespace App\Services; namespace App\Services;
use App\Models\ApiRequestLog; use App\Models\ApiRequestLog;
use Closure;
use CTApi\CTConfig; use CTApi\CTConfig;
use CTApi\Models\Events\Event\EventAgendaRequest; use CTApi\Models\Events\Event\EventAgendaRequest;
use CTApi\Models\Events\Event\EventRequest; use CTApi\Models\Events\Event\EventRequest;
use CTApi\Models\Events\Song\SongRequest; use CTApi\Models\Events\Song\SongRequest;
use Closure;
use Illuminate\Support\Carbon; use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
@ -24,8 +24,7 @@ public function __construct(
private readonly ?Closure $songFetcher = null, private readonly ?Closure $songFetcher = null,
private readonly ?Closure $agendaFetcher = null, private readonly ?Closure $agendaFetcher = null,
private readonly ?Closure $eventServiceFetcher = null, private readonly ?Closure $eventServiceFetcher = null,
) { ) {}
}
public function sync(): array public function sync(): array
{ {

View file

@ -85,7 +85,7 @@ public function processZip(UploadedFile|string|SplFileInfo $file): array
$this->assertSize($file, $sourcePath); $this->assertSize($file, $sourcePath);
$zip = new ZipArchive(); $zip = new ZipArchive;
if ($zip->open($sourcePath) !== true) { if ($zip->open($sourcePath) !== true) {
throw new InvalidArgumentException('ZIP-Datei konnte nicht geoeffnet werden.'); throw new InvalidArgumentException('ZIP-Datei konnte nicht geoeffnet werden.');
} }
@ -121,11 +121,13 @@ public function processZip(UploadedFile|string|SplFileInfo $file): array
if (in_array($entryExtension, self::IMAGE_EXTENSIONS, true)) { if (in_array($entryExtension, self::IMAGE_EXTENSIONS, true)) {
$results[] = $this->convertImage($entryPath); $results[] = $this->convertImage($entryPath);
continue; continue;
} }
if (in_array($entryExtension, self::POWERPOINT_EXTENSIONS, true)) { if (in_array($entryExtension, self::POWERPOINT_EXTENSIONS, true)) {
$results[] = ['job_id' => $this->convertPowerPoint($entryPath)]; $results[] = ['job_id' => $this->convertPowerPoint($entryPath)];
continue; continue;
} }
@ -240,6 +242,7 @@ private function deleteDirectory(string $directory): void
if ($item->isDir()) { if ($item->isDir()) {
@rmdir($item->getPathname()); @rmdir($item->getPathname());
continue; continue;
} }
@ -265,6 +268,6 @@ private function createImageManager(): mixed
$managerClass = implode('\\', ['Intervention', 'Image', 'ImageManager']); $managerClass = implode('\\', ['Intervention', 'Image', 'ImageManager']);
$driverClass = implode('\\', ['Intervention', 'Image', 'Drivers', 'Gd', 'Driver']); $driverClass = implode('\\', ['Intervention', 'Image', 'Drivers', 'Gd', 'Driver']);
return new $managerClass(new $driverClass()); return new $managerClass(new $driverClass);
} }
} }

View file

@ -6,7 +6,6 @@
use App\Models\SongArrangement; use App\Models\SongArrangement;
use App\Models\SongArrangementGroup; use App\Models\SongArrangementGroup;
use App\Models\SongGroup; use App\Models\SongGroup;
use App\Models\SongSlide;
use Illuminate\Http\UploadedFile; use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use ProPresenter\Parser\ProFileReader; use ProPresenter\Parser\ProFileReader;
@ -34,7 +33,7 @@ public function import(UploadedFile $file): array
/** @return Song[] */ /** @return Song[] */
private function importZip(UploadedFile $file): array private function importZip(UploadedFile $file): array
{ {
$zip = new ZipArchive(); $zip = new ZipArchive;
if ($zip->open($file->getRealPath()) !== true) { if ($zip->open($file->getRealPath()) !== true) {
throw new \RuntimeException('ZIP-Datei konnte nicht geöffnet werden.'); throw new \RuntimeException('ZIP-Datei konnte nicht geöffnet werden.');

View file

@ -51,7 +51,7 @@ protected function getUserByToken($token): array
protected function mapUserToObject(array $user): User protected function mapUserToObject(array $user): User
{ {
return (new User())->setRaw($user)->map([ return (new User)->setRaw($user)->map([
'id' => $user['id'] ?? null, 'id' => $user['id'] ?? null,
'name' => $user['displayName'] ?? trim(($user['firstName'] ?? '').' '.($user['lastName'] ?? '')), 'name' => $user['displayName'] ?? trim(($user['firstName'] ?? '').' '.($user['lastName'] ?? '')),
'email' => $user['email'] ?? null, 'email' => $user['email'] ?? null,

View file

@ -1,9 +1,9 @@
<?php <?php
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Application; use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions; use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware; use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Console\Scheduling\Schedule;
return Application::configure(basePath: dirname(__DIR__)) return Application::configure(basePath: dirname(__DIR__))
->withRouting( ->withRouting(

View file

@ -4,7 +4,8 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class () extends Migration { return new class extends Migration
{
public function up(): void public function up(): void
{ {
Schema::table('users', function (Blueprint $table) { Schema::table('users', function (Blueprint $table) {

View file

@ -4,7 +4,8 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class () extends Migration { return new class extends Migration
{
public function up(): void public function up(): void
{ {
Schema::create('services', function (Blueprint $table) { Schema::create('services', function (Blueprint $table) {

View file

@ -4,7 +4,8 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class () extends Migration { return new class extends Migration
{
public function up(): void public function up(): void
{ {
Schema::create('songs', function (Blueprint $table) { Schema::create('songs', function (Blueprint $table) {

View file

@ -4,7 +4,8 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class () extends Migration { return new class extends Migration
{
public function up(): void public function up(): void
{ {
Schema::create('song_groups', function (Blueprint $table) { Schema::create('song_groups', function (Blueprint $table) {

View file

@ -4,7 +4,8 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class () extends Migration { return new class extends Migration
{
public function up(): void public function up(): void
{ {
Schema::create('song_slides', function (Blueprint $table) { Schema::create('song_slides', function (Blueprint $table) {

View file

@ -4,7 +4,8 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class () extends Migration { return new class extends Migration
{
public function up(): void public function up(): void
{ {
Schema::create('song_arrangements', function (Blueprint $table) { Schema::create('song_arrangements', function (Blueprint $table) {

View file

@ -4,7 +4,8 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class () extends Migration { return new class extends Migration
{
public function up(): void public function up(): void
{ {
Schema::create('song_arrangement_groups', function (Blueprint $table) { Schema::create('song_arrangement_groups', function (Blueprint $table) {

View file

@ -4,7 +4,8 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class () extends Migration { return new class extends Migration
{
public function up(): void public function up(): void
{ {
Schema::create('service_songs', function (Blueprint $table) { Schema::create('service_songs', function (Blueprint $table) {

View file

@ -4,7 +4,8 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class () extends Migration { return new class extends Migration
{
public function up(): void public function up(): void
{ {
Schema::create('slides', function (Blueprint $table) { Schema::create('slides', function (Blueprint $table) {

View file

@ -4,7 +4,8 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class () extends Migration { return new class extends Migration
{
public function up(): void public function up(): void
{ {
Schema::create('cts_sync_log', function (Blueprint $table) { Schema::create('cts_sync_log', function (Blueprint $table) {

View file

@ -4,7 +4,8 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class () extends Migration { return new class extends Migration
{
public function up(): void public function up(): void
{ {
Schema::create('api_request_logs', function (Blueprint $table) { Schema::create('api_request_logs', function (Blueprint $table) {

View file

@ -4,7 +4,8 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class () extends Migration { return new class extends Migration
{
/** /**
* Run the migrations. * Run the migrations.
*/ */

View file

@ -4,7 +4,8 @@
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class () extends Migration { return new class extends Migration
{
public function up(): void public function up(): void
{ {
Schema::table('songs', function (Blueprint $table) { Schema::table('songs', function (Blueprint $table) {

View file

@ -19,7 +19,6 @@
Route::middleware('auth:sanctum')->group(function () { Route::middleware('auth:sanctum')->group(function () {
Route::apiResource('songs', SongController::class)->names('api.songs'); Route::apiResource('songs', SongController::class)->names('api.songs');
Route::post('/service-songs/{serviceSongId}/assign', [ServiceSongController::class, 'assignSong']) Route::post('/service-songs/{serviceSongId}/assign', [ServiceSongController::class, 'assignSong'])
->name('api.service-songs.assign'); ->name('api.service-songs.assign');

View file

@ -1,11 +1,11 @@
<?php <?php
use App\Services\ChurchToolsService; use App\Services\ChurchToolsService;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Carbon; use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
beforeEach(function () { beforeEach(function () {
ensureSyncTables(); ensureSyncTables();
@ -132,8 +132,7 @@ public function __construct(
private readonly string $startDate, private readonly string $startDate,
private readonly ?string $note = null, private readonly ?string $note = null,
private readonly array $eventServices = [], private readonly array $eventServices = [],
) { ) {}
}
public function getId(): string public function getId(): string
{ {
@ -166,8 +165,7 @@ final class FakeEventService
public function __construct( public function __construct(
private readonly string $name, private readonly string $name,
private readonly ?FakePerson $person, private readonly ?FakePerson $person,
) { ) {}
}
public function getName(): string public function getName(): string
{ {
@ -185,8 +183,7 @@ final class FakePerson
public function __construct( public function __construct(
private readonly string $firstName, private readonly string $firstName,
private readonly string $lastName, private readonly string $lastName,
) { ) {}
}
public function getFirstName(): string public function getFirstName(): string
{ {
@ -201,9 +198,7 @@ public function getLastName(): string
final class FakeAgenda final class FakeAgenda
{ {
public function __construct(private readonly array $songs) public function __construct(private readonly array $songs) {}
{
}
public function getSongs(): array public function getSongs(): array
{ {
@ -217,8 +212,7 @@ public function __construct(
private readonly int $id, private readonly int $id,
private readonly string $title, private readonly string $title,
private readonly ?string $ccli, private readonly ?string $ccli,
) { ) {}
}
public function getId(): string public function getId(): string
{ {

View file

@ -34,7 +34,7 @@
'type' => 'text', 'type' => 'text',
'cclid' => '7115744', 'cclid' => '7115744',
'lyricParts' => [ 'lyricParts' => [
['key' => 'v1', 'text' => "Du bist hier"], ['key' => 'v1', 'text' => 'Du bist hier'],
], ],
], ],
], ],

View file

@ -3,7 +3,6 @@
namespace Tests\Feature; namespace Tests\Feature;
use App\Mail\MissingSongRequest; use App\Mail\MissingSongRequest;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
use Tests\TestCase; use Tests\TestCase;
@ -28,7 +27,7 @@ public function test_missing_song_request_mailable_renders_with_german_content()
$serviceDate = '2026-03-08'; $serviceDate = '2026-03-08';
// Create a mock service object // Create a mock service object
$service = new \stdClass(); $service = new \stdClass;
$service->id = $serviceId; $service->id = $serviceId;
$service->title = $serviceTitle; $service->title = $serviceTitle;
$service->date = $serviceDate; $service->date = $serviceDate;
@ -55,7 +54,7 @@ public function test_missing_song_request_mailable_has_correct_subject(): void
$songName = 'Großer Gott'; $songName = 'Großer Gott';
$ccliId = '12345678'; $ccliId = '12345678';
$service = new \stdClass(); $service = new \stdClass;
$service->id = 1; $service->id = 1;
$service->title = 'Sonntagsgottesdienst'; $service->title = 'Sonntagsgottesdienst';
$service->date = '2026-03-08'; $service->date = '2026-03-08';

View file

@ -50,7 +50,7 @@
}); });
it('creates a new user from OAuth callback', function () { it('creates a new user from OAuth callback', function () {
$socialiteUser = new SocialiteUser(); $socialiteUser = new SocialiteUser;
$socialiteUser->map([ $socialiteUser->map([
'id' => '42', 'id' => '42',
'name' => 'Max Mustermann', 'name' => 'Max Mustermann',
@ -104,7 +104,7 @@
'churchtools_id' => 42, 'churchtools_id' => 42,
]); ]);
$socialiteUser = new SocialiteUser(); $socialiteUser = new SocialiteUser;
$socialiteUser->map([ $socialiteUser->map([
'id' => '42', 'id' => '42',
'name' => 'Max Mustermann', 'name' => 'Max Mustermann',

View file

@ -12,7 +12,7 @@ final class ProFileImportTest extends TestCase
{ {
use RefreshDatabase; use RefreshDatabase;
private function testProFile(): UploadedFile private function test_pro_file(): UploadedFile
{ {
$sourcePath = base_path('../propresenter-work/ref/Test.pro'); $sourcePath = base_path('../propresenter-work/ref/Test.pro');
@ -24,7 +24,7 @@ public function test_import_pro_datei_erstellt_song_mit_gruppen_und_slides(): vo
$user = User::factory()->create(); $user = User::factory()->create();
$response = $this->actingAs($user)->postJson(route('api.songs.import-pro'), [ $response = $this->actingAs($user)->postJson(route('api.songs.import-pro'), [
'file' => $this->testProFile(), 'file' => $this->test_pro_file(),
]); ]);
$response->assertOk(); $response->assertOk();
@ -43,13 +43,13 @@ public function test_import_pro_ohne_ccli_erstellt_neuen_song(): void
$user = User::factory()->create(); $user = User::factory()->create();
$this->actingAs($user)->postJson(route('api.songs.import-pro'), [ $this->actingAs($user)->postJson(route('api.songs.import-pro'), [
'file' => $this->testProFile(), 'file' => $this->test_pro_file(),
]); ]);
$this->assertSame(1, Song::count()); $this->assertSame(1, Song::count());
$this->actingAs($user)->postJson(route('api.songs.import-pro'), [ $this->actingAs($user)->postJson(route('api.songs.import-pro'), [
'file' => $this->testProFile(), 'file' => $this->test_pro_file(),
]); ]);
$this->assertSame(2, Song::count()); $this->assertSame(2, Song::count());
@ -71,7 +71,7 @@ public function test_import_pro_upsert_mit_ccli_dupliziert_nicht(): void
$this->assertSame(1, Song::count()); $this->assertSame(1, Song::count());
$response = $this->actingAs($user)->postJson(route('api.songs.import-pro'), [ $response = $this->actingAs($user)->postJson(route('api.songs.import-pro'), [
'file' => $this->testProFile(), 'file' => $this->test_pro_file(),
]); ]);
$response->assertOk(); $response->assertOk();
@ -94,7 +94,7 @@ public function test_import_pro_lehnt_ungueltige_datei_ab(): void
public function test_import_pro_erfordert_authentifizierung(): void public function test_import_pro_erfordert_authentifizierung(): void
{ {
$response = $this->postJson(route('api.songs.import-pro'), [ $response = $this->postJson(route('api.songs.import-pro'), [
'file' => $this->testProFile(), 'file' => $this->test_pro_file(),
]); ]);
$response->assertUnauthorized(); $response->assertUnauthorized();
@ -105,7 +105,7 @@ public function test_import_pro_erstellt_arrangement_gruppen(): void
$user = User::factory()->create(); $user = User::factory()->create();
$this->actingAs($user)->postJson(route('api.songs.import-pro'), [ $this->actingAs($user)->postJson(route('api.songs.import-pro'), [
'file' => $this->testProFile(), 'file' => $this->test_pro_file(),
]); ]);
$song = Song::where('title', 'Test')->first(); $song = Song::where('title', 'Test')->first();

View file

@ -149,7 +149,7 @@
// Build zip // Build zip
$zipPath = $tempDir.'/slides.zip'; $zipPath = $tempDir.'/slides.zip';
$zip = new ZipArchive(); $zip = new ZipArchive;
$zip->open($zipPath, ZipArchive::CREATE); $zip->open($zipPath, ZipArchive::CREATE);
$zip->addFile($imgPath, 'slide1.png'); $zip->addFile($imgPath, 'slide1.png');
$zip->close(); $zip->close();

View file

@ -1,7 +1,6 @@
<?php <?php
use App\Mail\MissingSongRequest; use App\Mail\MissingSongRequest;
use App\Models\Service;
use App\Models\ServiceSong; use App\Models\ServiceSong;
use App\Models\Song; use App\Models\Song;
use App\Models\SongArrangement; use App\Models\SongArrangement;

View file

@ -1,9 +1,8 @@
<?php <?php
use App\Services\ChurchToolsService; use App\Services\ChurchToolsService;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
beforeEach(function () { beforeEach(function () {
ensureSyncControllerTables(); ensureSyncControllerTables();

View file

@ -196,10 +196,10 @@
SongSlide::factory()->create([ SongSlide::factory()->create([
'song_group_id' => $group->id, 'song_group_id' => $group->id,
'order' => 1, 'order' => 1,
'text_content' => "Line 1", 'text_content' => 'Line 1',
]); ]);
$this->service->importTranslation($song, "Zeile 1"); $this->service->importTranslation($song, 'Zeile 1');
$song->refresh(); $song->refresh();
expect($song->has_translation)->toBeTrue(); expect($song->has_translation)->toBeTrue();
@ -229,15 +229,15 @@
$slide1 = SongSlide::factory()->create([ $slide1 = SongSlide::factory()->create([
'song_group_id' => $group->id, 'song_group_id' => $group->id,
'order' => 1, 'order' => 1,
'text_content' => "Original", 'text_content' => 'Original',
'text_content_translated' => "Übersetzt", 'text_content_translated' => 'Übersetzt',
]); ]);
$slide2 = SongSlide::factory()->create([ $slide2 = SongSlide::factory()->create([
'song_group_id' => $group->id, 'song_group_id' => $group->id,
'order' => 2, 'order' => 2,
'text_content' => "Original 2", 'text_content' => 'Original 2',
'text_content_translated' => "Übersetzt 2", 'text_content_translated' => 'Übersetzt 2',
]); ]);
$this->service->removeTranslation($song); $this->service->removeTranslation($song);
@ -350,8 +350,8 @@
SongSlide::factory()->create([ SongSlide::factory()->create([
'song_group_id' => $group->id, 'song_group_id' => $group->id,
'order' => 1, 'order' => 1,
'text_content' => "Original", 'text_content' => 'Original',
'text_content_translated' => "Übersetzt", 'text_content_translated' => 'Übersetzt',
]); ]);
$response = $this->actingAs($this->user) $response = $this->actingAs($this->user)