Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Jun 3, 2023
1 parent aaea1e3 commit 392c174
Show file tree
Hide file tree
Showing 69 changed files with 134 additions and 76 deletions.
2 changes: 1 addition & 1 deletion app/Console/Commands/Local/MonicaLocalize.php
Expand Up @@ -38,7 +38,7 @@ public function handle(): void
}

/**
* Heavily inspired by https://stevensteel.com/blog/automatically-find-translate-and-save-missing-translation-keys
* Heavily inspired by https://stevensteel.com/blog/automatically-find-translate-and-save-missing-translation-keys.
*/
private function loadTranslations(array $locales): void
{
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/SetupScout.php
Expand Up @@ -47,7 +47,7 @@ public function handle(): void
*/
protected function scoutConfigure(): void
{
if (config('scout.driver') === 'meilisearch' && (config('scout.meilisearch.host')) !== '') {
if (config('scout.driver') === 'meilisearch' && config('scout.meilisearch.host') !== '') {
$this->artisan('☐ Updating indexes on Meilisearch', 'scout:sync-index-settings', ['--verbose' => true]);
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/Domains/Contact/ManageContact/Dav/ImportContact.php
Expand Up @@ -25,7 +25,7 @@ class ImportContact extends Importer implements ImportVCardResource
protected array $genders = [];

/**
* Import Contact
* Import Contact.
*/
public function import(?Contact $contact, VCard $vcard): Contact
{
Expand Down
Expand Up @@ -10,7 +10,7 @@
use Illuminate\Support\Facades\Notification;

/**
* Inspired by https://abstractentropy.com/laravel-notifications-telegram-bot/
* Inspired by https://abstractentropy.com/laravel-notifications-telegram-bot/.
*/
class SendTestTelegramNotification extends BaseService implements ServiceInterface
{
Expand Down
Expand Up @@ -23,7 +23,7 @@ public function __construct()
}

/**
* Retrieve the authenticated user
* Retrieve the authenticated user.
*
* Get the authenticated user.
*/
Expand All @@ -35,7 +35,7 @@ public function user(Request $request)
}

/**
* Retrieve a user
* Retrieve a user.
*
* Get a specific user object.
*/
Expand All @@ -49,7 +49,7 @@ public function show(Request $request, string $userId)
}

/**
* List all users
* List all users.
*
* Get all the users in the account.
*/
Expand Down
Expand Up @@ -50,7 +50,7 @@ public static function dto(LifeMetric $lifeMetric, int $year, Contact $contact):
$eventsCounter = 0;

foreach ($monthlyEvents as $monthlyEvent) {
if ((CarbonImmutable::parse($monthlyEvent->pivot->created_at))->month === $month) {
if (CarbonImmutable::parse($monthlyEvent->pivot->created_at)->month === $month) {
$eventsCounter++;
}
}
Expand Down Expand Up @@ -100,7 +100,7 @@ public static function years(LifeMetric $lifeMetric, Contact $contact): Collecti
->get();

$yearsCollection = $events->map(fn (LifeMetric $lifeMetricEvent) => [
'year' => (Carbon::parse($lifeMetricEvent->pivot->created_at))->year,
'year' => Carbon::parse($lifeMetricEvent->pivot->created_at)->year,
]);

return $yearsCollection->unique('year')->sortByDesc('year')->values();
Expand Down
Expand Up @@ -23,7 +23,7 @@ public static function data(Vault $vault, User $user, int $year): array
}

/**
* Get all the mood tracking events for the given year
* Get all the mood tracking events for the given year.
*/
private static function year(Vault $vault, User $user, int $year): Collection
{
Expand Down
Expand Up @@ -27,7 +27,7 @@ public function __construct()
}

/**
* List all vaults
* List all vaults.
*
* Get all the vaults in the account.
*/
Expand All @@ -42,7 +42,7 @@ public function index(Request $request)
}

/**
* Create a vault
* Create a vault.
*
* Creates a vault object.
*/
Expand All @@ -65,7 +65,7 @@ public function store(Request $request)
}

/**
* Retrieve a vault
* Retrieve a vault.
*
* Get a specific vault object.
*/
Expand All @@ -79,7 +79,7 @@ public function show(Request $request, string $vaultId)
}

/**
* Update a vault
* Update a vault.
*
* Updates a vault object.
*
Expand All @@ -105,7 +105,7 @@ public function update(Request $request, string $vaultId)
}

/**
* Delete a vault
* Delete a vault.
*
* Destroys a vault object.
* Warning: everything in the vault will be immediately deleted.
Expand Down
2 changes: 1 addition & 1 deletion config/localizator.php
Expand Up @@ -9,7 +9,7 @@
/**
* Short keys. This is the default for Laravel.
* They are stored in PHP files inside folders name by their locale code.
* Laravel comes with default: auth.php, pagination.php, passwords.php and validation.php
* Laravel comes with default: auth.php, pagination.php, passwords.php and validation.php.
*/
'default' => true,

