mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
name: Set up PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.0
|
||||
php-version: 7.4
|
||||
tools: composer
|
||||
|
||||
-
|
||||
|
||||
@@ -443,7 +443,7 @@ class IRCBot
|
||||
private function handleCommand()
|
||||
{
|
||||
$this->command = str_replace(':.', '', $this->command);
|
||||
$tmp = explode(':.' . $this->command . ' ', $this->data); /* @phpstan-ignore-line */
|
||||
$tmp = explode(':.' . $this->command . ' ', $this->data);
|
||||
$this->user = $this->getAuthdUser();
|
||||
$this->log('isAuthd-1? ' . $this->isAuthd());
|
||||
if (! $this->isAuthd() && (isset($this->config['irc_auth']))) {
|
||||
|
||||
@@ -651,7 +651,7 @@ class ModuleTestHelper
|
||||
$module_output = [];
|
||||
$module_start = "#### Load $type module ";
|
||||
$module_end = "#### Unload $type module %s ####";
|
||||
$parts = explode($module_start, $output); /* @phpstan-ignore-line */
|
||||
$parts = explode($module_start, $output);
|
||||
array_shift($parts); // throw away first part of output
|
||||
foreach ($parts as $part) {
|
||||
// find the module name
|
||||
|
||||
@@ -101,20 +101,6 @@ class Notification extends Model
|
||||
->where(['notifications_attribs.key' => 'sticky', 'notifications_attribs.value' => 1]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Builder<Notification> $query
|
||||
* @param User $user
|
||||
* @return mixed
|
||||
*/
|
||||
public function scopeIsArchived(Builder $query, User $user)
|
||||
{
|
||||
return $query->leftJoin('notifications_attribs', 'notifications.notifications_id', '=', 'notifications_attribs.notifications_id')
|
||||
->source()
|
||||
->where('notifications_attribs.user_id', $user->user_id)
|
||||
->where(['key' => 'read', 'value' => 1])
|
||||
->limit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Builder<Notification> $query
|
||||
* @return Builder<Notification>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
"laravel/dusk": "^6.15",
|
||||
"mockery/mockery": "^1.4.2",
|
||||
"nunomaduro/collision": "^5.0",
|
||||
"nunomaduro/larastan": "^0.7.4",
|
||||
"nunomaduro/larastan": "^0.7.12",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.1",
|
||||
"phpstan/phpstan-mockery": "^0.12.13",
|
||||
"phpunit/phpunit": "^9.3.3",
|
||||
|
||||
16
composer.lock
generated
16
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "dae39e5a41421453723b043a8a321e35",
|
||||
"content-hash": "20641974e2977b85a492b8cd89fd0fac",
|
||||
"packages": [
|
||||
{
|
||||
"name": "amenadiel/jpgraph",
|
||||
@@ -8688,16 +8688,16 @@
|
||||
},
|
||||
{
|
||||
"name": "nunomaduro/larastan",
|
||||
"version": "v0.7.10",
|
||||
"version": "v0.7.12",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nunomaduro/larastan.git",
|
||||
"reference": "d684efa6f79ff34f3a516efa9db532c861438718"
|
||||
"reference": "b2da312efe88d501aeeb867ba857e8c4198d43c0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nunomaduro/larastan/zipball/d684efa6f79ff34f3a516efa9db532c861438718",
|
||||
"reference": "d684efa6f79ff34f3a516efa9db532c861438718",
|
||||
"url": "https://api.github.com/repos/nunomaduro/larastan/zipball/b2da312efe88d501aeeb867ba857e8c4198d43c0",
|
||||
"reference": "b2da312efe88d501aeeb867ba857e8c4198d43c0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -8713,7 +8713,7 @@
|
||||
"mockery/mockery": "^0.9 || ^1.0",
|
||||
"php": "^7.2 || ^8.0",
|
||||
"phpstan/phpstan": "^0.12.90",
|
||||
"symfony/process": "^4.3 || ^5.0"
|
||||
"symfony/process": "^4.3 || ^5.0 || ^6.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"orchestra/testbench": "^4.0 || ^5.0 || ^6.0 || ^7.0",
|
||||
@@ -8761,7 +8761,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nunomaduro/larastan/issues",
|
||||
"source": "https://github.com/nunomaduro/larastan/tree/v0.7.10"
|
||||
"source": "https://github.com/nunomaduro/larastan/tree/v0.7.12"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -8781,7 +8781,7 @@
|
||||
"type": "patreon"
|
||||
}
|
||||
],
|
||||
"time": "2021-07-07T12:13:19+00:00"
|
||||
"time": "2021-07-26T12:12:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phar-io/manifest",
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Database\Factories;
|
||||
use App\Models\AlertSchedule;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<AlertSchedule> */
|
||||
class AlertScheduleFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Database\Factories;
|
||||
use App\Models\BgpPeer;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<BgpPeer> */
|
||||
class BgpPeerFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Database\Factories;
|
||||
use App\Models\Bill;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<Bill> */
|
||||
class BillFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Database\Factories;
|
||||
use App\Models\Component;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<Component> */
|
||||
class ComponentFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Database\Factories;
|
||||
use App\Models\Device;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<Device> */
|
||||
class DeviceFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Database\Factories;
|
||||
use App\Models\DeviceGroup;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<DeviceGroup> */
|
||||
class DeviceGroupFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -8,6 +8,7 @@ use App\Models\Port;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use LibreNMS\Util\IPv4;
|
||||
|
||||
/** @extends Factory<Ipv4Address> */
|
||||
class Ipv4AddressFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Database\Factories;
|
||||
use App\Models\Ipv4Network;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<Ipv4Network> */
|
||||
class Ipv4NetworkFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Database\Factories;
|
||||
use App\Models\Location;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<Location> */
|
||||
class LocationFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Database\Factories;
|
||||
use App\Models\OspfNbr;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<OspfNbr> */
|
||||
class OspfNbrFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Database\Factories;
|
||||
use App\Models\OspfPort;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<OspfPort> */
|
||||
class OspfPortFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Database\Factories;
|
||||
use App\Models\Port;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<Port> */
|
||||
class PortFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Database\Factories;
|
||||
use App\Models\Sensor;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<Sensor> */
|
||||
class SensorFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -6,6 +6,7 @@ use App\Models\Syslog;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<Syslog> */
|
||||
class SyslogFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Database\Factories;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<User> */
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -6,6 +6,7 @@ use App\Models\Vminfo;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use LibreNMS\Enum\PowerState;
|
||||
|
||||
/** @extends Factory<Vminfo> */
|
||||
class VminfoFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -16,12 +16,12 @@ parameters:
|
||||
path: LibreNMS/Alerting/QueryBuilderParser.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$ldap of function ldap_error expects resource, false given\\.$#"
|
||||
message: "#^Parameter \\#1 \\$link_identifier of function ldap_error expects resource, false given\\.$#"
|
||||
count: 1
|
||||
path: LibreNMS/Authentication/ADAuthorizationAuthorizer.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$ldap of function ldap_error expects resource, false given\\.$#"
|
||||
message: "#^Parameter \\#1 \\$link_identifier of function ldap_error expects resource, false given\\.$#"
|
||||
count: 1
|
||||
path: LibreNMS/Authentication/LdapAuthorizationAuthorizer.php
|
||||
|
||||
@@ -46,12 +46,12 @@ parameters:
|
||||
path: LibreNMS/Authentication/SSOAuthorizer.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$num of function base_convert expects string, int given\\.$#"
|
||||
message: "#^Parameter \\#1 \\$input of function str_pad expects string, int given\\.$#"
|
||||
count: 1
|
||||
path: LibreNMS/Authentication/TwoFactor.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$string of function str_pad expects string, int given\\.$#"
|
||||
message: "#^Parameter \\#1 \\$number of function base_convert expects string, int given\\.$#"
|
||||
count: 1
|
||||
path: LibreNMS/Authentication/TwoFactor.php
|
||||
|
||||
|
||||
Reference in New Issue
Block a user