Fix a bunch of "Since fakerphp/faker 1.14: Accessing property.." (#14267)

This commit is contained in:
Jellyfrog
2022-09-01 19:31:25 +02:00
committed by GitHub
parent 3e2d7435af
commit 127776e28c
12 changed files with 24 additions and 24 deletions

View File

@@ -23,8 +23,8 @@ class AlertScheduleFactory extends Factory
public function definition()
{
return [
'title' => $this->faker->name,
'notes' => $this->faker->text,
'title' => $this->faker->name(),
'notes' => $this->faker->text(),
'recurring' => 0,
];
}

View File

@@ -23,19 +23,19 @@ class BgpPeerFactory extends Factory
public function definition()
{
return [
'bgpPeerIdentifier' => $this->faker->ipv4,
'bgpLocalAddr' => $this->faker->ipv4,
'bgpPeerRemoteAddr' => $this->faker->ipv4,
'bgpPeerIdentifier' => $this->faker->ipv4(),
'bgpLocalAddr' => $this->faker->ipv4(),
'bgpPeerRemoteAddr' => $this->faker->ipv4(),
'bgpPeerRemoteAs' => $this->faker->numberBetween(1, 65535),
'bgpPeerState' => $this->faker->randomElement(['established', 'idle']),
'astext' => $this->faker->sentence,
'astext' => $this->faker->sentence(),
'bgpPeerAdminStatus' => $this->faker->randomElement(['start', 'stop']),
'bgpPeerInUpdates' => $this->faker->randomDigit(),
'bgpPeerOutUpdates' => $this->faker->randomDigit(),
'bgpPeerInTotalMessages' => $this->faker->randomDigit(),
'bgpPeerOutTotalMessages' => $this->faker->randomDigit(),
'bgpPeerFsmEstablishedTime' => $this->faker->unixTime,
'bgpPeerInUpdateElapsedTime' => $this->faker->unixTime,
'bgpPeerFsmEstablishedTime' => $this->faker->unixTime(),
'bgpPeerInUpdateElapsedTime' => $this->faker->unixTime(),
];
}
}

View File

@@ -23,7 +23,7 @@ class BillFactory extends Factory
public function definition()
{
return [
'bill_name' => $this->faker->text,
'bill_name' => $this->faker->text(),
];
}
}

View File

@@ -23,8 +23,8 @@ class DeviceFactory extends Factory
public function definition()
{
return [
'hostname' => $this->faker->domainWord . '-' . $this->faker->domainWord . '-' . $this->faker->domainWord . '.' . $this->faker->domainName,
'ip' => $this->faker->randomElement([$this->faker->ipv4, $this->faker->ipv6]),
'hostname' => $this->faker->domainWord() . '-' . $this->faker->domainWord() . '-' . $this->faker->domainWord() . '.' . $this->faker->domainName(),
'ip' => $this->faker->randomElement([$this->faker->ipv4(), $this->faker->ipv6()]),
'type' => $this->faker->randomElement([
'appliance',
'camera',

View File

@@ -23,7 +23,7 @@ class DeviceGroupFactory extends Factory
public function definition()
{
return [
'name' => $this->faker->domainWord,
'name' => $this->faker->domainWord(),
'desc' => $this->faker->text(255),
'type' =>'static',
];

View File

@@ -26,7 +26,7 @@ class Ipv4AddressFactory extends Factory
public function definition()
{
$prefix = $this->faker->numberBetween(0, 32);
$ip = new IPv4($this->faker->ipv4 . '/' . $prefix);
$ip = new IPv4($this->faker->ipv4() . '/' . $prefix);
return [
'ipv4_address' => $ip->uncompressed(),

View File

@@ -23,7 +23,7 @@ class Ipv4NetworkFactory extends Factory
public function definition()
{
return [
'ipv4_network' => $this->faker->ipv4 . '/' . $this->faker->numberBetween(0, 32),
'ipv4_network' => $this->faker->ipv4() . '/' . $this->faker->numberBetween(0, 32),
];
}
}

View File

@@ -25,7 +25,7 @@ class LocationFactory extends Factory
return [
'location' => $this->faker->randomElement([
$this->faker->sentence($this->faker->numberBetween(1, 10)),
str_replace("\n", ' ', $this->faker->address),
str_replace("\n", ' ', $this->faker->address()),
]),
];
}
@@ -39,8 +39,8 @@ class LocationFactory extends Factory
{
return $this->state(function (array $attributes) {
return [
'lat' => $this->faker->latitude,
'lng' => $this->faker->longitude,
'lat' => $this->faker->latitude(),
'lng' => $this->faker->longitude(),
];
});
}

View File

@@ -24,9 +24,9 @@ class OspfNbrFactory extends Factory
{
return [
'id' => $this->faker->randomDigit(),
'ospfNbrIpAddr' => $this->faker->ipv4,
'ospfNbrIpAddr' => $this->faker->ipv4(),
'ospfNbrAddressLessIndex' => $this->faker->randomDigit(),
'ospfNbrRtrId' => $this->faker->ipv4,
'ospfNbrRtrId' => $this->faker->ipv4(),
'ospfNbrOptions' => 0,
'ospfNbrPriority' => 1,
'ospfNbrEvents' => $this->faker->randomDigit(),

View File

@@ -25,7 +25,7 @@ class OspfPortFactory extends Factory
return [
'id' => $this->faker->randomDigit(),
'ospf_port_id' => $this->faker->randomDigit(),
'ospfIfIpAddress' => $this->faker->ipv4,
'ospfIfIpAddress' => $this->faker->ipv4(),
'ospfAddressLessIf' => $this->faker->randomDigit(),
'ospfIfAreaId' => '0.0.0.0',
];

View File

@@ -24,9 +24,9 @@ class UserFactory extends Factory
{
return [
'auth_type' => 'mysql',
'username' => $this->faker->unique()->userName,
'realname' => $this->faker->name,
'email' => $this->faker->safeEmail,
'username' => $this->faker->unique()->userName(),
'realname' => $this->faker->name(),
'email' => $this->faker->safeEmail(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'level' => 1,
];

View File

@@ -26,7 +26,7 @@ class VminfoFactory extends Factory
return [
'vm_type' => $this->faker->text(16),
'vmwVmVMID' => $this->faker->randomDigit(),
'vmwVmDisplayName' => $this->faker->domainWord . '.' . $this->faker->domainName,
'vmwVmDisplayName' => $this->faker->domainWord() . '.' . $this->faker->domainName(),
'vmwVmGuestOS' => $this->faker->text(128),
'vmwVmMemSize' => $this->faker->randomDigit(),
'vmwVmCpus' => $this->faker->randomDigit(),