PHPStan fixes (#13038)

* PHPStan fixes
mostly type fixes
semi-risky changes in availability map widget, tested a bit

* fix style

* Style fix

* restore spaces stupid editor removed

* fix the rest

* device model back

* remove ignores

* introduce variable
This commit is contained in:
Tony Murray
2021-07-13 16:35:43 -05:00
committed by GitHub
parent c563efd284
commit 58ca5994a1
61 changed files with 323 additions and 441 deletions

View File

@@ -34,9 +34,8 @@ class FgTrapIpsTest extends SnmpTrapTestCase
{
public function testIpsAnomaly()
{
$device = Device::factory()->create();
$ipv4 = Ipv4Address::factory()->make();
$device = Device::factory()->create(); /** @var Device $device */
$ipv4 = Ipv4Address::factory()->make(); /** @var Ipv4Address $ipv4 */
$trapText = "$device->hostname
UDP: [$device->ip]:57602->[192.168.5.5]:162
DISMAN-EVENT-MIB::sysUpTimeInstance 302:12:56:24.81
@@ -56,8 +55,7 @@ FORTINET-FORTIGATE-MIB::fgIpsTrapSigMsg.0 tcp_src_session";
public function testIpsPkgUdate()
{
$device = Device::factory()->create();
$device = Device::factory()->create(); /** @var Device $device */
$trapText = "$device->hostname
UDP: [$device->ip]:57602->[192.168.5.5]:162
DISMAN-EVENT-MIB::sysUpTimeInstance 302:12:56:24.81
@@ -74,9 +72,8 @@ SNMPv2-MIB::sysName.0 $device->hostname";
public function testIpsSignature()
{
$device = Device::factory()->create();
$ipv4 = Ipv4Address::factory()->make();
$device = Device::factory()->create(); /** @var Device $device */
$ipv4 = Ipv4Address::factory()->make(); /** @var Ipv4Address $ipv4 */
$trapText = "$device->hostname
UDP: [$device->ip]:57602->[192.168.5.5]:162
DISMAN-EVENT-MIB::sysUpTimeInstance 302:12:56:24.81