upgrade to Laravel 11 and schema squash (#245)

* upgrade to Laravel 11 and schema squash

* code style and npm audit fix

* fix #209
This commit is contained in:
Saeed Vaziry
2024-06-25 00:33:02 +03:30
committed by GitHub
parent b5c8d99ef8
commit e031bafba5
74 changed files with 898 additions and 2098 deletions

View File

@ -102,7 +102,7 @@ private function getInterval(array $input): Expression
)->diffInHours();
}
if ($periodInHours <= 1) {
if (abs($periodInHours) <= 1) {
return DB::raw("strftime('%Y-%m-%d %H:%M:00', created_at) as date_interval");
}

View File

@ -4,6 +4,4 @@
use Exception;
class DeploymentScriptIsEmptyException extends Exception
{
}
class DeploymentScriptIsEmptyException extends Exception {}

View File

@ -4,6 +4,4 @@
use Exception;
class SourceControlIsNotConnected extends Exception
{
}
class SourceControlIsNotConnected extends Exception {}

View File

@ -20,7 +20,7 @@ class TrustProxies extends Middleware
* @var int
*/
protected $headers =
Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_HOST |
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |

View File

@ -7,7 +7,5 @@
abstract class AbstractNotificationChannel implements NotificationChannelInterface
{
public function __construct(protected NotificationChannel $notificationChannel)
{
}
public function __construct(protected NotificationChannel $notificationChannel) {}
}

View File

@ -7,9 +7,7 @@
class SiteInstallationFailed extends AbstractNotification
{
public function __construct(protected Site $site)
{
}
public function __construct(protected Site $site) {}
public function rawText(): string
{

View File

@ -7,9 +7,7 @@
class SiteInstallationSucceed extends AbstractNotification
{
public function __construct(protected Site $site)
{
}
public function __construct(protected Site $site) {}
public function rawText(): string
{

View File

@ -7,9 +7,7 @@
class SourceControlDisconnected extends AbstractNotification
{
public function __construct(protected SourceControl $sourceControl)
{
}
public function __construct(protected SourceControl $sourceControl) {}
public function rawText(): string
{

View File

@ -6,9 +6,7 @@
class Cron
{
public function __construct(protected Server $server)
{
}
public function __construct(protected Server $server) {}
public function update(string $user, string $cron): void
{

View File

@ -10,9 +10,7 @@ class OS
{
use HasScripts;
public function __construct(protected Server $server)
{
}
public function __construct(protected Server $server) {}
public function installDependencies(): void
{

View File

@ -6,9 +6,7 @@
abstract class AbstractService implements ServiceInterface
{
public function __construct(protected Service $service)
{
}
public function __construct(protected Service $service) {}
public function creationRules(array $input): array
{

View File

@ -4,6 +4,4 @@
use App\SSH\Services\AbstractService;
abstract class AbstractFirewall extends AbstractService implements Firewall
{
}
abstract class AbstractFirewall extends AbstractService implements Firewall {}

View File

@ -4,6 +4,4 @@
use App\SSH\Services\AbstractService;
abstract class AbstractWebserver extends AbstractService implements Webserver
{
}
abstract class AbstractWebserver extends AbstractService implements Webserver {}

View File

@ -7,7 +7,5 @@
abstract class AbstractStorage implements Storage
{
public function __construct(protected Server $server, protected StorageProvider $storageProvider)
{
}
public function __construct(protected Server $server, protected StorageProvider $storageProvider) {}
}

View File

@ -6,9 +6,7 @@
class Systemd
{
public function __construct(protected Server $server)
{
}
public function __construct(protected Server $server) {}
public function status(string $unit): string
{

View File

@ -2,6 +2,4 @@
namespace App\SiteTypes;
class Laravel extends PHPSite
{
}
class Laravel extends PHPSite {}

View File

@ -8,9 +8,7 @@
class ServerLayout extends Component
{
public function __construct(public Server $server)
{
}
public function __construct(public Server $server) {}
public function render(): View
{

View File

@ -8,9 +8,7 @@
class SiteLayout extends Component
{
public function __construct(public Site $site)
{
}
public function __construct(public Site $site) {}
public function render(): View
{