Files
librenms-librenms/database/factories/VminfoFactory.php
T
Tony Murray 58ca5994a1 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
2021-07-13 16:35:43 -05:00

36 lines
981 B
PHP

<?php
namespace Database\Factories;
use App\Models\Vminfo;
use Illuminate\Database\Eloquent\Factories\Factory;
use LibreNMS\Enum\PowerState;
class VminfoFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Vminfo::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'vm_type' => $this->faker->text(16),
'vmwVmVMID' => $this->faker->randomDigit(),
'vmwVmDisplayName' => $this->faker->domainWord . '.' . $this->faker->domainName,
'vmwVmGuestOS' => $this->faker->text(128),
'vmwVmMemSize' => $this->faker->randomDigit(),
'vmwVmCpus' => $this->faker->randomDigit(),
'vmwVmState' => $this->faker->randomElement([PowerState::OFF, PowerState::ON, PowerState::SUSPENDED, PowerState::UNKNOWN]),
];
}
}