mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Laravel 10.x Shift (#14995)
* Apply code style * Remove explicit call to register policies * Shift core files * Shift config files * Default config files In an effort to make upgrading the constantly changing config files easier, Shift defaulted them and merged your true customizations - where ENV variables may not be used. * Bump Laravel dependencies * Add type hints for Laravel 10 * Shift cleanup * wip * wip * sync translation * Sync back config * Public Path Binding * QueryException * monolog * db::raw * monolog * db::raw * fix larastan collections * fix phpstan bug looping forever * larastan errors * larastan: fix column type * styleci * initialize array * fixes * fixes --------- Co-authored-by: Shift <shift@laravelshift.com>
This commit is contained in:
@@ -13,7 +13,7 @@ class AlertScheduleFactory extends Factory
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'title' => $this->faker->name(),
|
||||
|
@@ -13,7 +13,7 @@ class BgpPeerFactory extends Factory
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'bgpPeerIdentifier' => $this->faker->ipv4(),
|
||||
|
@@ -13,7 +13,7 @@ class BillFactory extends Factory
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'bill_name' => $this->faker->text(),
|
||||
|
@@ -13,7 +13,7 @@ class ComponentFactory extends Factory
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'device_id' => $this->faker->randomDigit(),
|
||||
|
@@ -13,7 +13,7 @@ class DeviceFactory extends Factory
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'hostname' => $this->faker->domainWord() . '-' . $this->faker->domainWord() . '-' . $this->faker->domainWord() . '.' . $this->faker->domainName(),
|
||||
|
@@ -13,7 +13,7 @@ class DeviceGroupFactory extends Factory
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->domainWord(),
|
||||
|
@@ -16,7 +16,7 @@ class Ipv4AddressFactory extends Factory
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
$prefix = $this->faker->numberBetween(0, 32);
|
||||
$ip = new IPv4($this->faker->ipv4() . '/' . $prefix);
|
||||
|
@@ -13,7 +13,7 @@ class Ipv4NetworkFactory extends Factory
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'ipv4_network' => $this->faker->ipv4() . '/' . $this->faker->numberBetween(0, 32),
|
||||
|
@@ -13,7 +13,7 @@ class LocationFactory extends Factory
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'location' => $this->faker->randomElement([
|
||||
|
@@ -13,7 +13,7 @@ class OspfNbrFactory extends Factory
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->faker->randomDigit(),
|
||||
|
@@ -13,7 +13,7 @@ class OspfPortFactory extends Factory
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->faker->randomDigit(),
|
||||
|
@@ -13,7 +13,7 @@ class PortFactory extends Factory
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'ifIndex' => $this->faker->unique()->numberBetween(),
|
||||
|
@@ -13,7 +13,7 @@ class SensorFactory extends Factory
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
$sensor_class = ['airflow', 'ber', 'charge', 'chromatic_dispersion', 'cooling', 'count', 'current', 'dbm', 'delay', 'eer', 'fanspeed', 'frequency', 'humidity', 'load', 'loss', 'power', 'power_consumed', 'power_factor', 'pressure', 'quality_factor', 'runtime', 'signal', 'snr', 'state', 'temperature', 'voltage', 'waterflow'];
|
||||
$sensor_oid = '.1.3.6.1.4.1.4115.1.4.3.3.' . $this->faker->numberBetween(0, 10) . '.' . $this->faker->numberBetween(0, 10) . '.' . $this->faker->numberBetween(0, 10);
|
||||
|
@@ -15,7 +15,7 @@ class SyslogFactory extends Factory
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
$facilities = ['kern', 'user', 'mail', 'daemon', 'auth', 'syslog', 'lpr', 'news', 'uucp', 'cron', 'authpriv', 'ftp', 'ntp', 'security', 'console', 'solaris-cron', 'local0', 'local1', 'local2', 'local3', 'local4', 'local5', 'local6', 'local7'];
|
||||
$levels = SyslogSeverity::LEVELS;
|
||||
|
@@ -13,7 +13,7 @@ class UserFactory extends Factory
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'auth_type' => 'mysql',
|
||||
|
@@ -14,7 +14,7 @@ class VminfoFactory extends Factory
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'vm_type' => $this->faker->text(16),
|
||||
|
Reference in New Issue
Block a user