Skip to content

Commit bb86dc5

Browse files
committed
Replace == with ===
1 parent f28e333 commit bb86dc5

29 files changed

+85
-85
lines changed

app/Livewire/Backups/Manage.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function mount(): void
7979
// make a collection of existing backup files, with their filesize and creation date
8080
foreach ($files as $file) {
8181
// only take zip files into account
82-
if (substr($file, -4) == '.zip' and $disk->exists($file)) {
82+
if (substr($file, -4) === '.zip' and $disk->exists($file)) {
8383
$this->backups->push([
8484
'file_name' => str_replace(config('backup.backup.name') . '/', '', $file),
8585
'file_size' => Number::fileSize($disk->size($file), 2),
@@ -101,7 +101,7 @@ public function create(): void
101101
$exitCode = Artisan::call('backup:run --only-db');
102102
$output = Artisan::output();
103103

104-
if ($exitCode == 0) {
104+
if ($exitCode === 0) {
105105
Log::info("Backup (Manually) -- Backup started \r\n" . $output);
106106

107107
$this->toast()->success(__('backup.backup'), __('backup.created'))->flash()->send();

app/Livewire/People/Add/Child.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function mount(): void
6060
->map(function ($p) {
6161
return [
6262
'id' => $p->id,
63-
'name' => $p->name . ' [' . (($p->sex == 'm') ? __('app.male') : __('app.female')) . '] ' . ($p->birth_formatted ? '(' . $p->birth_formatted . ')' : ''),
63+
'name' => $p->name . ' [' . (($p->sex === 'm') ? __('app.male') : __('app.female')) . '] ' . ($p->birth_formatted ? '(' . $p->birth_formatted . ')' : ''),
6464
];
6565
});
6666
} else {
@@ -72,7 +72,7 @@ public function mount(): void
7272
->map(function ($p) {
7373
return [
7474
'id' => $p->id,
75-
'name' => $p->name . ' [' . (($p->sex == 'm') ? __('app.male') : __('app.female')) . '] ' . ($p->birth_formatted ? '(' . $p->birth_formatted . ')' : ''),
75+
'name' => $p->name . ' [' . (($p->sex === 'm') ? __('app.male') : __('app.female')) . '] ' . ($p->birth_formatted ? '(' . $p->birth_formatted . ')' : ''),
7676
];
7777
});
7878
}

app/Livewire/People/Add/Partner.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function mount(): void
6565
->map(function ($p) {
6666
return [
6767
'id' => $p->id,
68-
'name' => $p->name . ' [' . (($p->sex == 'm') ? __('app.male') : __('app.female')) . '] (' . $p->birth_formatted . ')',
68+
'name' => $p->name . ' [' . (($p->sex === 'm') ? __('app.male') : __('app.female')) . '] (' . $p->birth_formatted . ')',
6969
];
7070
});
7171
}

app/Livewire/People/Children.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function disconnectChild()
4444
{
4545
$child = Person::findOrFail($this->child_to_disconnect_id);
4646

47-
if ($this->person->sex == 'm') {
47+
if ($this->person->sex === 'm') {
4848
$child->update([
4949
'father_id' => null,
5050
]);

app/Livewire/People/Edit/Partner.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function mount(): void
4444
->map(function ($p) {
4545
return [
4646
'id' => $p->id,
47-
'name' => $p->name . ' [' . (($p->sex == 'm') ? __('app.male') : __('app.female')) . '] (' . $p->birth_formatted . ')',
47+
'name' => $p->name . ' [' . (($p->sex === 'm') ? __('app.male') : __('app.female')) . '] (' . $p->birth_formatted . ')',
4848
];
4949
});
5050
}

app/Livewire/Peoplelog.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public function mount(): void
2727
'subject_type' => substr($record->subject_type, strrpos($record->subject_type, '\\') + 1),
2828
'subject_id' => $record->subject_id,
2929
'description' => strtoupper($record->description),
30-
'properties_old' => ($record->event == 'updated' or $record->event == 'deleted') ? $record->properties['old'] : [],
31-
'properties_new' => ($record->event == 'updated' or $record->event == 'created') ? $record->properties['attributes'] : [],
30+
'properties_old' => ($record->event === 'updated' or $record->event === 'deleted') ? $record->properties['old'] : [],
31+
'properties_new' => ($record->event === 'updated' or $record->event === 'created') ? $record->properties['attributes'] : [],
3232
'updated_at' => $record->updated_at->timezone(session('timezone') ?? 'UTC')->isoFormat('LLL'),
3333
'causer' => $record->causer ? $record->causer->name : '',
3434
];

app/Livewire/Teamlog.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public function mount(): void
2626
'event' => strtoupper($record->event),
2727
'subject_type' => substr($record->subject_type, strrpos($record->subject_type, '\\') + 1),
2828
'description' => strtoupper($record->description),
29-
'properties' => ($record->event == 'invited' or $record->event == 'removed') ? $record->properties : [],
30-
'properties_old' => ($record->event == 'updated' or $record->event == 'deleted') ? $record->properties['old'] : [],
31-
'properties_new' => ($record->event == 'updated' or $record->event == 'created') ? $record->properties['attributes'] : [],
29+
'properties' => ($record->event === 'invited' or $record->event === 'removed') ? $record->properties : [],
30+
'properties_old' => ($record->event === 'updated' or $record->event === 'deleted') ? $record->properties['old'] : [],
31+
'properties_new' => ($record->event === 'updated' or $record->event === 'created') ? $record->properties['attributes'] : [],
3232
'updated_at' => $record->updated_at->timezone(session('timezone') ?? 'UTC')->isoFormat('LLL'),
3333
'causer' => $record->causer ? $record->causer->name : '',
3434
];

app/Models/Person.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ public function getPartnersAttribute(): Collection
516516
return $this->getRelation('partners');
517517
}
518518

519-
/* returns CURRENT PARTNER (1 Person) related to the person, where relation not_ended and date_end == null */
519+
/* returns CURRENT PARTNER (1 Person) related to the person, where relation not_ended and date_end === null */
520520
public function currentPartner(): ?Person
521521
{
522522
return $this->partners->where('pivot.has_ended', false)->whereNull('pivot.date_end')->sortBy('pivot.date_start')->last();

app/Models/Team.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function tapActivity(Activity $activity, string $eventName): void
8080
/* -------------------------------------------------------------------------------------------- */
8181
public function isDeletable(): bool
8282
{
83-
return $this->persons->count() == 0 and $this->couples->count() == 0 and $this->users->count() == 0;
83+
return $this->persons->count() === 0 and $this->couples->count() === 0 and $this->users->count() === 0;
8484
}
8585

8686
/* -------------------------------------------------------------------------------------------- */

database/seeders/DemoSeeder.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ protected function importBritishRoyalsCouples(): void
166166
'date_end' => ! empty($couple['date_end']) ? $couple['date_end'] : null,
167167

168168
'is_married' => $couple['status'] >= 1 ? 1 : 0,
169-
'has_ended' => $couple['status'] == 2 ? 1 : 0,
169+
'has_ended' => $couple['status'] === 2 ? 1 : 0,
170170

171171
'team_id' => $this->british_royals_team,
172172
]);
@@ -406,7 +406,7 @@ protected function importKennedyCouples(): void
406406
'date_end' => ! empty($couple['date_end']) ? $couple['date_end'] : null,
407407

408408
'is_married' => $couple['status'] >= 1 ? 1 : 0,
409-
'has_ended' => $couple['status'] == 2 ? 1 : 0,
409+
'has_ended' => $couple['status'] === 2 ? 1 : 0,
410410

411411
'team_id' => $this->kennedy_team,
412412
]);

resources/views/auth/register.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<div class="md:w-2/3">
5858
<select id="language" class="block w-full rounded" name="language" required>
5959
@foreach (config('app.available_locales') as $locale_name => $available_locale)
60-
<option value="{{ $available_locale }}" @selected($available_locale == app()->getLocale())>{{ $locale_name }}</option>
60+
<option value="{{ $available_locale }}" @selected($available_locale === app()->getLocale())>{{ $locale_name }}</option>
6161
@endforeach
6262
</select>
6363
</div>
@@ -142,7 +142,7 @@
142142
143143
function setSelectedValue(selectObj, valueToSet) {
144144
for (var i = 0; i < selectObj.options.length; i++) {
145-
if (selectObj.options[i].text == valueToSet) {
145+
if (selectObj.options[i].text === valueToSet) {
146146
selectObj.options[i].selected = true;
147147
return;
148148
}

resources/views/auth/verify-email.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
{{ __('auth.verify_email') }}
2121
</div>
2222

23-
@if (session('status') == 'verification-link-sent')
23+
@if (session('status') === 'verification-link-sent')
2424
<div class="mb-4 text-sm font-medium text-emerald-600">
2525
{{ __('auth.link_send') }}
2626
</div>

resources/views/back/people/birthdays.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
])>
4747
{{ $person->name }}
4848
</x-link>
49-
<x-ts-icon icon="{{ $person->sex == 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
49+
<x-ts-icon icon="{{ $person->sex === 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
5050
</td>
5151
<td class="p-2 whitespace-nowrap text-end">
5252
{{ $person->dob ? $person->dob->timezone(session('timezone') ?? 'UTC')->isoFormat('LL') : '' }}

resources/views/back/people/chart.blade.php

+15-15
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
])>
3838
{{ $person->father->father->name }}
3939
</x-link>
40-
<x-ts-icon icon="{{ $person->father->father->sex == 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
40+
<x-ts-icon icon="{{ $person->father->father->sex === 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
4141
@else
4242
<x-ts-icon icon="user-question" class="inline-block" />
4343
@endif
@@ -49,7 +49,7 @@
4949
])>
5050
{{ $person->father->mother->name }}
5151
</x-link>
52-
<x-ts-icon icon="{{ $person->father->mother->sex == 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
52+
<x-ts-icon icon="{{ $person->father->mother->sex === 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
5353
@else
5454
<x-ts-icon icon="user-question" class="inline-block" />
5555
@endif
@@ -61,7 +61,7 @@
6161
])>
6262
{{ $person->mother->father->name }}
6363
</x-link>
64-
<x-ts-icon icon="{{ $person->mother->father->sex == 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
64+
<x-ts-icon icon="{{ $person->mother->father->sex === 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
6565
@else
6666
<x-ts-icon icon="user-question" class="inline-block" />
6767
@endif
@@ -73,7 +73,7 @@
7373
])>
7474
{{ $person->mother->mother->name }}
7575
</x-link>
76-
<x-ts-icon icon="{{ $person->mother->mother->sex == 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
76+
<x-ts-icon icon="{{ $person->mother->mother->sex === 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
7777
@else
7878
<x-ts-icon icon="user-question" class="inline-block" />
7979
@endif
@@ -98,7 +98,7 @@
9898
])>
9999
{{ $sibling->name }}
100100
</x-link>
101-
<x-ts-icon icon="{{ $sibling->sex == 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
101+
<x-ts-icon icon="{{ $sibling->sex === 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
102102

