Skip to content

Commit

Permalink
chore(deps): update dependencies (#6836)
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin authored Aug 29, 2023
1 parent 10af315 commit 9ab75dc
Show file tree
Hide file tree
Showing 162 changed files with 2,232 additions and 1,417 deletions.
541 changes: 541 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
checksumBehavior: update

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.5.0.cjs
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

checksumBehavior: update
yarnPath: .yarn/releases/yarn-3.5.0.cjs
2 changes: 1 addition & 1 deletion app/Actions/AttemptToAuthenticateSocialite.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ protected function throwFailedAuthenticationException(Request $request, string $
/**
* Fire the failed authentication attempt event with the given arguments.
*/
protected function fireFailedEvent(Request $request, ?User $user = null): void
protected function fireFailedEvent(Request $request, User $user = null): void
{
event(new Failed('web', $user, [
'email' => $request->email,
Expand Down
2 changes: 1 addition & 1 deletion app/Actions/AttemptToAuthenticateWebauthn.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected function throwFailedAuthenticationException(Request $request)
*
* @return void
*/
protected function fireFailedEvent(Request $request, ?Authenticatable $user = null)
protected function fireFailedEvent(Request $request, Authenticatable $user = null)
{
event(new Failed(config('webauthn.guard'), $user, [
Webauthn::username() => $user !== null
Expand Down
2 changes: 1 addition & 1 deletion app/Actions/Fortify/RedirectIfTwoFactorAuthenticatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected function throwFailedAuthenticationException(Request $request): void
/**
* Fire the failed authentication attempt event with the given arguments.
*/
protected function fireFailedEvent(Request $request, ?User $user = null): void
protected function fireFailedEvent(Request $request, User $user = null): void
{
event(new Failed(config('fortify.guard'), $user, [
'email' => $request->email,
Expand Down
5 changes: 3 additions & 2 deletions app/Console/Commands/Local/MonicaLocalize.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
use function Safe\json_decode;
use function Safe\json_encode;
use Stichoza\GoogleTranslate\GoogleTranslate;
use Symfony\Component\Finder\Finder;

use function Safe\json_decode;
use function Safe\json_encode;

class MonicaLocalize extends Command
{
private GoogleTranslate $googleTranslate;
Expand Down
3 changes: 2 additions & 1 deletion app/Console/Commands/SetupDocumentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
use Illuminate\Console\Command;
use Illuminate\Console\ConfirmableTrait;
use Illuminate\Support\Facades\File;
use Symfony\Component\Console\Output\OutputInterface;

use function Safe\passthru;
use function Safe\putenv;
use Symfony\Component\Console\Output\OutputInterface;

/**
* @codeCoverageIgnore
Expand Down
1 change: 1 addition & 0 deletions app/Console/Commands/WaitForDb.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Console\Command;
use Illuminate\Database\Connectors\ConnectionFactory;
use Illuminate\Database\SQLiteDatabaseDoesNotExistException;

use function Safe\chgrp;
use function Safe\chown;
use function Safe\touch;
Expand Down
1 change: 1 addition & 0 deletions app/Domains/Contact/DavClient/Jobs/PushVCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;

use function Safe\fclose;
use function Safe\stream_get_contents;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
use Sabre\CardDAV\Plugin as CardDav;

use function Safe\parse_url;

class AddressBookGetter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function setCredentials(string $username, string $password): self
/**
* Get current uri.
*/
public function path(?string $path = null): string
public function path(string $path = null): string
{
$uri = GuzzleUtils::uriFor($this->baseUri);

Expand Down Expand Up @@ -557,7 +557,7 @@ private static function addElementNS(\DOMDocument $dom, ?string $namespace, stri
/**
* Create a new Element and add it as root's child.
*/
private static function addElement(\DOMDocument $dom, \DOMNode $root, string $name, ?string $value = null): \DOMNode
private static function addElement(\DOMDocument $dom, \DOMNode $root, string $name, string $value = null): \DOMNode
{
return $root->appendChild($dom->createElement($name, $value));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Illuminate\Http\Client\RequestException;
use Illuminate\Support\Facades\Http;
use Safe\Exceptions\UrlException;

use function Safe\parse_url;

class ServiceUrlQuery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PrepareJobsContactPush
* @param Collection<array-key,Collection<array-key,string>> $localChanges
* @param Collection<array-key,ContactDto>|null $changes
*/
public function execute(Collection $localChanges, ?Collection $changes = null): Collection
public function execute(Collection $localChanges, Collection $changes = null): Collection
{
$modified = $this->preparePushChangedContacts($localChanges->get('modified', collect()), $changes ?? collect());
$added = $this->preparePushAddedContacts($localChanges->get('added', collect()));
Expand Down
1 change: 1 addition & 0 deletions app/Domains/Contact/ManageContact/Dav/ImportContact.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Illuminate\Support\Str;
use Ramsey\Uuid\Uuid;
use Sabre\VObject\Component\VCard;

use function Safe\preg_split;

#[Order(1)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use App\Models\Vault;
use Illuminate\Http\Request;
use Inertia\Inertia;

use function Safe\mb_convert_encoding;

class ReportAddressesCitiesController extends Controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use App\Models\Vault;
use Illuminate\Http\Request;
use Inertia\Inertia;

use function Safe\mb_convert_encoding;

class ReportAddressesCountriesController extends Controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use App\Models\Address;
use App\Models\Vault;
use Illuminate\Support\Str;

use function Safe\mb_convert_encoding;

class ReportAddressIndexViewHelper
Expand Down
2 changes: 1 addition & 1 deletion app/Helpers/CollectionHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static function sortByCollator(Collection $collect, callable|string $call
/**
* Get a Collator object for the locale or current locale.
*/
public static function getCollator(?string $locale = null): \Collator
public static function getCollator(string $locale = null): \Collator
{
static $collators = [];

Expand Down
8 changes: 4 additions & 4 deletions app/Helpers/MonetaryNumberHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected static function getCurrencies(): ISOCurrencies
* @param string|null $currency Currency of amount.
* @return string Formatted amount for display without currency symbol (ex: '1234.50').
*/
public static function formatValue(User $user, int $amount, ?string $currency = null, int $format = \NumberFormatter::DECIMAL): string
public static function formatValue(User $user, int $amount, string $currency = null, int $format = \NumberFormatter::DECIMAL): string
{
if ($currency === null) {
$currency = 'USD';
Expand Down Expand Up @@ -66,7 +66,7 @@ public static function formatValue(User $user, int $amount, ?string $currency =
* @param string|null $currency Currency of amount.
* @return string Formatted amount for display without currency symbol (ex: '1234.50').
*/
public static function format(User $user, int $amount, ?string $currency = null): string
public static function format(User $user, int $amount, string $currency = null): string
{
$value = static::formatValue($user, $amount, $currency);

Expand Down Expand Up @@ -101,7 +101,7 @@ private static function formatMoney(Money $money, int $format = \NumberFormatter
* @param string $value Amount value in input format (ex: 145.00).
* @return int Amount as storable format (ex: 14500).
*/
public static function parseInput(string $value, ?string $currency = null): int
public static function parseInput(string $value, string $currency = null): int
{
$moneyParser = new DecimalMoneyParser(static::getCurrencies());
$money = $moneyParser->parse($value, new Currency($currency ?? 'USD'));
Expand All @@ -117,7 +117,7 @@ public static function parseInput(string $value, ?string $currency = null): int
* @param int $amount Amount value in storable format (ex: 100 for 1,00€).
* @return string Real value of amount in input format (ex: 1.24).
*/
public static function inputValue(int $amount, ?string $currency = null): string
public static function inputValue(int $amount, string $currency = null): string
{
$moneyFormatter = new DecimalMoneyFormatter(static::getCurrencies());
$money = new Money($amount, new Currency($currency ?? 'USD'));
Expand Down
9 changes: 5 additions & 4 deletions app/Helpers/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

use Illuminate\Support\Facades\App;
use Illuminate\Support\Str;
use Symfony\Component\Finder\Finder;

use function Safe\preg_match;
use function Safe\preg_split;
use function Safe\realpath;
use Symfony\Component\Finder\Finder;

if (! function_exists('trans_key')) {
/**
* Extract the message.
*/
function trans_key(?string $key = null): ?string
function trans_key(string $key = null): ?string
{
return $key;
}
Expand All @@ -21,7 +22,7 @@ function trans_key(?string $key = null): ?string
/**
* Translate the given message. It won't be extracted by monica:localize command.
*/
function trans_ignore(?string $key = null, array $replace = [], ?string $locale = null): string
function trans_ignore(string $key = null, array $replace = [], string $locale = null): string
{
return __($key, $replace, $locale);
}
Expand All @@ -31,7 +32,7 @@ function trans_ignore(?string $key = null, array $replace = [], ?string $locale
/**
* Get the current language from locale.
*/
function currentLang(?string $locale = null): string
function currentLang(string $locale = null): string
{
if ($locale === null) {
$locale = App::getLocale();
Expand Down
12 changes: 10 additions & 2 deletions app/Http/Middleware/HandleInertiaRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Http\Request;
use Illuminate\Support\Str;
use Inertia\Middleware;
use Laravel\Fortify\Features;

class HandleInertiaRequests extends Middleware
{
Expand Down Expand Up @@ -34,8 +35,15 @@ public function share(Request $request)
{
return array_merge(parent::share($request), [
'auth' => fn () => [
'user' => $request->user() ? [
'help_shown' => $request->user()->help_shown,
'user' => ($user = $request->user()) ? [
'name' => $user->name,
'first_name' => $user->first_name,
'lastname' => $user->last_name,
'email' => $user->email,
'help_shown' => $user->help_shown,
'locale' => $user->locale,
'two_factor_enabled' => Features::enabled(Features::twoFactorAuthentication())
&& ! is_null($user->two_factor_secret),
] : null,
],
'help_links' => fn () => config('monica.help_links'),
Expand Down
5 changes: 3 additions & 2 deletions app/Models/AddressType.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function account(): BelongsTo
* Relationship type entries have a default name that can be translated.
* Howerer, if a name is set, it will be used instead of the default.
*
* @return Attribute<string,never>
* @return Attribute<string,string>
*/
protected function name(): Attribute
{
Expand All @@ -48,7 +48,8 @@ protected function name(): Attribute
}

return $value;
}
},
set: fn ($value) => $value,
);
}
}
5 changes: 3 additions & 2 deletions app/Models/CallReason.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function callReasonType(): BelongsTo
* Call reasons entries have a default name that can be translated.
* Howerer, if a name is set, it will be used instead of the default.
*
* @return Attribute<string,never>
* @return Attribute<string,string>
*/
protected function label(): Attribute
{
Expand All @@ -48,7 +48,8 @@ protected function label(): Attribute
}

return $value;
}
},
set: fn ($value) => $value,
);
}
}
5 changes: 3 additions & 2 deletions app/Models/CallReasonType.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function callReasons(): HasMany
* Call reason types entries have a default name that can be translated.
* Howerer, if a name is set, it will be used instead of the default.
*
* @return Attribute<string,never>
* @return Attribute<string,string>
*/
protected function label(): Attribute
{
Expand All @@ -57,7 +57,8 @@ protected function label(): Attribute
}

return $value;
}
},
set: fn ($value) => $value,
);
}
}
5 changes: 3 additions & 2 deletions app/Models/ContactInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function contactInformationType(): BelongsTo
* If the contact information type is a phone number or an email, return the
* content. If it's something else, return the contact information type's label.
*
* @return Attribute<string,never>
* @return Attribute<string,string>
*/
protected function name(): Attribute
{
Expand All @@ -59,7 +59,8 @@ protected function name(): Attribute
} else {
return $type->name;
}
}
},
set: fn ($value) => $value,
);
}

Expand Down
5 changes: 3 additions & 2 deletions app/Models/ContactInformationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function account(): BelongsTo
* Contact information type entries have a default name that can be translated.
* Howerer, if a name is set, it will be used instead of the default.
*
* @return Attribute<string,never>
* @return Attribute<string,string>
*/
protected function name(): Attribute
{
Expand All @@ -57,7 +57,8 @@ protected function name(): Attribute
}

return $value;
}
},
set: fn ($value) => $value,
);
}
}
5 changes: 3 additions & 2 deletions app/Models/Emotion.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function account(): BelongsTo
* Emotion entries have a default name that can be translated.
* Howerer, if a name is set, it will be used instead of the default.
*
* @return Attribute<string,never>
* @return Attribute<string,string>
*/
protected function name(): Attribute
{
Expand All @@ -58,7 +58,8 @@ protected function name(): Attribute
}

return $value;
}
},
set: fn ($value) => $value,
);
}
}
5 changes: 3 additions & 2 deletions app/Models/Gender.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function account(): BelongsTo
* Genders have a default name that can be translated.
* Howerer, if a name is set, it will be used instead of the default.
*
* @return Attribute<string,never>
* @return Attribute<string,string>
*/
protected function name(): Attribute
{
Expand All @@ -84,7 +84,8 @@ protected function name(): Attribute
}

return $value;
}
},
set: fn ($value) => $value,
);
}
}
Loading

0 comments on commit 9ab75dc

Please sign in to comment.