Skip to content

Commit 87875f0

Browse files
tabunagithub-actions[bot]
authored andcommitted
Fixed code style
1 parent 3964b41 commit 87875f0

File tree

5 files changed

+18
-22
lines changed

5 files changed

+18
-22
lines changed

database/migrations/2024_12_08_212535_create_secret_santa_participants_table.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
use Illuminate\Database\Schema\Blueprint;
55
use Illuminate\Support\Facades\Schema;
66

7-
return new class extends Migration {
7+
return new class extends Migration
8+
{
89
/**
910
* Run the migrations.
1011
*/

resources/css/app.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ $utilities: (
108108
@import 'post';
109109
@import 'gagarin';
110110
@import 'slider';
111-
@import "santa";
111+
@import 'santa';
112112

113113
.avatar {
114114
border-radius: 10em;

resources/js/controllers/santa_controller.js

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import {Controller} from "@hotwired/stimulus";
1+
import { Controller } from '@hotwired/stimulus';
22

33
export default class extends Controller {
4-
54
connect() {
65
this.startSnowfall();
76
}
@@ -37,12 +36,12 @@ export default class extends Controller {
3736
startSnowfall() {
3837
const snowflakeCount = this.getSnowflakeCount();
3938
const svgUrls = [
40-
"/img/ui/santa/snowflake-2.svg",
41-
"/img/ui/santa/snowflake-3.svg",
42-
"/img/ui/santa/snowflake-4.svg",
43-
"/img/ui/santa/snowflake-5.svg",
44-
"/img/ui/santa/snowflake-6.svg",
45-
"/img/ui/santa/snowflake-7.svg",
39+
'/img/ui/santa/snowflake-2.svg',
40+
'/img/ui/santa/snowflake-3.svg',
41+
'/img/ui/santa/snowflake-4.svg',
42+
'/img/ui/santa/snowflake-5.svg',
43+
'/img/ui/santa/snowflake-6.svg',
44+
'/img/ui/santa/snowflake-7.svg',
4645
];
4746

4847
for (let i = 0; i < snowflakeCount; i++) {
@@ -55,15 +54,15 @@ export default class extends Controller {
5554
* Создаёт элемент снежинки с рандомными стилями.
5655
*/
5756
createSnowflake(svgUrls) {
58-
const snowflake = document.createElement("img");
59-
snowflake.classList.add("snowflake");
57+
const snowflake = document.createElement('img');
58+
snowflake.classList.add('snowflake');
6059

61-
snowflake.src= svgUrls[Math.floor(Math.random() * svgUrls.length)];
60+
snowflake.src = svgUrls[Math.floor(Math.random() * svgUrls.length)];
6261

63-
snowflake.style.setProperty("--snowflake-size", `${this.getRandomInRange(0.5, 1, 2)}rem`);
64-
snowflake.style.setProperty("--snowflake-left", `${this.getRandomInRange(0, 100, 5)}vw`);
65-
snowflake.style.setProperty("--fall-duration", `${this.getRandomInRange(5, 20, 2)}s`);
66-
snowflake.style.setProperty("--fall-delay", `${this.getRandomInRange(0, 5, 1)}s`);
62+
snowflake.style.setProperty('--snowflake-size', `${this.getRandomInRange(0.5, 1, 2)}rem`);
63+
snowflake.style.setProperty('--snowflake-left', `${this.getRandomInRange(0, 100, 5)}vw`);
64+
snowflake.style.setProperty('--fall-duration', `${this.getRandomInRange(5, 20, 2)}s`);
65+
snowflake.style.setProperty('--fall-delay', `${this.getRandomInRange(0, 5, 1)}s`);
6766

6867
return snowflake;
6968
}

routes/console.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
});
4545
})->purpose('Update information about users packages');
4646

47-
4847
Artisan::command('santa:start', function () {
4948
$participants = \App\Models\SecretSantaParticipant::inRandomOrder()->get();
5049

@@ -62,10 +61,9 @@
6261
$participant->save();
6362
}
6463

65-
$this->info("🎁 Пары успешно назначены!");
64+
$this->info('🎁 Пары успешно назначены!');
6665
})->purpose('Назначение пар для участников Тайного Санты');
6766

68-
6967
/*
7068
|--------------------------------------------------------------------------
7169
| Schedule

routes/web.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,6 @@
467467
Route::get('/@{user:nickname}/meets', [\App\Http\Controllers\ProfileController::class, 'meets'])
468468
->name('profile.meets');
469469

470-
471470
/*
472471
|--------------------------------------------------------------------------
473472
| Secret Santa
@@ -483,7 +482,6 @@
483482
Route::get('/santa', [\App\Http\Controllers\SantaController::class, 'index'])->name('santa');
484483
Route::get('/santa/rules', [\App\Http\Controllers\SantaController::class, 'rules'])->name('santa.rules');
485484

486-
487485
/*
488486
|--------------------------------------------------------------------------
489487
| Review

0 commit comments

Comments
 (0)