103103
<ol class="ml-8 list-decimal">
104104
@foreach ($sibling->children as $child)
@@ -108,7 +108,7 @@
108108
])>
109109
{{ $child->name }}
110110
</x-link>
111-
<x-ts-icon icon="{{ $child->sex == 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
111+
<x-ts-icon icon="{{ $child->sex === 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
112112
</li>
113113
@endforeach
114114
</ol>
@@ -129,7 +129,7 @@
129129
])>
130130
{{ $sibling->name }}
131131
</x-link>
132-
<x-ts-icon icon="{{ $sibling->sex == 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
132+
<x-ts-icon icon="{{ $sibling->sex === 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
133133

134134
<ol class="ml-8 list-decimal">
135135
@foreach ($sibling->children as $child)
@@ -139,7 +139,7 @@
139139
])>
140140
{{ $child->name }}
141141
</x-link>
142-
<x-ts-icon icon="{{ $child->sex == 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
142+
<x-ts-icon icon="{{ $child->sex === 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
143143
</li>
144144
@endforeach
145145
</ol>
@@ -161,7 +161,7 @@
161161
])>
162162
{{ $person->father->name }}
163163
</x-link>
164-
<x-ts-icon icon="{{ $person->father->sex == 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
164+
<x-ts-icon icon="{{ $person->father->sex === 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
165165
@else
166166
<x-ts-icon icon="user-question" class="inline-block" />
167167
@endif
@@ -173,7 +173,7 @@
173173
])>
174174
{{ $person->mother->name }}
175175
</x-link>
176-
<x-ts-icon icon="{{ $person->mother->sex == 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
176+
<x-ts-icon icon="{{ $person->mother->sex === 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
177177
@else
178178
<x-ts-icon icon="user-question" class="inline-block" />
179179
@endif
@@ -190,7 +190,7 @@
190190
])>
191191
{{ $person->name }}
192192
</x-link>
193-
<x-ts-icon icon="{{ $person->sex == 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
193+
<x-ts-icon icon="{{ $person->sex === 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
194194
</div>
195195
</div>
196196