Expand Down
2 changes: 1 addition & 1 deletion config/scribe.php
Expand Up @@ -353,7 +353,7 @@
* Customize the "Last updated" value displayed in the docs by specifying tokens and formats.
* Examples:
* - {date:F j Y} => March 28, 2022
* - {git:short} => Short hash of the last Git commit
* - {git:short} => Short hash of the last Git commit.
*
* Available tokens are `{date:<format>}` and `{git:<format>}`.
* The format you pass to `date` will be passed to PhP's `date()` function.
Expand Down
2 changes: 1 addition & 1 deletion config/sentry.php
Expand Up @@ -50,7 +50,7 @@
// @see: https://docs.sentry.io/platforms/php/configuration/options/#send-default-pii
'send_default_pii' => env('SENTRY_SEND_DEFAULT_PII', false),

'traces_sample_rate' => (float) (env('SENTRY_TRACES_SAMPLE_RATE', 0.0)),
'traces_sample_rate' => (float) env('SENTRY_TRACES_SAMPLE_RATE', 0.0),

'controllers_base_namespace' => env('SENTRY_CONTROLLERS_BASE_NAMESPACE', 'App\\Http\\Controllers'),

Expand Down
Expand Up @@ -3,10 +3,11 @@
namespace Tests\Unit\Controllers\Auth\ViewHelpers;

use App\Http\Controllers\Auth\ViewHelpers\AcceptInvitationShowViewHelper;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class AcceptInvitationShowViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down
Expand Up @@ -8,10 +8,11 @@
use App\Models\Emotion;
use App\Models\User;
use Carbon\Carbon;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class ModuleCallsViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down
Expand Up @@ -7,10 +7,11 @@
use App\Models\Pronoun;
use App\Models\Template;
use App\Models\Vault;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class ContactCreateViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down
Expand Up @@ -8,10 +8,11 @@
use App\Models\Pronoun;
use App\Models\User;
use App\Models\Vault;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class ContactEditViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down
Expand Up @@ -7,10 +7,11 @@
use App\Models\Label;
use App\Models\User;
use App\Models\Vault;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class ContactIndexViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down
Expand Up @@ -7,10 +7,11 @@
use App\Models\Template;
use App\Models\User;
use App\Models\Vault;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class ContactShowBlankViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down
Expand Up @@ -9,10 +9,11 @@
use App\Models\TemplatePage;
use App\Models\User;
use App\Models\Vault;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class ContactShowViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down
Expand Up @@ -7,10 +7,11 @@
use App\Models\Goal;
use App\Models\User;
use Carbon\Carbon;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class GoalShowViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down
Expand Up @@ -6,10 +6,11 @@
use App\Models\Contact;
use App\Models\Goal;
use App\Models\User;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class ModuleGoalsViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down
Expand Up @@ -10,10 +10,11 @@
use App\Models\TimelineEvent;
use App\Models\User;
use Carbon\Carbon;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class ModuleLifeEventViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down
Expand Up @@ -8,10 +8,11 @@
use App\Models\Loan;
use App\Models\User;
use Carbon\Carbon;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class ModuleLoanViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down
Expand Up @@ -8,10 +8,11 @@
use App\Models\Note;
use App\Models\User;
use Carbon\Carbon;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class ModuleNotesViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down
Expand Up @@ -9,10 +9,11 @@
use App\Models\Note;
use App\Models\User;
use Carbon\Carbon;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class NotesIndexViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down
Expand Up @@ -7,10 +7,11 @@
use App\Models\Pet;
use App\Models\PetCategory;
use App\Models\User;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class ModulePetsViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down
Expand Up @@ -10,10 +10,11 @@
use App\Models\RelationshipType;
use App\Models\User;
use App\Models\Vault;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class ContactRelationshipsCreateViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down
Expand Up @@ -8,10 +8,11 @@
use App\Models\RelationshipType;
use App\Models\User;
use App\Models\Vault;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class ModuleRelationshipViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down
Expand Up @@ -6,10 +6,11 @@
use App\Models\Contact;
use App\Models\ContactReminder;
use App\Models\User;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class ModuleRemindersViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down
Expand Up @@ -7,10 +7,11 @@
use App\Models\ContactTask;
use App\Models\User;
use Carbon\Carbon;
use function env;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\TestCase;

use function env;

class ModuleContactTasksViewHelperTest extends TestCase
{
use DatabaseTransactions;
Expand Down

0 comments on commit 392c174

Please sign in to comment.