Skip to content
Snippets Groups Projects
Commit fd33b741 authored by Tibo's avatar Tibo
Browse files

upgrade larastan

parent 1dd15e5f
No related branches found
No related tags found
No related merge requests found
Pipeline #18583 failed
...@@ -5,6 +5,7 @@ namespace App; ...@@ -5,6 +5,7 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon; use Carbon\Carbon;
use Carbon\CarbonInterface;
/** /**
* @property Server $server * @property Server $server
...@@ -25,29 +26,29 @@ class ServerInfo extends Model ...@@ -25,29 +26,29 @@ class ServerInfo extends Model
'cpuinfo' => 'array', 'cpuinfo' => 'array',
'addresses' => 'array', 'addresses' => 'array',
]; ];
public function server() public function server()
{ {
return $this->belongsTo(Server::class); return $this->belongsTo(Server::class);
} }
public function cpuName() : string public function cpuName() : string
{ {
return $this->cpuinfo["name"] ?? "unknown"; return $this->cpuinfo["name"] ?? "unknown";
} }
public function vCores() : int public function vCores() : int
{ {
return $this->cpuinfo["threads"] ?? 0; return $this->cpuinfo["threads"] ?? 0;
} }
public function memoryTotalForHumans() : string public function memoryTotalForHumans() : string
{ {
return round($this->memory / 1024 / 1000) . " GB"; return round($this->memory / 1024 / 1000) . " GB";
} }
public function uptimeForHumans() : string public function uptimeForHumans() : string
{ {
return Carbon::now()->subSeconds($this->uptime)->diffForHumans(null, true); return Carbon::now()->subSeconds($this->uptime)->diffForHumans(null, CarbonInterface::DIFF_ABSOLUTE);
} }
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "4bcd3c58821abb4e26c8cbe934411aaa", "content-hash": "62e413c53eb63c8e16ec2e5ac6a2d3fe",
"packages": [ "packages": [
{ {
"name": "brick/math", "name": "brick/math",
...@@ -6611,6 +6611,104 @@ ...@@ -6611,6 +6611,104 @@
}, },
"time": "2024-07-06T21:00:26+00:00" "time": "2024-07-06T21:00:26+00:00"
}, },
{
"name": "larastan/larastan",
"version": "1.0.4",
"source": {
"type": "git",
"url": "https://github.com/larastan/larastan.git",
"reference": "769bc6346a6cce3b823c30eaace33d9c3a0dd40e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/larastan/larastan/zipball/769bc6346a6cce3b823c30eaace33d9c3a0dd40e",
"reference": "769bc6346a6cce3b823c30eaace33d9c3a0dd40e",
"shasum": ""
},
"require": {
"composer/composer": "^1.0 || ^2.0",
"ext-json": "*",
"illuminate/console": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/container": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/contracts": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/database": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/http": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/pipeline": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"mockery/mockery": "^0.9 || ^1.0",
"php": "^7.2 || ^8.0",
"phpstan/phpstan": "^1.0 <1.9",
"symfony/process": "^4.3 || ^5.0 || ^6.0"
},
"require-dev": {
"nikic/php-parser": "^4.13.0",
"orchestra/testbench": "^4.0 || ^5.0 || ^6.0 || ^7.0",
"phpunit/phpunit": "^7.3 || ^8.2 || ^9.3"
},
"suggest": {
"orchestra/testbench": "Using Larastan for analysing a package needs Testbench"
},
"type": "phpstan-extension",
"extra": {
"phpstan": {
"includes": [
"extension.neon"
]
},
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"NunoMaduro\\Larastan\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nuno Maduro",
"email": "enunomaduro@gmail.com"
}
],
"description": "Larastan - Discover bugs in your code without running it. A phpstan/phpstan wrapper for Laravel",
"keywords": [
"PHPStan",
"code analyse",
"code analysis",
"larastan",
"laravel",
"package",
"php",
"static analysis"
],
"support": {
"issues": "https://github.com/larastan/larastan/issues",
"source": "https://github.com/larastan/larastan/tree/1.0.4"
},
"funding": [
{
"url": "https://www.paypal.com/paypalme/enunomaduro",
"type": "custom"
},
{
"url": "https://github.com/canvural",
"type": "github"
},
{
"url": "https://github.com/nunomaduro",
"type": "github"
},
{
"url": "https://www.patreon.com/nunomaduro",
"type": "patreon"
}
],
"time": "2022-11-09T09:09:31+00:00"
},
{ {
"name": "laravel/browser-kit-testing", "name": "laravel/browser-kit-testing",
"version": "v6.4.0", "version": "v6.4.0",
...@@ -6888,105 +6986,6 @@ ...@@ -6888,105 +6986,6 @@
], ],
"time": "2024-11-08T17:47:46+00:00" "time": "2024-11-08T17:47:46+00:00"
}, },
{
"name": "nunomaduro/larastan",
"version": "1.0.4",
"source": {
"type": "git",
"url": "https://github.com/larastan/larastan.git",
"reference": "769bc6346a6cce3b823c30eaace33d9c3a0dd40e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/larastan/larastan/zipball/769bc6346a6cce3b823c30eaace33d9c3a0dd40e",
"reference": "769bc6346a6cce3b823c30eaace33d9c3a0dd40e",
"shasum": ""
},
"require": {
"composer/composer": "^1.0 || ^2.0",
"ext-json": "*",
"illuminate/console": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/container": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/contracts": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/database": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/http": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/pipeline": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0",
"mockery/mockery": "^0.9 || ^1.0",
"php": "^7.2 || ^8.0",
"phpstan/phpstan": "^1.0 <1.9",
"symfony/process": "^4.3 || ^5.0 || ^6.0"
},
"require-dev": {
"nikic/php-parser": "^4.13.0",
"orchestra/testbench": "^4.0 || ^5.0 || ^6.0 || ^7.0",
"phpunit/phpunit": "^7.3 || ^8.2 || ^9.3"
},
"suggest": {
"orchestra/testbench": "Using Larastan for analysing a package needs Testbench"
},
"type": "phpstan-extension",
"extra": {
"phpstan": {
"includes": [
"extension.neon"
]
},
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"NunoMaduro\\Larastan\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nuno Maduro",
"email": "enunomaduro@gmail.com"
}
],
"description": "Larastan - Discover bugs in your code without running it. A phpstan/phpstan wrapper for Laravel",
"keywords": [
"PHPStan",
"code analyse",
"code analysis",
"larastan",
"laravel",
"package",
"php",
"static analysis"
],
"support": {
"issues": "https://github.com/larastan/larastan/issues",
"source": "https://github.com/larastan/larastan/tree/1.0.4"
},
"funding": [
{
"url": "https://www.paypal.com/paypalme/enunomaduro",
"type": "custom"
},
{
"url": "https://github.com/canvural",
"type": "github"
},
{
"url": "https://github.com/nunomaduro",
"type": "github"
},
{
"url": "https://www.patreon.com/nunomaduro",
"type": "patreon"
}
],
"abandoned": "larastan/larastan",
"time": "2022-11-09T09:09:31+00:00"
},
{ {
"name": "phar-io/manifest", "name": "phar-io/manifest",
"version": "2.0.4", "version": "2.0.4",
......
includes: includes:
- ./vendor/nunomaduro/larastan/extension.neon - vendor/larastan/larastan/extension.neon
- vendor/nesbot/carbon/extension.neon
parameters: parameters:
paths: paths:
- app - app/
level: 4 # Level 10 is the highest level
level: 5
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment