Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Nielsvanpach authored and github-actions[bot] committed Jun 7, 2024
1 parent a93a5b8 commit 3016d99
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/BackupDestination/BackupDestinationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class BackupDestinationFactory
{
/**
* @param array<string, mixed> $config
* @param array<string, mixed> $config
* @return Collection<int, BackupDestination>
*/
public static function createFromArray(array $config): Collection
Expand Down
4 changes: 2 additions & 2 deletions src/Commands/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function handle(): int
}

/**
* @param Collection<int, BackupDestinationStatus> $backupDestinationStatuses
* @param Collection<int, BackupDestinationStatus> $backupDestinationStatuses
*/
protected function displayOverview(Collection $backupDestinationStatuses): static
{
Expand All @@ -49,7 +49,7 @@ protected function displayOverview(Collection $backupDestinationStatuses): stati
return $this;
}

/** @return array{0: string, 1: string, 2: string, disk: string, amount: integer, newest: string, usedStorage: string} */
/** @return array{0: string, 1: string, 2: string, disk: string, amount: int, newest: string, usedStorage: string} */
public function convertToRow(BackupDestinationStatus $backupDestinationStatus): array
{
$destination = $backupDestinationStatus->backupDestination();
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/Backup/BackupJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function setFileSelection(FileSelection $fileSelection): self
}

/**
* @param Collection<string, DbDumper> $dbDumpers
* @param Collection<string, DbDumper> $dbDumpers
* @return $this
*/
public function setDbDumpers(Collection $dbDumpers): self
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/Backup/BackupJobFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected static function createFileSelection(array $sourceFiles): FileSelection
}

/**
* @param array<int, string> $dbConnectionNames
* @param array<int, string> $dbConnectionNames
* @return Collection<string, DbDumper>
*/
protected static function createDbDumpers(array $dbConnectionNames): Collection
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/Backup/FileSelection.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ protected function shouldExclude(string $path): bool
}

/**
* @param string|array<string> $paths
* @param string|array<string> $paths
*/
protected function sanitize(string|array $paths): Collection
{
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/Backup/Manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function path(): string
}

/**
* @param Generator|string|array<string> $filePaths
* @param Generator|string|array<string> $filePaths
*/
public function addFiles(array|string|Generator $filePaths): self
{
Expand Down
9 changes: 4 additions & 5 deletions src/Tasks/Monitor/BackupDestinationStatusFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

namespace Spatie\Backup\Tasks\Monitor;

use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use Spatie\Backup\BackupDestination\BackupDestination;

class BackupDestinationStatusFactory
{

/**
* @param array{name: string, disks: array<string>, health_checks: array<class-string|int, array<string, mixed>>} $monitorConfiguration
* @param array{name: string, disks: array<string>, health_checks: array<class-string|int, array<string, mixed>>} $monitorConfiguration
* @return Collection<int, BackupDestinationStatus>
*/
public static function createForMonitorConfig(array $monitorConfiguration): Collection
Expand All @@ -22,7 +20,7 @@ public static function createForMonitorConfig(array $monitorConfiguration): Coll
}

/**
* @param array{name: string, disks: array<string>, health_checks: array<class-string|int, array<string, mixed>>} $monitorConfig
* @param array{name: string, disks: array<string>, health_checks: array<class-string|int, array<string, mixed>>} $monitorConfig
* @return Collection<int, BackupDestinationStatus>
*/
public static function createForSingleMonitor(array $monitorConfig): Collection
Expand All @@ -36,7 +34,7 @@ public static function createForSingleMonitor(array $monitorConfig): Collection
}

/**
* @param array{name: string, disks: array<string>, health_checks: array<class-string|int, array<string, mixed>>} $monitorConfig
* @param array{name: string, disks: array<string>, health_checks: array<class-string|int, array<string, mixed>>} $monitorConfig
* @return array<HealthCheck>
*/
protected static function buildHealthChecks(array $monitorConfig): array
Expand All @@ -50,6 +48,7 @@ protected static function buildHealthChecks(array $monitorConfig): array

return static::buildHealthCheck($class, $options);
})->toArray());

return collect($monitorConfig['health_checks'])
->map(function ($options, $class) {
if (is_int($class)) {
Expand Down

0 comments on commit 3016d99

Please sign in to comment.