librenms/phpstan-baseline.neon
eskyuu ce0734ff5d
Added support for user timezones and user browser timezone by default (incomplete) (#13626)
* Added support for user timezones and user browser timezone byt default

* Formatting fixes

* Use the timezone for alert log display

also added validation for the timezone because it's being used in SQL.

* Formatting fixes

* Added return type

* Formatting"

* Update the latency graphs to use the user timezone

* Simplify the web routes config

* Update phpstan to ignore type error

* Fixed up the phpstan config

* Reverse phpstan change

* Re-apply phpstan override

* Remove the option to unset the session timezone

* Formatting fix

* Update outge and event logs to use session timezone

* Fix route for the timezone control

* Made the timezone more dynamic

* Fix a logic error that was stopping the timezone from being set automatically on login

* Prevent getPref from being called twice

* again prevent getPref double call

* getPref double call

* Fixed typo made during merge

* Fixed merge error in phpstan-baseline.neon

* Change spaces to tabs in phpstan-baseline.neon

* Update error count

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-05-09 10:24:48 -05:00

367 lines
12 KiB
Plaintext

parameters:
ignoreErrors:
-
message: "#^Static property LibreNMS\\\\Alert\\\\Transport\\\\Sensu\\:\\:\\$severity is never read, only written\\.$#"
count: 1
path: LibreNMS/Alert/Transport/Sensu.php
-
message: "#^If condition is always false\\.$#"
count: 1
path: LibreNMS/Authentication/MysqlAuthorizer.php
-
message: "#^Parameter \\#2 \\$password of method LibreNMS\\\\Authentication\\\\MysqlAuthorizer\\:\\:addUser\\(\\) expects string, null given\\.$#"
count: 1
path: LibreNMS/Authentication/SSOAuthorizer.php
-
message: "#^Property LibreNMS\\\\Data\\\\Store\\\\Rrd\\:\\:\\$async_process \\(LibreNMS\\\\Proc\\) in isset\\(\\) is not nullable\\.$#"
count: 1
path: LibreNMS/Data/Store/Rrd.php
-
message: "#^Property LibreNMS\\\\Data\\\\Store\\\\Rrd\\:\\:\\$sync_process \\(LibreNMS\\\\Proc\\) in isset\\(\\) is not nullable\\.$#"
count: 1
path: LibreNMS/Data/Store/Rrd.php
-
message: "#^Right side of && is always true\\.$#"
count: 1
path: LibreNMS/Data/Store/Rrd.php
-
message: "#^Parameter \\#1 \\$model of static method LibreNMS\\\\Model\\:\\:onCreate\\(\\) expects static\\(LibreNMS\\\\Device\\\\Processor\\), LibreNMS\\\\Device\\\\Processor given\\.$#"
count: 1
path: LibreNMS/Device/Processor.php
-
message: "#^Parameter \\#1 \\$model of static method LibreNMS\\\\Model\\:\\:onDelete\\(\\) expects static\\(LibreNMS\\\\Device\\\\Processor\\), LibreNMS\\\\Device\\\\Processor given\\.$#"
count: 1
path: LibreNMS/Device/Processor.php
-
message: "#^Unsafe call to private method LibreNMS\\\\Device\\\\Processor\\:\\:pollProcessors\\(\\) through static\\:\\:\\.$#"
count: 1
path: LibreNMS/Device/Processor.php
-
message: "#^Unsafe call to private method LibreNMS\\\\Device\\\\Processor\\:\\:processData\\(\\) through static\\:\\:\\.$#"
count: 3
path: LibreNMS/Device/Processor.php
-
message: "#^Variable \\$lsps might not be defined\\.$#"
count: 1
path: LibreNMS/Modules/Mpls.php
-
message: "#^Variable \\$paths might not be defined\\.$#"
count: 2
path: LibreNMS/Modules/Mpls.php
-
message: "#^Variable \\$sdps might not be defined\\.$#"
count: 1
path: LibreNMS/Modules/Mpls.php
-
message: "#^Variable \\$svcs might not be defined\\.$#"
count: 2
path: LibreNMS/Modules/Mpls.php
-
message: "#^Variable \\$features on left side of \\?\\? is never defined\\.$#"
count: 1
path: LibreNMS/Modules/Os.php
-
message: "#^Variable \\$hardware on left side of \\?\\? is never defined\\.$#"
count: 1
path: LibreNMS/Modules/Os.php
-
message: "#^Variable \\$location in empty\\(\\) always exists and is always falsy\\.$#"
count: 1
path: LibreNMS/Modules/Os.php
-
message: "#^Variable \\$serial on left side of \\?\\? is never defined\\.$#"
count: 1
path: LibreNMS/Modules/Os.php
-
message: "#^Variable \\$version on left side of \\?\\? is never defined\\.$#"
count: 1
path: LibreNMS/Modules/Os.php
-
message: "#^If condition is always true\\.$#"
count: 1
path: LibreNMS/Modules/Ospf.php
-
message: "#^Parameter \\#8 \\$multiplier of class LibreNMS\\\\Device\\\\WirelessSensor constructor expects int, null given\\.$#"
count: 2
path: LibreNMS/OS/ArrisDsr4410md.php
-
message: "#^Variable \\$sensors in empty\\(\\) always exists and is not falsy\\.$#"
count: 1
path: LibreNMS/OS/ArubaInstant.php
-
message: "#^Variable \\$multi_get_array on left side of \\?\\? is never defined\\.$#"
count: 2
path: LibreNMS/OS/Ceraos.php
-
message: "#^Parameter \\#8 \\$warn_percent of static method LibreNMS\\\\Device\\\\Processor\\:\\:discover\\(\\) expects int, null given\\.$#"
count: 1
path: LibreNMS/OS/Comware.php
-
message: "#^Parameter \\#8 \\$multiplier of class LibreNMS\\\\Device\\\\WirelessSensor constructor expects int, null given\\.$#"
count: 3
path: LibreNMS/OS/HarmonyEnhanced.php
-
message: "#^Parameter \\#16 \\$entPhysicalIndex of class LibreNMS\\\\Device\\\\WirelessSensor constructor expects float\\|int\\|null, string given\\.$#"
count: 1
path: LibreNMS/OS/Ios.php
-
message: "#^If condition is always false\\.$#"
count: 1
path: LibreNMS/OS/Shared/Cisco.php
-
message: "#^Parameter \\#8 \\$warn_percent of static method LibreNMS\\\\Device\\\\Processor\\:\\:discover\\(\\) expects int, null given\\.$#"
count: 3
path: LibreNMS/OS/Shared/Cisco.php
-
message: "#^Variable \\$index might not be defined\\.$#"
count: 2
path: LibreNMS/OS/SmOs.php
-
message: "#^Offset 'sonicCurrentConnCac…' does not exist on string\\.$#"
count: 1
path: LibreNMS/OS/Sonicwall.php
-
message: "#^Offset 'sonicMaxConnCacheEn…' does not exist on string\\.$#"
count: 1
path: LibreNMS/OS/Sonicwall.php
-
message: "#^Variable \\$mplsTunnelARHopIndex in isset\\(\\) always exists and is not nullable\\.$#"
count: 2
path: LibreNMS/OS/Timos.php
-
message: "#^Variable \\$mplsTunnelARHopListIndex in isset\\(\\) always exists and is not nullable\\.$#"
count: 2
path: LibreNMS/OS/Timos.php
-
message: "#^Variable \\$sdp_oid in isset\\(\\) always exists and is not nullable\\.$#"
count: 2
path: LibreNMS/OS/Timos.php
-
message: "#^Variable \\$svc_oid in isset\\(\\) always exists and is not nullable\\.$#"
count: 2
path: LibreNMS/OS/Timos.php
-
message: "#^Property LibreNMS\\\\Proc\\:\\:\\$_pipes is never written, only read\\.$#"
count: 1
path: LibreNMS/Proc.php
-
message: "#^If condition is always false\\.$#"
count: 2
path: LibreNMS/Util/CiHelper.php
-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: LibreNMS/Util/Graph.php
-
message: "#^Variable \\$rrd_options in empty\\(\\) always exists and is always falsy\\.$#"
count: 1
path: LibreNMS/Util/Graph.php
-
message: "#^Property LibreNMS\\\\Util\\\\Snmpsim\\:\\:\\$proc \\(LibreNMS\\\\Proc\\) in isset\\(\\) is not nullable\\.$#"
count: 2
path: LibreNMS/Util/Snmpsim.php
-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: LibreNMS/Util/Snmpsim.php
-
message: "#^Property App\\\\Console\\\\Commands\\\\InternalHttpRequest\\:\\:\\$app is never read, only written\\.$#"
count: 1
path: app/Console/Commands/InternalHttpRequest.php
-
message: "#^Called 'Model\\:\\:make\\(\\)' which performs unnecessary work, use 'new Model\\(\\)'\\.$#"
count: 1
path: app/Http/Controllers/DeviceGroupController.php
-
message: "#^Ternary operator condition is always false\\.$#"
count: 1
path: app/Http/Controllers/LegacyController.php
-
message: "#^Variable \\$vars on left side of \\?\\? is never defined\\.$#"
count: 1
path: app/Http/Controllers/LegacyController.php
-
message: "#^Called 'Model\\:\\:make\\(\\)' which performs unnecessary work, use 'new Model\\(\\)'\\.$#"
count: 1
path: app/Http/Controllers/PortGroupController.php
-
message: "#^Call to an undefined static method App\\\\Models\\\\ServiceTemplate\\:\\:hasAccess\\(\\)\\.$#"
count: 1
path: app/Http/Controllers/Select/ServiceTemplateController.php
-
message: "#^Called 'Model\\:\\:make\\(\\)' which performs unnecessary work, use 'new Model\\(\\)'\\.$#"
count: 1
path: app/Http/Controllers/ServiceController.php
-
message: "#^Cannot call method only\\(\\) on array\\<string, string\\>\\.$#"
count: 1
path: app/Http/Controllers/ServiceController.php
-
message: "#^Called 'Model\\:\\:make\\(\\)' which performs unnecessary work, use 'new Model\\(\\)'\\.$#"
count: 1
path: app/Http/Controllers/ServiceTemplateController.php
-
message: "#^Offset 'image_title' on null in empty\\(\\) does not exist\\.$#"
count: 1
path: app/Http/Controllers/Widgets/ImageController.php
-
message: "#^PHPDoc type array of property App\\\\Http\\\\Kernel\\:\\:\\$middlewarePriority is not covariant with PHPDoc type array\\<string\\> of overridden property Illuminate\\\\Foundation\\\\Http\\\\Kernel\\:\\:\\$middlewarePriority\\.$#"
count: 1
path: app/Http/Kernel.php
-
message: "#^Cannot access property \\$password on object\\|string\\.$#"
count: 1
path: app/Http/Requests/UpdateUserRequest.php
-
message: "#^Property App\\\\Jobs\\\\PingCheck\\:\\:\\$deferred is never written, only read\\.$#"
count: 1
path: app/Jobs/PingCheck.php
-
message: "#^Property App\\\\Jobs\\\\PingCheck\\:\\:\\$devices \\(Illuminate\\\\Database\\\\Eloquent\\\\Collection\\) in isset\\(\\) is not nullable\\.$#"
count: 1
path: app/Jobs/PingCheck.php
-
message: "#^Property App\\\\Jobs\\\\PingCheck\\:\\:\\$devices is never written, only read\\.$#"
count: 1
path: app/Jobs/PingCheck.php
-
message: "#^Property App\\\\Jobs\\\\PingCheck\\:\\:\\$groups is never read, only written\\.$#"
count: 1
path: app/Jobs/PingCheck.php
-
message: "#^Property App\\\\Jobs\\\\PingCheck\\:\\:\\$tiered is never written, only read\\.$#"
count: 1
path: app/Jobs/PingCheck.php
-
message: "#^Unreachable statement \\- code above always terminates\\.$#"
count: 1
path: app/Jobs/PingCheck.php
-
message: "#^Access to an undefined property App\\\\Models\\\\DeviceRelatedModel\\:\\:\\$device_id\\.$#"
count: 1
path: app/Models/DeviceRelatedModel.php
-
message: "#^PHPDoc type array of property App\\\\Models\\\\UserPref\\:\\:\\$primaryKey is not covariant with PHPDoc type string of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$primaryKey\\.$#"
count: 1
path: app/Models/UserPref.php
-
message: "#^Result of && is always false\\.$#"
count: 1
path: app/Providers/CliServiceProvider.php
-
message: "#^Right side of && is always false\\.$#"
count: 1
path: app/Providers/CliServiceProvider.php
-
message: "#^Variable \\$username on left side of \\?\\? is never defined\\.$#"
count: 1
path: app/Providers/LegacyUserProvider.php
-
message: "#^Property App\\\\View\\\\SimpleTemplate\\:\\:\\$callback \\(callable\\) on left side of \\?\\? is not nullable\\.$#"
count: 1
path: app/View/SimpleTemplate.php
-
message: "#^Parameter \\#4 \\$transport of function addHost expects string, int given\\.$#"
count: 1
path: tests/AddHostTest.php
-
message: "#^Parameter \\#5 \\$poller_group of function addHost expects string, int given\\.$#"
count: 4
path: tests/AddHostTest.php
-
message: "#^Parameter \\#1 \\$attr of method LibreNMS\\\\Authentication\\\\SSOAuthorizer\\:\\:authSSOGetAttr\\(\\) expects string, int given\\.$#"
count: 2
path: tests/AuthSSOTest.php
-
message: "#^Parameter \\#1 \\$attr of method LibreNMS\\\\Authentication\\\\SSOAuthorizer\\:\\:authSSOGetAttr\\(\\) expects string, null given\\.$#"
count: 2
path: tests/AuthSSOTest.php
-
message: "#^Parameter \\#2 \\$default of function set_null expects null, int given\\.$#"
count: 2
path: tests/CommonFunctionsTest.php
-
message: "#^Parameter \\#1 \\$os of static method LibreNMS\\\\Config\\:\\:getOsSetting\\(\\) expects string, null given\\.$#"
count: 1
path: tests/ConfigTest.php
-
message: "#^Parameter \\#1 \\$new_location of method App\\\\Models\\\\Device\\:\\:setLocation\\(\\) expects App\\\\Models\\\\Location\\|string, null given\\.$#"
count: 1
path: tests/Unit/LocationTest.php
-
message: "#^Parameter \\#1 \\$user of static method App\\\\Models\\\\UserPref\\:\\:getPref\\(\\) expects App\\\\Models\\\\User, Illuminate\\\\Contracts\\\\Auth\\\\Authenticatable given\\.$#"
count: 1
path: app/Providers/LegacyUserProvider.php