@@ -211,7 +211,7 @@
211211
])>
212212
{{ $child->name }}
213213
</x-link>
214-
<x-ts-icon icon="{{ $child->sex == 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
214+
<x-ts-icon icon="{{ $child->sex === 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
215215

216216
<ol class="ml-8 list-decimal">
217217
@foreach ($child->children as $grandchild)
@@ -221,7 +221,7 @@
221221
])>
222222
{{ $grandchild->name }}
223223
</x-link>
224-
<x-ts-icon icon="{{ $grandchild->sex == 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
224+
<x-ts-icon icon="{{ $grandchild->sex === 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
225225
</li>
226226
@endforeach
227227
</ol>
@@ -248,7 +248,7 @@
248248
])>
249249
{{ $sibling->name }}
250250
</x-link>
251-
<x-ts-icon icon="{{ $sibling->sex == 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
251+
<x-ts-icon icon="{{ $sibling->sex === 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
252252

253253
<ol class="ml-8 list-decimal">
254254
@foreach ($sibling->children as $child)
@@ -258,7 +258,7 @@
258258
])>
259259
{{ $child->name }}
260260
</x-link>
261-
<x-ts-icon icon="{{ $child->sex == 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
261+
<x-ts-icon icon="{{ $child->sex === 'm' ? 'gender-male' : 'gender-female' }}" class="inline-block size-5" />
262262
</li>
263263
@endforeach
264264
</ol>

0 commit comments

Comments
 (0)