@@ -9,7 +9,7 @@ |
||
| 9 | 9 | * @var \Illuminate\Database\Eloquent\Factory $factory |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -$factory->define(Transaction::class, function (\Faker\Generator $faker) { |
|
| 12 | +$factory->define(Transaction::class, function(\Faker\Generator $faker) { |
|
| 13 | 13 | return [ |
| 14 | 14 | 'donator_id' => factory(Donator::class)->lazy(), |
| 15 | 15 | 'campaign_id' => factory(Campaign::class)->lazy(), |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | * @var \Illuminate\Database\Eloquent\Factory $factory |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -$factory->define(Campaign::class, function (Faker\Generator $faker) { |
|
| 10 | +$factory->define(Campaign::class, function(Faker\Generator $faker) { |
|
| 11 | 11 | return [ |
| 12 | 12 | 'name' => $faker->words(3, true), |
| 13 | 13 | 'description' => $faker->sentence, |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | | |
| 16 | 16 | */ |
| 17 | 17 | |
| 18 | -$factory->define(Admin::class, function (Faker $faker) { |
|
| 18 | +$factory->define(Admin::class, function(Faker $faker) { |
|
| 19 | 19 | return [ |
| 20 | 20 | 'name' => $faker->name, |
| 21 | 21 | 'email' => $faker->unique()->safeEmail, |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | | |
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | -$factory->define(Donator::class, function (Faker $faker) { |
|
| 19 | +$factory->define(Donator::class, function(Faker $faker) { |
|
| 20 | 20 | return [ |
| 21 | 21 | 'name' => null, |
| 22 | 22 | 'email' => $faker->unique()->email, |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | * @var \Illuminate\Database\Eloquent\Factory $factory |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | -$factory->define(CampaignTranslation::class, function (Faker\Generator $faker) { |
|
| 11 | +$factory->define(CampaignTranslation::class, function(Faker\Generator $faker) { |
|
| 12 | 12 | return [ |
| 13 | 13 | 'locale' => $faker->randomElement(['be', 'ru', 'en']), |
| 14 | 14 | 'name' => $faker->words(3, true), |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | ]; |
| 18 | 18 | }); |
| 19 | 19 | |
| 20 | -$factory->state(CampaignTranslation::class, 'with_campaign', function () { |
|
| 20 | +$factory->state(CampaignTranslation::class, 'with_campaign', function() { |
|
| 21 | 21 | return [ |
| 22 | 22 | 'campaign_id' => factory(Campaign::class)->lazy() |
| 23 | 23 | ]; |
@@ -24,10 +24,10 @@ discard block |
||
| 24 | 24 | FormFacade::component('bsTextarea', 'components.form.textarea', ['name', 'value' => null, 'attributes' => []]); |
| 25 | 25 | FormFacade::component('bsSelect', 'components.form.select', ['name', 'list' => [], 'selected' => null, 'attributes' => []]); |
| 26 | 26 | FormFacade::component('bsCheckbox', 'components.form.custom-control', ['name', 'description', 'value' => null, 'type' => 'checkbox']); |
| 27 | - HtmlFacade::macro('asset', function ($manifestName, $path) { |
|
| 27 | + HtmlFacade::macro('asset', function($manifestName, $path) { |
|
| 28 | 28 | static $manifest; |
| 29 | 29 | $basePath = app()->environment('production') ? 'dist' : 'build'; |
| 30 | - if (! $manifest |
|
| 30 | + if (!$manifest |
|
| 31 | 31 | && file_exists($manifestPath = public_path("{$basePath}/manifest-{$manifestName}.json")) |
| 32 | 32 | ) { |
| 33 | 33 | $manifest = json_decode(file_get_contents($manifestPath), true); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | /* |
| 40 | 40 | * Prepare flash message for alerts |
| 41 | 41 | */ |
| 42 | - View::composer('partials/messages', function (\Illuminate\View\View $view) { |
|
| 42 | + View::composer('partials/messages', function(\Illuminate\View\View $view) { |
|
| 43 | 43 | $data = collect($view->getData()); |
| 44 | 44 | if ($flash = session()->get('flash_message') ?: $data->get('flashMessage')) { |
| 45 | 45 | $view->with('flashMessage', $flash); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $view->with('flashType', 'danger'); |
| 62 | 62 | } |
| 63 | 63 | }); |
| 64 | - View::composer('*', function (\Illuminate\View\View $view) { |
|
| 64 | + View::composer('*', function(\Illuminate\View\View $view) { |
|
| 65 | 65 | $view->with('loggedInUser', auth()->user()); |
| 66 | 66 | }); |
| 67 | 67 | } |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Diglabby\Doika\Models; |
| 4 | 4 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | protected function setLocalesAttributes($attributes) |
| 32 | 32 | { |
| 33 | - View::composer(['partials.alternates', 'partials.locales'], function (\Illuminate\View\View $view) use ($attributes) { |
|
| 33 | + View::composer(['partials.alternates', 'partials.locales'], function(\Illuminate\View\View $view) use ($attributes) { |
|
| 34 | 34 | $view->withAttributes($attributes); |
| 35 | 35 | }); |
| 36 | 36 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | protected function setTranslatable($translatable) |
| 44 | 44 | { |
| 45 | - View::composer(['partials.alternates', 'partials.locales'], function (\Illuminate\View\View $view) use ($translatable) { |
|
| 45 | + View::composer(['partials.alternates', 'partials.locales'], function(\Illuminate\View\View $view) use ($translatable) { |
|
| 46 | 46 | $view->withTranslatable($translatable); |
| 47 | 47 | }); |
| 48 | 48 | } |