diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c8954516ec..6b8baf6b4f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -167,7 +167,7 @@ jobs: mysql -h"127.0.0.1" -P"$PORT" --user=librenms --password=librenms -e 'ALTER DATABASE librenms_phpunit_78hunjuybybh CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;' - name: Setup SQLite - run: sqlite3 storage/testing.sqlite "" + run: sqlite3 database/testing.sqlite "" - name: Artisan serve if: matrix.skip-web-check != '1' diff --git a/LibreNMS/Alert/AlertDB.php b/LibreNMS/Alert/AlertDB.php index 919e9a36a1..363fbe7d22 100644 --- a/LibreNMS/Alert/AlertDB.php +++ b/LibreNMS/Alert/AlertDB.php @@ -83,7 +83,7 @@ class AlertDB //Our first table has no valid glue, append the 'devices' table to it! array_unshift($tables, 'devices'); } - $x = sizeof($tables) - 1; + $x = count($tables) - 1; $i = 0; $join = ''; while ($i < $x) { diff --git a/LibreNMS/Alert/AlertRules.php b/LibreNMS/Alert/AlertRules.php index d42a88ea6a..04b36a48c0 100644 --- a/LibreNMS/Alert/AlertRules.php +++ b/LibreNMS/Alert/AlertRules.php @@ -76,7 +76,7 @@ class AlertRules $qry[$i]['ip'] = inet6_ntop($qry[$i]['ip']); } } - $s = sizeof($qry); + $s = count($qry); if ($s == 0 && $inv === false) { $doalert = false; } elseif ($s > 0 && $inv === false) { diff --git a/LibreNMS/Alert/RunAlerts.php b/LibreNMS/Alert/RunAlerts.php index 4fcd96c237..41516c3e3b 100644 --- a/LibreNMS/Alert/RunAlerts.php +++ b/LibreNMS/Alert/RunAlerts.php @@ -300,8 +300,8 @@ class RunAlerts $chk[$i]['ip'] = inet6_ntop($chk[$i]['ip']); } } - $o = sizeof($alert['details']['rule']); - $n = sizeof($chk); + $o = count($alert['details']['rule']); + $n = count($chk); $ret = 'Alert #' . $alert['id']; $state = AlertState::CLEAR; if ($n > $o) { diff --git a/LibreNMS/Alerting/QueryBuilderFluentParser.php b/LibreNMS/Alerting/QueryBuilderFluentParser.php index a361f73d5c..214e8fa35d 100644 --- a/LibreNMS/Alerting/QueryBuilderFluentParser.php +++ b/LibreNMS/Alerting/QueryBuilderFluentParser.php @@ -25,8 +25,8 @@ namespace LibreNMS\Alerting; -use DB; use Illuminate\Database\Query\Builder; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; use Log; diff --git a/LibreNMS/Authentication/LdapAuthorizationAuthorizer.php b/LibreNMS/Authentication/LdapAuthorizationAuthorizer.php index cf09f5e426..8c4d0fbd9d 100644 --- a/LibreNMS/Authentication/LdapAuthorizationAuthorizer.php +++ b/LibreNMS/Authentication/LdapAuthorizationAuthorizer.php @@ -123,7 +123,7 @@ class LdapAuthorizationAuthorizer extends AuthorizerBase } // Find all defined groups $username is in - $filter = '(&(|(cn=' . join(')(cn=', array_keys(Config::get('auth_ldap_groups'))) . '))(' . Config::get('auth_ldap_groupmemberattr') . '=' . $this->getMembername($username) . '))'; + $filter = '(&(|(cn=' . implode(')(cn=', array_keys(Config::get('auth_ldap_groups'))) . '))(' . Config::get('auth_ldap_groupmemberattr') . '=' . $this->getMembername($username) . '))'; $search = ldap_search($this->ldap_connection, Config::get('auth_ldap_groupbase'), $filter); $entries = ldap_get_entries($this->ldap_connection, $search); diff --git a/LibreNMS/Authentication/LdapAuthorizer.php b/LibreNMS/Authentication/LdapAuthorizer.php index 5459759abc..ee86aa5afe 100644 --- a/LibreNMS/Authentication/LdapAuthorizer.php +++ b/LibreNMS/Authentication/LdapAuthorizer.php @@ -3,6 +3,7 @@ namespace LibreNMS\Authentication; use ErrorException; +use LDAP\Connection; use LibreNMS\Config; use LibreNMS\Exceptions\AuthenticationException; use LibreNMS\Exceptions\LdapMissingException; diff --git a/LibreNMS/Authentication/SSOAuthorizer.php b/LibreNMS/Authentication/SSOAuthorizer.php index 8847e9320c..eac3394756 100644 --- a/LibreNMS/Authentication/SSOAuthorizer.php +++ b/LibreNMS/Authentication/SSOAuthorizer.php @@ -211,7 +211,7 @@ class SSOAuthorizer extends MysqlAuthorizer if (isset($config_map[$value])) { $map = $config_map[$value]; - if (is_integer($map) && $level < $map) { + if (is_int($map) && $level < $map) { $level = $map; } } diff --git a/LibreNMS/Authentication/TwoFactor.php b/LibreNMS/Authentication/TwoFactor.php index ce1b063e4e..3abbf3cb43 100644 --- a/LibreNMS/Authentication/TwoFactor.php +++ b/LibreNMS/Authentication/TwoFactor.php @@ -115,7 +115,7 @@ class TwoFactor $bin = str_split($bin, 5); $ret = ''; $x = -1; - while (++$x < sizeof($bin)) { + while (++$x < count($bin)) { $ret .= self::$base32_enc[(int) base_convert(str_pad($bin[$x], 5, '0'), 2, 10)]; } diff --git a/LibreNMS/Cache/PermissionsCache.php b/LibreNMS/Cache/PermissionsCache.php index eb6640438c..e8646bc607 100644 --- a/LibreNMS/Cache/PermissionsCache.php +++ b/LibreNMS/Cache/PermissionsCache.php @@ -28,8 +28,8 @@ use App\Models\Bill; use App\Models\Device; use App\Models\Port; use App\Models\User; -use DB; use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\DB; use LibreNMS\Config; class PermissionsCache diff --git a/LibreNMS/DB/Eloquent.php b/LibreNMS/DB/Eloquent.php index 1b550eb40f..44157d72d8 100644 --- a/LibreNMS/DB/Eloquent.php +++ b/LibreNMS/DB/Eloquent.php @@ -25,8 +25,8 @@ namespace LibreNMS\DB; -use DB; use Illuminate\Database\Connection; +use Illuminate\Support\Facades\DB; use LibreNMS\Util\Laravel; use PDOException; diff --git a/LibreNMS/DB/Schema.php b/LibreNMS/DB/Schema.php index 8e3220ef4e..9f3997a643 100644 --- a/LibreNMS/DB/Schema.php +++ b/LibreNMS/DB/Schema.php @@ -25,7 +25,7 @@ namespace LibreNMS\DB; -use DB; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; use LibreNMS\Config; use LibreNMS\Util\Version; @@ -349,9 +349,9 @@ class Schema DB::statement("SET TIME_ZONE='+00:00'"); // set timezone to UTC to avoid timezone issues - foreach (DB::connection($connection)->select(DB::raw("SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = '$db_name' ORDER BY TABLE_NAME;")) as $table) { + foreach (DB::connection($connection)->select(DB::raw("SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = '$db_name' ORDER BY TABLE_NAME;")->getValue(DB::connection($connection)->getQueryGrammar())) as $table) { $table = $table->TABLE_NAME; - foreach (DB::connection($connection)->select(DB::raw("SELECT COLUMN_NAME, COLUMN_TYPE, IS_NULLABLE, COLUMN_DEFAULT, EXTRA FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = '$db_name' AND TABLE_NAME='$table' ORDER BY ORDINAL_POSITION")) as $data) { + foreach (DB::connection($connection)->select(DB::raw("SELECT COLUMN_NAME, COLUMN_TYPE, IS_NULLABLE, COLUMN_DEFAULT, EXTRA FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = '$db_name' AND TABLE_NAME='$table' ORDER BY ORDINAL_POSITION")->getValue(DB::connection($connection)->getQueryGrammar())) as $data) { $def = [ 'Field' => $data->COLUMN_NAME, 'Type' => preg_replace('/int\([0-9]+\)/', 'int', $data->COLUMN_TYPE), @@ -371,7 +371,7 @@ class Schema $output[$table]['Columns'][] = $def; } - $keys = DB::connection($connection)->select(DB::raw("SHOW INDEX FROM `$table`")); + $keys = DB::connection($connection)->select(DB::raw("SHOW INDEX FROM `$table`")->getValue(DB::connection($connection)->getQueryGrammar())); usort($keys, function ($a, $b) { return $a->Key_name <=> $b->Key_name; }); @@ -389,7 +389,7 @@ class Schema } } - $create = DB::connection($connection)->select(DB::raw("SHOW CREATE TABLE `$table`"))[0]; + $create = DB::connection($connection)->select(DB::raw("SHOW CREATE TABLE `$table`")->getValue(DB::connection($connection)->getQueryGrammar()))[0]; if (isset($create->{'Create Table'})) { $constraint_regex = '/CONSTRAINT `(?[A-Za-z_0-9]+)` FOREIGN KEY \(`(?[A-Za-z_0-9]+)`\) REFERENCES `(?[A-Za-z_0-9]+)` \(`(?[A-Za-z_0-9]+)`\) ?(?[ A-Z]+)?/'; diff --git a/LibreNMS/Data/Store/InfluxDB.php b/LibreNMS/Data/Store/InfluxDB.php index 22ee76e9b6..b19e6b217f 100644 --- a/LibreNMS/Data/Store/InfluxDB.php +++ b/LibreNMS/Data/Store/InfluxDB.php @@ -28,6 +28,7 @@ namespace LibreNMS\Data\Store; use App\Polling\Measure\Measurement; use InfluxDB\Client; +use InfluxDB\Database; use InfluxDB\Driver\UDP; use LibreNMS\Config; use Log; @@ -37,7 +38,7 @@ class InfluxDB extends BaseDatastore /** @var \InfluxDB\Database */ private $connection; - public function __construct(\InfluxDB\Database $influx) + public function __construct(Database $influx) { parent::__construct(); $this->connection = $influx; diff --git a/LibreNMS/Data/Store/Rrd.php b/LibreNMS/Data/Store/Rrd.php index 6613902f4f..1b80d3f9c3 100644 --- a/LibreNMS/Data/Store/Rrd.php +++ b/LibreNMS/Data/Store/Rrd.php @@ -272,13 +272,13 @@ class Rrd extends BaseDatastore */ public function proxmoxName($pmxcluster, $vmid, $vmport) { - $pmxcdir = join('/', [$this->rrd_dir, 'proxmox', self::safeName($pmxcluster)]); + $pmxcdir = implode('/', [$this->rrd_dir, 'proxmox', self::safeName($pmxcluster)]); // this is not needed for remote rrdcached if (! is_dir($pmxcdir)) { mkdir($pmxcdir, 0775, true); } - return join('/', [$pmxcdir, self::safeName($vmid . '_netif_' . $vmport . '.rrd')]); + return implode('/', [$pmxcdir, self::safeName($vmid . '_netif_' . $vmport . '.rrd')]); } /** diff --git a/LibreNMS/Exceptions/DatabaseConnectException.php b/LibreNMS/Exceptions/DatabaseConnectException.php index b9950bef8d..09040e9186 100644 --- a/LibreNMS/Exceptions/DatabaseConnectException.php +++ b/LibreNMS/Exceptions/DatabaseConnectException.php @@ -26,6 +26,7 @@ namespace LibreNMS\Exceptions; use Illuminate\Database\QueryException; +use Illuminate\Http\Response; use LibreNMS\Interfaces\Exceptions\UpgradeableException; class DatabaseConnectException extends \Exception implements UpgradeableException diff --git a/LibreNMS/Exceptions/InvalidTableColumnException.php b/LibreNMS/Exceptions/InvalidTableColumnException.php index 115845c500..f0c6cd32b0 100644 --- a/LibreNMS/Exceptions/InvalidTableColumnException.php +++ b/LibreNMS/Exceptions/InvalidTableColumnException.php @@ -30,6 +30,6 @@ class InvalidTableColumnException extends ApiException public function __construct( public readonly array $columns ) { - parent::__construct('Invalid columns: ' . join(',', $this->columns)); + parent::__construct('Invalid columns: ' . implode(',', $this->columns)); } } diff --git a/LibreNMS/IRCBot.php b/LibreNMS/IRCBot.php index 5e0c1fdc72..39357c3757 100644 --- a/LibreNMS/IRCBot.php +++ b/LibreNMS/IRCBot.php @@ -150,7 +150,7 @@ class IRCBot } } - return $this->log('Cached ' . sizeof($this->external) . ' commands.'); + return $this->log('Cached ' . count($this->external) . ' commands.'); } //end load_external() @@ -683,7 +683,7 @@ class IRCBot private function ircRaw($params) { - return fputs($this->socket['irc'], $params . "\r\n"); + return fwrite($this->socket['irc'], $params . "\r\n"); } //end irc_raw() @@ -780,9 +780,9 @@ class IRCBot private function _help($params) { - $msg = join(', ', $this->commands); + $msg = implode(', ', $this->commands); if (count($this->external) > 0) { - $msg .= ', ' . join(', ', array_keys($this->external)); + $msg .= ', ' . implode(', ', array_keys($this->external)); } return $this->respond("Available commands: $msg"); diff --git a/LibreNMS/Interfaces/Discovery/SlaDiscovery.php b/LibreNMS/Interfaces/Discovery/SlaDiscovery.php index fb470093e7..683fee7064 100644 --- a/LibreNMS/Interfaces/Discovery/SlaDiscovery.php +++ b/LibreNMS/Interfaces/Discovery/SlaDiscovery.php @@ -25,11 +25,15 @@ namespace LibreNMS\Interfaces\Discovery; +use Illuminate\Support\Collection; + interface SlaDiscovery { /** * Discover additional information about the OS. * Primarily this is just version, hardware, features, serial, but could be anything + * + * @return Collection */ - public function discoverSlas(); + public function discoverSlas(): Collection; } diff --git a/LibreNMS/Interfaces/Polling/IsIsPolling.php b/LibreNMS/Interfaces/Polling/IsIsPolling.php index 0476beb9d1..ad857bf192 100644 --- a/LibreNMS/Interfaces/Polling/IsIsPolling.php +++ b/LibreNMS/Interfaces/Polling/IsIsPolling.php @@ -25,11 +25,13 @@ namespace LibreNMS\Interfaces\Polling; +use Illuminate\Database\Eloquent\Collection; + interface IsIsPolling { /** - * @param \Illuminate\Support\Collection $adjacencies \App\Models\IsIsAdjacency - * @return \Illuminate\Support\Collection \App\Models\IsIsAdjacency + * @param Collection $adjacencies + * @return Collection */ - public function pollIsIs($adjacencies); + public function pollIsIs(Collection $adjacencies); } diff --git a/LibreNMS/Interfaces/Polling/MempoolsPolling.php b/LibreNMS/Interfaces/Polling/MempoolsPolling.php index b05f3a37e3..2440068c8e 100644 --- a/LibreNMS/Interfaces/Polling/MempoolsPolling.php +++ b/LibreNMS/Interfaces/Polling/MempoolsPolling.php @@ -25,11 +25,13 @@ namespace LibreNMS\Interfaces\Polling; +use Illuminate\Database\Eloquent\Collection; + interface MempoolsPolling { /** - * @param \Illuminate\Support\Collection $mempools \App\Models\Mempool - * @return \Illuminate\Support\Collection \App\Models\Mempool + * @param Collection $mempools + * @return Collection */ - public function pollMempools($mempools); + public function pollMempools(Collection $mempools); } diff --git a/LibreNMS/Interfaces/Polling/SlaPolling.php b/LibreNMS/Interfaces/Polling/SlaPolling.php index 6516e6c51f..604bd069ae 100644 --- a/LibreNMS/Interfaces/Polling/SlaPolling.php +++ b/LibreNMS/Interfaces/Polling/SlaPolling.php @@ -32,7 +32,7 @@ interface SlaPolling /** * Poll Sla data for Sla in database. * - * @param Collection $slas + * @param Collection $slas */ - public function pollSlas(Collection $slas); + public function pollSlas(Collection $slas): void; } diff --git a/LibreNMS/OS/ArubaInstant.php b/LibreNMS/OS/ArubaInstant.php index 51ee8d2ada..2cb789d0d2 100644 --- a/LibreNMS/OS/ArubaInstant.php +++ b/LibreNMS/OS/ArubaInstant.php @@ -138,7 +138,7 @@ class ArubaInstant extends OS implements // fetch the MAC addresses of currently connected clients, then count them to get an overall total $client_data = $this->getCacheTable('aiClientMACAddress', $ai_mib); - $total_clients = sizeof($client_data); + $total_clients = count($client_data); $combined_oid = sprintf('%s::%s', $ai_mib, 'aiClientMACAddress'); $oid = snmp_translate($combined_oid, 'ALL', 'arubaos', '-On'); @@ -161,7 +161,7 @@ class ArubaInstant extends OS implements $ai_mib = 'AI-AP-MIB'; $ap_data = $this->getCacheTable('aiAPSerialNum', $ai_mib); - $total_aps = sizeof($ap_data); + $total_aps = count($ap_data); $combined_oid = sprintf('%s::%s', $ai_mib, 'aiAPSerialNum'); $oid = snmp_translate($combined_oid, 'ALL', 'arubaos', '-On'); @@ -311,14 +311,14 @@ class ArubaInstant extends OS implements } } else { // version is lower than 8.4.0.0 - if (! empty($sensors) && sizeof($sensors) == 1) { + if (! empty($sensors) && count($sensors) == 1) { $ai_mib = 'AI-AP-MIB'; $client_data = $this->getCacheTable('aiClientMACAddress', $ai_mib); if (empty($client_data)) { $total_clients = 0; } else { - $total_clients = sizeof($client_data); + $total_clients = count($client_data); } $data[$sensors[0]['sensor_id']] = $total_clients; @@ -339,14 +339,14 @@ class ArubaInstant extends OS implements public function pollWirelessApCount(array $sensors) { $data = []; - if (! empty($sensors) && sizeof($sensors) == 1) { + if (! empty($sensors) && count($sensors) == 1) { $ai_mib = 'AI-AP-MIB'; $ap_data = $this->getCacheTable('aiAPSerialNum', $ai_mib); $total_aps = 0; if (! empty($ap_data)) { - $total_aps = sizeof($ap_data); + $total_aps = count($ap_data); } $data[$sensors[0]['sensor_id']] = $total_aps; diff --git a/LibreNMS/OS/Beagleboard.php b/LibreNMS/OS/Beagleboard.php index 10583dec15..36c95e5a19 100644 --- a/LibreNMS/OS/Beagleboard.php +++ b/LibreNMS/OS/Beagleboard.php @@ -27,8 +27,7 @@ use App\Models\Device; use LibreNMS\Interfaces\Discovery\OSDiscovery; use LibreNMS\OS; -class Beagleboard extends OS implements - OSDiscovery +class Beagleboard extends OS implements OSDiscovery { /** * Retrieve basic information about the OS / device diff --git a/LibreNMS/OS/Iosxe.php b/LibreNMS/OS/Iosxe.php index 7725847a27..96c495466e 100644 --- a/LibreNMS/OS/Iosxe.php +++ b/LibreNMS/OS/Iosxe.php @@ -130,7 +130,7 @@ class Iosxe extends Ciscowlc implements $uptime = SnmpQuery::walk('CISCO-IETF-ISIS-MIB::ciiISAdjLastUpTime')->values(); - return $adjacencies->each(function (IsisAdjacency $adjacency) use ($states, $uptime) { + return $adjacencies->each(function ($adjacency) use ($states, $uptime) { $adjacency->isisISAdjState = $states['CISCO-IETF-ISIS-MIB::ciiISAdjState' . $adjacency->index] ?? $adjacency->isisISAdjState; $adjacency->isisISAdjLastUpTime = $this->parseAdjacencyTime($uptime['CISCO-IETF-ISIS-MIB::ciiISAdjLastUpTime' . $adjacency->index] ?? 0); }); diff --git a/LibreNMS/OS/Junos.php b/LibreNMS/OS/Junos.php index 32f1756e38..7747182529 100644 --- a/LibreNMS/OS/Junos.php +++ b/LibreNMS/OS/Junos.php @@ -70,7 +70,7 @@ class Junos extends \LibreNMS\OS implements SlaDiscovery, OSPolling, SlaPolling } } - public function discoverSlas() + public function discoverSlas(): Collection { $slas = new Collection(); $sla_table = snmpwalk_group($this->getDeviceArray(), 'pingCtlTable', 'DISMAN-PING-MIB', 2, snmpFlags: '-OQUstX'); @@ -96,7 +96,7 @@ class Junos extends \LibreNMS\OS implements SlaDiscovery, OSPolling, SlaPolling return $slas; } - public function pollSlas($slas) + public function pollSlas($slas): void { $device = $this->getDeviceArray(); diff --git a/LibreNMS/OS/Shared/Cisco.php b/LibreNMS/OS/Shared/Cisco.php index ac474a207f..fadb03ed90 100755 --- a/LibreNMS/OS/Shared/Cisco.php +++ b/LibreNMS/OS/Shared/Cisco.php @@ -316,7 +316,7 @@ class Cisco extends OS implements return $processors; } - public function discoverSlas() + public function discoverSlas(): Collection { $slas = new Collection(); @@ -414,7 +414,7 @@ class Cisco extends OS implements return $nac; } - public function pollSlas($slas) + public function pollSlas($slas): void { $device = $this->getDeviceArray(); diff --git a/LibreNMS/OS/Stellar.php b/LibreNMS/OS/Stellar.php index 307cfaf385..743425a618 100644 --- a/LibreNMS/OS/Stellar.php +++ b/LibreNMS/OS/Stellar.php @@ -34,7 +34,7 @@ class Stellar extends OS implements if (empty($client_ws_data)) { $total_clients = 0; } else { - $total_clients = sizeof($client_ws_data); + $total_clients = count($client_ws_data); } $combined_oid = sprintf('%s::%s', $device['hardware'], 'apClientWlanService'); @@ -75,7 +75,7 @@ class Stellar extends OS implements if (empty($client_ws_data)) { $total_clients = 0; } else { - $total_clients = sizeof($client_ws_data); + $total_clients = count($client_ws_data); } foreach ($sensors as $sensor) { diff --git a/LibreNMS/OS/Vrp.php b/LibreNMS/OS/Vrp.php index 116af9f414..9505ce00f9 100644 --- a/LibreNMS/OS/Vrp.php +++ b/LibreNMS/OS/Vrp.php @@ -227,7 +227,7 @@ class Vrp extends OS implements $foundid = 0; - for ($z = 0; $z < sizeof($ap_db); $z++) { + for ($z = 0; $z < count($ap_db); $z++) { if ($ap_db[$z]['name'] == $name && $ap_db[$z]['radio_number'] == $radionum) { $foundid = $ap_db[$z]['accesspoint_id']; $ap_db[$z]['seen'] = 1; @@ -277,7 +277,7 @@ class Vrp extends OS implements }//end foreach 1 }//end foreach 2 - for ($z = 0; $z < sizeof($ap_db); $z++) { + for ($z = 0; $z < count($ap_db); $z++) { if (! isset($ap_db[$z]['seen']) && $ap_db[$z]['deleted'] == 0) { dbUpdate(['deleted' => 1], 'access_points', '`accesspoint_id` = ?', [$ap_db[$z]['accesspoint_id']]); } @@ -482,7 +482,7 @@ class Vrp extends OS implements return $sensors; } - public function discoverSlas() + public function discoverSlas(): Collection { $slas = new Collection(); // Get the index of the last finished test @@ -513,7 +513,7 @@ class Vrp extends OS implements return $slas; } - public function pollSlas($slas) + public function pollSlas($slas): void { $device = $this->getDeviceArray(); diff --git a/LibreNMS/ObjectCache.php b/LibreNMS/ObjectCache.php index 6c1465f60e..81274f3fe0 100644 --- a/LibreNMS/ObjectCache.php +++ b/LibreNMS/ObjectCache.php @@ -100,7 +100,7 @@ class ObjectCache implements ArrayAccess return $GLOBALS['_ObjCache'][$this->obj][$obj]['value']; } else { $GLOBALS['_ObjCache'][$this->obj][$obj]['value'] = dbFetchRows($this->data[$obj]['query'], isset($this->data[$obj]['params']) ? $this->data[$obj]['params'] : []); - if (sizeof($GLOBALS['_ObjCache'][$this->obj][$obj]['value']) == 1 && sizeof($GLOBALS['_ObjCache'][$this->obj][$obj]['value'][0]) == 1) { + if (count($GLOBALS['_ObjCache'][$this->obj][$obj]['value']) == 1 && count($GLOBALS['_ObjCache'][$this->obj][$obj]['value'][0]) == 1) { $GLOBALS['_ObjCache'][$this->obj][$obj]['value'] = current($GLOBALS['_ObjCache'][$this->obj][$obj]['value'][0]); } diff --git a/LibreNMS/Poller.php b/LibreNMS/Poller.php index a001988edd..955b790dce 100644 --- a/LibreNMS/Poller.php +++ b/LibreNMS/Poller.php @@ -31,8 +31,8 @@ use App\Models\Device; use App\Polling\Measure\Measurement; use App\Polling\Measure\MeasurementManager; use Carbon\Carbon; -use DB; use Illuminate\Database\Eloquent\Builder; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; use LibreNMS\Enum\Alert; use LibreNMS\Exceptions\PollerException; @@ -264,8 +264,10 @@ class Poller } elseif ($this->device_spec == 'all') { return $query; } elseif ($this->device_spec == 'even') { + /** @phpstan-ignore-next-line */ return $query->where(DB::raw('device_id % 2'), 0); } elseif ($this->device_spec == 'odd') { + /** @phpstan-ignore-next-line */ return $query->where(DB::raw('device_id % 2'), 1); } elseif (is_numeric($this->device_spec)) { return $query->where('device_id', $this->device_spec); diff --git a/LibreNMS/Util/Stats.php b/LibreNMS/Util/Stats.php index 201dbed04d..bb028c15fc 100644 --- a/LibreNMS/Util/Stats.php +++ b/LibreNMS/Util/Stats.php @@ -26,9 +26,9 @@ namespace LibreNMS\Util; use App\Models\Callback; -use DB; use Illuminate\Database\Query\Builder; use Illuminate\Support\Collection; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; class Stats diff --git a/LibreNMS/Util/Url.php b/LibreNMS/Util/Url.php index 1ceb882740..d67cc1de5c 100644 --- a/LibreNMS/Util/Url.php +++ b/LibreNMS/Util/Url.php @@ -27,6 +27,7 @@ namespace LibreNMS\Util; use App\Models\Device; use App\Models\Port; +use App\Models\Sensor; use Carbon\Carbon; use Carbon\CarbonImmutable; use Illuminate\Support\Facades\Auth; diff --git a/LibreNMS/Util/Version.php b/LibreNMS/Util/Version.php index 4a0e4dc774..33f74d715f 100644 --- a/LibreNMS/Util/Version.php +++ b/LibreNMS/Util/Version.php @@ -25,8 +25,8 @@ namespace LibreNMS\Util; -use DB; use Illuminate\Support\Arr; +use Illuminate\Support\Facades\DB; use LibreNMS\Config; use LibreNMS\DB\Eloquent; use Symfony\Component\Process\Process; diff --git a/LibreNMS/Validations/Database/CheckDatabaseTableNamesCase.php b/LibreNMS/Validations/Database/CheckDatabaseTableNamesCase.php index 407d27637f..91eb2ab640 100644 --- a/LibreNMS/Validations/Database/CheckDatabaseTableNamesCase.php +++ b/LibreNMS/Validations/Database/CheckDatabaseTableNamesCase.php @@ -25,7 +25,7 @@ namespace LibreNMS\Validations\Database; -use DB; +use Illuminate\Support\Facades\DB; use LibreNMS\DB\Eloquent; use LibreNMS\Interfaces\Validation; use LibreNMS\ValidationResult; diff --git a/LibreNMS/Validations/Database/CheckMysqlEngine.php b/LibreNMS/Validations/Database/CheckMysqlEngine.php index 256020d79b..9af7d8b1df 100644 --- a/LibreNMS/Validations/Database/CheckMysqlEngine.php +++ b/LibreNMS/Validations/Database/CheckMysqlEngine.php @@ -25,9 +25,9 @@ namespace LibreNMS\Validations\Database; -use DB; use Illuminate\Database\QueryException; use Illuminate\Support\Collection; +use Illuminate\Support\Facades\DB; use LibreNMS\DB\Eloquent; use LibreNMS\Interfaces\Validation; use LibreNMS\Interfaces\ValidationFixer; diff --git a/LibreNMS/Validations/Database/CheckSchemaStructure.php b/LibreNMS/Validations/Database/CheckSchemaStructure.php index 982e0cd9a1..b1d7a491b2 100644 --- a/LibreNMS/Validations/Database/CheckSchemaStructure.php +++ b/LibreNMS/Validations/Database/CheckSchemaStructure.php @@ -25,8 +25,8 @@ namespace LibreNMS\Validations\Database; -use DB; use Illuminate\Database\QueryException; +use Illuminate\Support\Facades\DB; use LibreNMS\Config; use LibreNMS\DB\Eloquent; use LibreNMS\DB\Schema; diff --git a/LibreNMS/Validations/Poller/CheckRedis.php b/LibreNMS/Validations/Poller/CheckRedis.php index b6709a8071..0fad6bc19b 100644 --- a/LibreNMS/Validations/Poller/CheckRedis.php +++ b/LibreNMS/Validations/Poller/CheckRedis.php @@ -62,7 +62,7 @@ class CheckRedis implements \LibreNMS\Interfaces\Validation private function redisIsAvailable(): bool { try { - Redis::ping(); + Redis::command('ping'); return true; } catch (\Exception $e) { diff --git a/LibreNMS/Validations/System.php b/LibreNMS/Validations/System.php index bed5146deb..be23084874 100644 --- a/LibreNMS/Validations/System.php +++ b/LibreNMS/Validations/System.php @@ -34,7 +34,7 @@ class System extends BaseValidation protected static $RUN_BY_DEFAULT = true; /** - * {@inheritdoc} + * @inheritdoc */ public function validate(Validator $validator): void { diff --git a/app/Application.php b/app/Application.php deleted file mode 100644 index 3462e9b560..0000000000 --- a/app/Application.php +++ /dev/null @@ -1,35 +0,0 @@ -. - * - * @link https://www.librenms.org - * - * @copyright 2018 Tony Murray - * @author Tony Murray - */ - -namespace App; - -class Application extends \Illuminate\Foundation\Application -{ - public function publicPath() - { - // override the public path - return $this->basePath . DIRECTORY_SEPARATOR . 'html'; - } -} diff --git a/app/Console/Commands/SmokepingGenerateCommand.php b/app/Console/Commands/SmokepingGenerateCommand.php index f093ed0051..e2385a8031 100644 --- a/app/Console/Commands/SmokepingGenerateCommand.php +++ b/app/Console/Commands/SmokepingGenerateCommand.php @@ -79,7 +79,7 @@ class SmokepingGenerateCommand extends LnmsCommand $devices = Device::isNotDisabled()->orderBy('type')->orderBy('hostname')->get(); - if (sizeof($devices) < 1) { + if (count($devices) < 1) { $this->error(__('commands.smokeping:generate.no-devices')); return 3; diff --git a/app/Console/Commands/SnmpTranslate.php b/app/Console/Commands/SnmpTranslate.php index 4c08668e7c..cb13dacd76 100644 --- a/app/Console/Commands/SnmpTranslate.php +++ b/app/Console/Commands/SnmpTranslate.php @@ -13,7 +13,7 @@ class SnmpTranslate extends SnmpFetch protected $name = 'snmp:translate'; protected array $oids; - protected function getDevices(): \Illuminate\Support\Collection + protected function getDevices(): Collection { if (empty($this->oids)) { $this->oids = [$this->deviceSpec]; diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 998d9b64c4..939fd1c5ea 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -16,7 +16,7 @@ class Kernel extends ConsoleKernel * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return void */ - protected function schedule(Schedule $schedule) + protected function schedule(Schedule $schedule): void { $this->scheduleMarkWorking($schedule); } @@ -26,7 +26,7 @@ class Kernel extends ConsoleKernel * * @return void */ - protected function commands() + protected function commands(): void { $this->load(__DIR__ . '/Commands'); diff --git a/app/Events/DevicePolled.php b/app/Events/DevicePolled.php index db1072fdc3..22cf06a92f 100644 --- a/app/Events/DevicePolled.php +++ b/app/Events/DevicePolled.php @@ -3,14 +3,12 @@ namespace App\Events; use App\Models\Device; -use Illuminate\Broadcasting\InteractsWithSockets; -use Illuminate\Broadcasting\PrivateChannel; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; class DevicePolled { - use Dispatchable, InteractsWithSockets, SerializesModels; + use Dispatchable, SerializesModels; /** * @var \App\Models\Device @@ -26,14 +24,4 @@ class DevicePolled { $this->device = $device; } - - /** - * Get the channels the event should broadcast on. - * - * @return \Illuminate\Broadcasting\Channel|array - */ - public function broadcastOn() - { - return new PrivateChannel('channel-name'); - } } diff --git a/app/Events/PollingDevice.php b/app/Events/PollingDevice.php index 084642c879..0dafee975f 100644 --- a/app/Events/PollingDevice.php +++ b/app/Events/PollingDevice.php @@ -3,14 +3,12 @@ namespace App\Events; use App\Models\Device; -use Illuminate\Broadcasting\InteractsWithSockets; -use Illuminate\Broadcasting\PrivateChannel; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; class PollingDevice { - use Dispatchable, InteractsWithSockets, SerializesModels; + use Dispatchable, SerializesModels; /** * @var \App\Models\Device @@ -26,14 +24,4 @@ class PollingDevice { $this->device = $device; } - - /** - * Get the channels the event should broadcast on. - * - * @return \Illuminate\Broadcasting\Channel|array - */ - public function broadcastOn() - { - return new PrivateChannel('channel-name'); - } } diff --git a/app/Events/UserCreated.php b/app/Events/UserCreated.php index 49dcf0b046..b970149b4b 100644 --- a/app/Events/UserCreated.php +++ b/app/Events/UserCreated.php @@ -3,13 +3,12 @@ namespace App\Events; use App\Models\User; -use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; class UserCreated { - use Dispatchable, InteractsWithSockets, SerializesModels; + use Dispatchable, SerializesModels; public $user; /** diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index a0a2a8a34a..77ec359ab4 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -3,11 +3,10 @@ namespace App\Http\Controllers; use Illuminate\Foundation\Auth\Access\AuthorizesRequests; -use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Routing\Controller as BaseController; class Controller extends BaseController { - use AuthorizesRequests, DispatchesJobs, ValidatesRequests; + use AuthorizesRequests, ValidatesRequests; } diff --git a/app/Http/Controllers/Device/Tabs/LatencyController.php b/app/Http/Controllers/Device/Tabs/LatencyController.php index 787cfaeb91..28f7a2fc0a 100644 --- a/app/Http/Controllers/Device/Tabs/LatencyController.php +++ b/app/Http/Controllers/Device/Tabs/LatencyController.php @@ -27,7 +27,7 @@ namespace App\Http\Controllers\Device\Tabs; use App\Models\Device; use Carbon\Carbon; -use DB; +use Illuminate\Support\Facades\DB; use LibreNMS\Config; use LibreNMS\Interfaces\UI\DeviceTab; use LibreNMS\Util\Smokeping; diff --git a/app/Http/Controllers/Device/Tabs/ProcessesController.php b/app/Http/Controllers/Device/Tabs/ProcessesController.php index d7a50da2e4..9a4f082835 100644 --- a/app/Http/Controllers/Device/Tabs/ProcessesController.php +++ b/app/Http/Controllers/Device/Tabs/ProcessesController.php @@ -26,7 +26,7 @@ namespace App\Http\Controllers\Device\Tabs; use App\Models\Device; -use DB; +use Illuminate\Support\Facades\DB; use LibreNMS\Interfaces\UI\DeviceTab; class ProcessesController implements DeviceTab diff --git a/app/Http/Controllers/LegacyController.php b/app/Http/Controllers/LegacyController.php index d7b5d5725a..ecf7f787f9 100644 --- a/app/Http/Controllers/LegacyController.php +++ b/app/Http/Controllers/LegacyController.php @@ -72,7 +72,7 @@ class LegacyController extends Controller } // create and set the title - $title = join(' - ', $pagetitle); + $title = implode(' - ', $pagetitle); $html .= ""; } diff --git a/app/Http/Controllers/PaginatedAjaxController.php b/app/Http/Controllers/PaginatedAjaxController.php index 587f871cec..6e3bfbf5f0 100644 --- a/app/Http/Controllers/PaginatedAjaxController.php +++ b/app/Http/Controllers/PaginatedAjaxController.php @@ -53,7 +53,7 @@ abstract class PaginatedAjaxController extends Controller * @param \Illuminate\Http\Request $request * @return \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder */ - abstract protected function baseQuery($request); + abstract protected function baseQuery(\Illuminate\Http\Request $request); /** * @param Paginator $paginator @@ -79,7 +79,7 @@ abstract class PaginatedAjaxController extends Controller * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - protected function searchFields($request) + protected function searchFields(\Illuminate\Http\Request $request) { return []; } @@ -92,7 +92,7 @@ abstract class PaginatedAjaxController extends Controller * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - protected function filterFields($request) + protected function filterFields(\Illuminate\Http\Request $request) { return []; } @@ -105,7 +105,7 @@ abstract class PaginatedAjaxController extends Controller * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - protected function sortFields($request) + protected function sortFields(\Illuminate\Http\Request $request) { return []; } diff --git a/app/Http/Controllers/Table/AlertScheduleController.php b/app/Http/Controllers/Table/AlertScheduleController.php index d636de714c..71acf5fbc0 100644 --- a/app/Http/Controllers/Table/AlertScheduleController.php +++ b/app/Http/Controllers/Table/AlertScheduleController.php @@ -27,7 +27,7 @@ namespace App\Http\Controllers\Table; use App\Models\AlertSchedule; use Carbon\Carbon; -use DB; +use Illuminate\Support\Facades\DB; class AlertScheduleController extends TableController { diff --git a/app/Http/Controllers/Table/MempoolsController.php b/app/Http/Controllers/Table/MempoolsController.php index 6205199fc5..dd95bc6a25 100644 --- a/app/Http/Controllers/Table/MempoolsController.php +++ b/app/Http/Controllers/Table/MempoolsController.php @@ -46,7 +46,7 @@ class MempoolsController extends TableController } /** - * {@inheritdoc} + * @inheritdoc */ protected function baseQuery($request) { diff --git a/app/Http/Controllers/Table/PortsController.php b/app/Http/Controllers/Table/PortsController.php index 266677fd61..4cf91af151 100644 --- a/app/Http/Controllers/Table/PortsController.php +++ b/app/Http/Controllers/Table/PortsController.php @@ -26,9 +26,9 @@ namespace App\Http\Controllers\Table; use App\Models\Port; -use DB; use Illuminate\Database\Eloquent\Builder; use Illuminate\Support\Arr; +use Illuminate\Support\Facades\DB; use LibreNMS\Util\Number; use LibreNMS\Util\Rewrite; use LibreNMS\Util\Url; diff --git a/app/Http/Controllers/Widgets/ComponentStatusController.php b/app/Http/Controllers/Widgets/ComponentStatusController.php index 26a22f733c..3b9311a9f4 100644 --- a/app/Http/Controllers/Widgets/ComponentStatusController.php +++ b/app/Http/Controllers/Widgets/ComponentStatusController.php @@ -26,8 +26,8 @@ namespace App\Http\Controllers\Widgets; use App\Models\Component; -use DB; use Illuminate\Http\Request; +use Illuminate\Support\Facades\DB; use Illuminate\View\View; class ComponentStatusController extends WidgetController diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index ed367491ba..7d07ca8e4f 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -61,13 +61,13 @@ class Kernel extends HttpKernel ]; /** - * The application's route middleware. + * The application's middleware aliases. * - * These middleware may be assigned to groups or used individually. + * Aliases may be used to conveniently assign middleware to routes and groups. * * @var array */ - protected $routeMiddleware = [ + protected $middlewareAliases = [ 'authenticate' => \App\Http\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index 3ade5a7896..236db04d30 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -3,19 +3,19 @@ namespace App\Http\Middleware; use Illuminate\Auth\Middleware\Authenticate as Middleware; +use Illuminate\Http\Request; class Authenticate extends Middleware { /** * Get the path the user should be redirected to when they are not authenticated. - * - * @param \Illuminate\Http\Request $request - * @return string|void */ - protected function redirectTo($request) + protected function redirectTo(Request $request): ?string { if (! $request->expectsJson()) { return route('login'); } + + return null; } } diff --git a/app/Http/Middleware/AuthenticateGraph.php b/app/Http/Middleware/AuthenticateGraph.php index b75ecec7f5..a01b671651 100644 --- a/app/Http/Middleware/AuthenticateGraph.php +++ b/app/Http/Middleware/AuthenticateGraph.php @@ -28,6 +28,7 @@ namespace App\Http\Middleware; use Closure; use Illuminate\Auth\AuthenticationException; use Illuminate\Http\Request; +use Illuminate\Http\Response; use LibreNMS\Config; use LibreNMS\Exceptions\InvalidIpException; use LibreNMS\Util\IP; @@ -48,11 +49,10 @@ class AuthenticateGraph * @param \Illuminate\Http\Request $request * @param \Closure $next * @param string|null $relative - * @return \Illuminate\Http\Response * * @throws \Illuminate\Auth\AuthenticationException */ - public function handle($request, Closure $next, $relative = null) + public function handle(Request $request, Closure $next, $relative = null): Response { // if user is logged in, allow if (\Auth::check()) { diff --git a/app/Http/Middleware/CheckInstalled.php b/app/Http/Middleware/CheckInstalled.php index 29c59ad261..004823f72c 100644 --- a/app/Http/Middleware/CheckInstalled.php +++ b/app/Http/Middleware/CheckInstalled.php @@ -27,7 +27,9 @@ namespace App\Http\Middleware; use Closure; use Illuminate\Auth\Access\AuthorizationException; +use Illuminate\Http\Request; use LibreNMS\Util\EnvHelper; +use Symfony\Component\HttpFoundation\Response; class CheckInstalled { @@ -36,9 +38,8 @@ class CheckInstalled * * @param \Illuminate\Http\Request $request * @param \Closure $next - * @return mixed */ - public function handle($request, Closure $next) + public function handle(Request $request, Closure $next): Response { $installed = ! config('librenms.install') && file_exists(base_path('.env')); $is_install_route = $request->is('install*'); diff --git a/app/Http/Middleware/DenyDemoUser.php b/app/Http/Middleware/DenyDemoUser.php index 79752a15b1..68791c7ccc 100644 --- a/app/Http/Middleware/DenyDemoUser.php +++ b/app/Http/Middleware/DenyDemoUser.php @@ -3,6 +3,8 @@ namespace App\Http\Middleware; use Closure; +use Illuminate\Http\Request; +use Symfony\Component\HttpFoundation\Response; class DenyDemoUser { @@ -11,9 +13,8 @@ class DenyDemoUser * * @param \Illuminate\Http\Request $request * @param \Closure $next - * @return mixed */ - public function handle($request, Closure $next) + public function handle(Request $request, Closure $next): Response { if ($request->user()->isDemo()) { return response()->view('auth.deny-demo'); diff --git a/app/Http/Middleware/EnforceJson.php b/app/Http/Middleware/EnforceJson.php index fb57336025..6ef825108f 100644 --- a/app/Http/Middleware/EnforceJson.php +++ b/app/Http/Middleware/EnforceJson.php @@ -26,6 +26,8 @@ namespace App\Http\Middleware; use Closure; +use Illuminate\Http\Request; +use Symfony\Component\HttpFoundation\Response; class EnforceJson { @@ -34,9 +36,8 @@ class EnforceJson * * @param \Illuminate\Http\Request $request * @param \Closure $next - * @return mixed */ - public function handle($request, Closure $next) + public function handle(Request $request, Closure $next): Response { $request->headers->set('Accept', 'application/json'); diff --git a/app/Http/Middleware/LegacyExternalAuth.php b/app/Http/Middleware/LegacyExternalAuth.php index c0276c9a11..7ad3de058d 100644 --- a/app/Http/Middleware/LegacyExternalAuth.php +++ b/app/Http/Middleware/LegacyExternalAuth.php @@ -4,8 +4,10 @@ namespace App\Http\Middleware; use App\Models\User; use Closure; +use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use LibreNMS\Authentication\LegacyAuth; +use Symfony\Component\HttpFoundation\Response; class LegacyExternalAuth { @@ -14,9 +16,8 @@ class LegacyExternalAuth * * @param \Illuminate\Http\Request $request * @param \Closure $next - * @return mixed */ - public function handle($request, Closure $next, $guard = null) + public function handle(Request $request, Closure $next, $guard = null): Response { if (! Auth::guard($guard)->check()) { // check for get variables diff --git a/app/Http/Middleware/LoadUserPreferences.php b/app/Http/Middleware/LoadUserPreferences.php index 2a5e193fa4..d9ae0b9e2a 100644 --- a/app/Http/Middleware/LoadUserPreferences.php +++ b/app/Http/Middleware/LoadUserPreferences.php @@ -3,7 +3,9 @@ namespace App\Http\Middleware; use Closure; +use Illuminate\Http\Request; use LibreNMS\Config; +use Symfony\Component\HttpFoundation\Response; class LoadUserPreferences { @@ -12,9 +14,8 @@ class LoadUserPreferences * * @param \Illuminate\Http\Request $request * @param \Closure $next - * @return mixed */ - public function handle($request, Closure $next) + public function handle(Request $request, Closure $next): Response { $preferences = ['locale', 'site_style', 'timezone']; $this->loadPreferences($request, $preferences); diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index 693056e8af..86333d46bd 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -6,18 +6,14 @@ use App\Providers\RouteServiceProvider; use Closure; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; +use Symfony\Component\HttpFoundation\Response; class RedirectIfAuthenticated { /** * Handle an incoming request. - * - * @param \Illuminate\Http\Request $request - * @param \Closure $next - * @param string|null ...$guards - * @return mixed */ - public function handle(Request $request, Closure $next, ...$guards) + public function handle(Request $request, Closure $next, string ...$guards): Response { $guards = empty($guards) ? [null] : $guards; diff --git a/app/Http/Middleware/TrustHosts.php b/app/Http/Middleware/TrustHosts.php index b0550cfc7c..c9c58bddce 100644 --- a/app/Http/Middleware/TrustHosts.php +++ b/app/Http/Middleware/TrustHosts.php @@ -9,9 +9,9 @@ class TrustHosts extends Middleware /** * Get the host patterns that should be trusted. * - * @return array + * @return array */ - public function hosts() + public function hosts(): array { return [ $this->allSubdomainsOfApplicationUrl(), diff --git a/app/Http/Middleware/VerifyTwoFactor.php b/app/Http/Middleware/VerifyTwoFactor.php index df6a7c24dc..941e3bdd94 100644 --- a/app/Http/Middleware/VerifyTwoFactor.php +++ b/app/Http/Middleware/VerifyTwoFactor.php @@ -4,8 +4,10 @@ namespace App\Http\Middleware; use App\Models\UserPref; use Closure; +use Illuminate\Http\Request; use Illuminate\Support\Str; use LibreNMS\Config; +use Symfony\Component\HttpFoundation\Response; class VerifyTwoFactor { @@ -14,9 +16,8 @@ class VerifyTwoFactor * * @param \Illuminate\Http\Request $request * @param \Closure $next - * @return mixed */ - public function handle($request, Closure $next) + public function handle(Request $request, Closure $next): Response { // check twofactor if (Config::get('twofactor') === true) { diff --git a/app/Http/Middleware/VerifyUserEnabled.php b/app/Http/Middleware/VerifyUserEnabled.php index 35896fd70c..ce5fe85d6b 100644 --- a/app/Http/Middleware/VerifyUserEnabled.php +++ b/app/Http/Middleware/VerifyUserEnabled.php @@ -5,6 +5,7 @@ namespace App\Http\Middleware; use Closure; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; +use Symfony\Component\HttpFoundation\Response; class VerifyUserEnabled { @@ -13,9 +14,8 @@ class VerifyUserEnabled * * @param \Illuminate\Http\Request $request * @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next - * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse */ - public function handle(Request $request, Closure $next) + public function handle(Request $request, Closure $next): Response { if (Auth::check() && ! Auth::user()->enabled) { Auth::logout(); diff --git a/app/Http/Requests/StoreUserRequest.php b/app/Http/Requests/StoreUserRequest.php index 1aff8eb0c9..7b5f8c456a 100644 --- a/app/Http/Requests/StoreUserRequest.php +++ b/app/Http/Requests/StoreUserRequest.php @@ -15,7 +15,7 @@ class StoreUserRequest extends FormRequest * * @return bool */ - public function authorize() + public function authorize(): bool { return $this->user()->can('create', User::class); } @@ -25,7 +25,7 @@ class StoreUserRequest extends FormRequest * * @return array */ - public function rules() + public function rules(): array { return [ 'username' => [ diff --git a/app/Http/Requests/TwoFactorManagementRequest.php b/app/Http/Requests/TwoFactorManagementRequest.php index 585b0037bc..ce4a6fa249 100644 --- a/app/Http/Requests/TwoFactorManagementRequest.php +++ b/app/Http/Requests/TwoFactorManagementRequest.php @@ -29,12 +29,12 @@ use Illuminate\Foundation\Http\FormRequest; class TwoFactorManagementRequest extends FormRequest { - public function rules() + public function rules(): array { return []; } - public function authorize() + public function authorize(): bool { $user = $this->route()->parameter('user'); $auth_user = auth()->user(); diff --git a/app/Http/Requests/UpdateUserRequest.php b/app/Http/Requests/UpdateUserRequest.php index b33c00d8a6..a119124d6b 100644 --- a/app/Http/Requests/UpdateUserRequest.php +++ b/app/Http/Requests/UpdateUserRequest.php @@ -4,6 +4,7 @@ namespace App\Http\Requests; use Hash; use Illuminate\Foundation\Http\FormRequest; +use Illuminate\Validation\Validator; use LibreNMS\Config; class UpdateUserRequest extends FormRequest @@ -13,7 +14,7 @@ class UpdateUserRequest extends FormRequest * * @return bool */ - public function authorize() + public function authorize(): bool { if ($this->user()->isAdmin()) { return true; @@ -35,7 +36,7 @@ class UpdateUserRequest extends FormRequest * * @return array */ - public function rules() + public function rules(): array { if ($this->user()->isAdmin()) { return [ diff --git a/app/Http/Resources/AlertRule.php b/app/Http/Resources/AlertRule.php index 6e8e0d5f7a..18ba76f9ab 100644 --- a/app/Http/Resources/AlertRule.php +++ b/app/Http/Resources/AlertRule.php @@ -15,9 +15,8 @@ class AlertRule extends JsonResource * Transform the resource into an array. * * @param \Illuminate\Http\Request $request - * @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable */ - public function toArray($request) + public function toArray($request): array { $rule = parent::toArray($request); $rule['devices'] = $this->devices->pluck('device_id')->all(); diff --git a/app/Jobs/PingCheck.php b/app/Jobs/PingCheck.php index ebcc2a1ee4..d03c69f4f9 100644 --- a/app/Jobs/PingCheck.php +++ b/app/Jobs/PingCheck.php @@ -29,7 +29,6 @@ use App\Models\Device; use Carbon\Carbon; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Database\Eloquent\Builder; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; @@ -48,7 +47,7 @@ class PingCheck implements ShouldQueue private $wait; private $rrd_tags; - /** @var \Illuminate\Database\Eloquent\Collection List of devices keyed by hostname */ + /** @var \Illuminate\Database\Eloquent\Collection|null List of devices keyed by hostname */ private $devices; /** @var array List of device group ids to check */ private $groups = []; @@ -93,7 +92,7 @@ class PingCheck implements ShouldQueue * * @return void */ - public function handle() + public function handle(): void { $ping_start = microtime(true); @@ -158,7 +157,6 @@ class PingCheck implements ShouldQueue return $this->devices; } - /** @var Builder $query */ $query = Device::canPing() ->select(['devices.device_id', 'hostname', 'overwrite_ip', 'status', 'status_reason', 'last_ping', 'last_ping_timetaken', 'max_depth']) ->orderBy('max_depth'); @@ -168,8 +166,6 @@ class PingCheck implements ShouldQueue } $this->devices = $query->get()->keyBy(function ($device) { - /** @var Device $device */ - return $device->overwrite_ip ?: $device->hostname; }); @@ -235,7 +231,6 @@ class PingCheck implements ShouldQueue echo "Attempting to record data for $hostname... "; } - /** @var Device $device */ $device = $this->devices->get($hostname); // process the data if this is a standalone device or in the current tier diff --git a/app/Listeners/AuthEventListener.php b/app/Listeners/AuthEventListener.php index ac48712915..d1dbf8ad71 100644 --- a/app/Listeners/AuthEventListener.php +++ b/app/Listeners/AuthEventListener.php @@ -3,9 +3,9 @@ namespace App\Listeners; use App\Models\User; -use DB; use Illuminate\Auth\Events\Login; use Illuminate\Auth\Events\Logout; +use Illuminate\Support\Facades\DB; use Request; class AuthEventListener diff --git a/app/Listeners/CheckAlerts.php b/app/Listeners/CheckAlerts.php index ede5ee2264..02cbf2fd81 100644 --- a/app/Listeners/CheckAlerts.php +++ b/app/Listeners/CheckAlerts.php @@ -24,7 +24,7 @@ class CheckAlerts * @param DevicePolled $event * @return void */ - public function handle(DevicePolled $event) + public function handle(DevicePolled $event): void { Log::info('#### Start Alerts ####'); $start = microtime(true); diff --git a/app/Listeners/LegacyQueryListener.php b/app/Listeners/LegacyQueryListener.php index 365952a609..c19ba20835 100644 --- a/app/Listeners/LegacyQueryListener.php +++ b/app/Listeners/LegacyQueryListener.php @@ -22,7 +22,7 @@ class LegacyQueryListener * @param \Illuminate\Database\Events\StatementPrepared $event * @return void */ - public function handle(StatementPrepared $event) + public function handle(StatementPrepared $event): void { global $PDO_FETCH_ASSOC; diff --git a/app/Listeners/MarkNotificationsRead.php b/app/Listeners/MarkNotificationsRead.php index 97b349c905..a079ca89ea 100644 --- a/app/Listeners/MarkNotificationsRead.php +++ b/app/Listeners/MarkNotificationsRead.php @@ -5,7 +5,7 @@ namespace App\Listeners; use App\Events\UserCreated; use App\Models\Notification; use App\Models\NotificationAttrib; -use DB; +use Illuminate\Support\Facades\DB; class MarkNotificationsRead { @@ -25,7 +25,7 @@ class MarkNotificationsRead * @param UserCreated $event * @return void */ - public function handle(UserCreated $event) + public function handle(UserCreated $event): void { $user = $event->user; // mark pre-existing notifications as read diff --git a/app/Listeners/QueryDebugListener.php b/app/Listeners/QueryDebugListener.php index 8ab946364d..8290cb754d 100644 --- a/app/Listeners/QueryDebugListener.php +++ b/app/Listeners/QueryDebugListener.php @@ -24,7 +24,7 @@ class QueryDebugListener * @param \Illuminate\Database\Events\QueryExecuted $query * @return void */ - public function handle(QueryExecuted $query) + public function handle(QueryExecuted $query): void { if (Debug::queryDebugIsEnabled()) { // collect bindings and make them a little more readable diff --git a/app/Listeners/QueryMetricListener.php b/app/Listeners/QueryMetricListener.php index 75cb889451..b7a659797c 100644 --- a/app/Listeners/QueryMetricListener.php +++ b/app/Listeners/QueryMetricListener.php @@ -24,7 +24,7 @@ class QueryMetricListener * @param \Illuminate\Database\Events\QueryExecuted $event * @return void */ - public function handle(QueryExecuted $event) + public function handle(QueryExecuted $event): void { $type = strtolower(substr($event->sql, 0, strpos($event->sql, ' '))); app(MeasurementManager::class)->recordDb(Measurement::make($type, $event->time ? $event->time / 100 : 0)); diff --git a/app/Listeners/UpdateDeviceGroups.php b/app/Listeners/UpdateDeviceGroups.php index 69cc76f2ca..f18ffb7ea9 100644 --- a/app/Listeners/UpdateDeviceGroups.php +++ b/app/Listeners/UpdateDeviceGroups.php @@ -25,7 +25,7 @@ class UpdateDeviceGroups * @param DevicePolled $event * @return void */ - public function handle(DevicePolled $event) + public function handle(DevicePolled $event): void { Log::info('### Start Device Groups ###'); $dg_start = microtime(true); diff --git a/app/Logging/CliColorFormatter.php b/app/Logging/CliColorFormatter.php index ebf1c4cde9..6032105584 100644 --- a/app/Logging/CliColorFormatter.php +++ b/app/Logging/CliColorFormatter.php @@ -31,10 +31,8 @@ class CliColorFormatter extends \Monolog\Formatter\LineFormatter * @var \Console_Color2 */ private $console_color; - /** - * @var bool - */ - private $console; + + protected bool $console; public function __construct() { @@ -46,15 +44,25 @@ class CliColorFormatter extends \Monolog\Formatter\LineFormatter ); $this->console_color = new \Console_Color2(); - $this->console = \App::runningInConsole(); + $this->console = $this->console ?? \App::runningInConsole(); } - public function format(array $record): string + public function format(\Monolog\LogRecord $record): string { // only format messages where color is enabled - if (isset($record['context']['color']) && $record['context']['color']) { - $record['message'] = $this->console_color->convert($record['message'], $this->console); - unset($record['context']['color']); + if (isset($record->context['color']) && $record->context['color']) { + $context = $record->context; + unset($context['color']); + + $record = new \Monolog\LogRecord( + $record->datetime, + $record->channel, + $record->level, + $this->console_color->convert($record->message, $this->console), + $context, + $record->extra, + $record->formatted, + ); } return parent::format($record); diff --git a/app/Logging/NoColorFormatter.php b/app/Logging/NoColorFormatter.php index b067435358..da0dea3dc7 100644 --- a/app/Logging/NoColorFormatter.php +++ b/app/Logging/NoColorFormatter.php @@ -25,27 +25,7 @@ namespace App\Logging; -class NoColorFormatter extends \Monolog\Formatter\LineFormatter +class NoColorFormatter extends CliColorFormatter { - /** - * @var \Console_Color2 - */ - private $console_color; - - public function __construct() - { - parent::__construct(null, null, true, true); - $this->console_color = new \Console_Color2(); - } - - public function format(array $record): string - { - // only strip messages where color is enabled - if (isset($record['context']['color']) && $record['context']['color']) { - $record['message'] = $this->console_color->convert($record['message'], false); - unset($record['context']['color']); - } - - return parent::format($record); - } + protected bool $console = false; } diff --git a/app/Logging/Reporting/Middleware/AddGitInformation.php b/app/Logging/Reporting/Middleware/AddGitInformation.php index 6b36de4edc..bd667cacb5 100644 --- a/app/Logging/Reporting/Middleware/AddGitInformation.php +++ b/app/Logging/Reporting/Middleware/AddGitInformation.php @@ -31,11 +31,9 @@ use Spatie\FlareClient\Report; class AddGitInformation implements \Spatie\FlareClient\FlareMiddleware\FlareMiddleware { /** - * @param \Spatie\FlareClient\Report $report - * @param callable $next next in the pipeline * @return mixed */ - public function handle(Report $report, $next) + public function handle(Report $report, \Closure $next) { $git = Git::make(180); diff --git a/app/Logging/Reporting/Middleware/CleanContext.php b/app/Logging/Reporting/Middleware/CleanContext.php index 2b16c882f1..ac38ffacf8 100644 --- a/app/Logging/Reporting/Middleware/CleanContext.php +++ b/app/Logging/Reporting/Middleware/CleanContext.php @@ -32,11 +32,9 @@ class CleanContext implements \Spatie\FlareClient\FlareMiddleware\FlareMiddlewar /** * Middleware to remove sensitive data from the context. * - * @param \Spatie\FlareClient\Report $report - * @param callable $next * @return mixed */ - public function handle(Report $report, $next) + public function handle(Report $report, \Closure $next) { try { $report->setApplicationPath(''); diff --git a/app/Logging/Reporting/Middleware/SetGroups.php b/app/Logging/Reporting/Middleware/SetGroups.php index 0cf5228a28..28433777c3 100644 --- a/app/Logging/Reporting/Middleware/SetGroups.php +++ b/app/Logging/Reporting/Middleware/SetGroups.php @@ -33,11 +33,9 @@ class SetGroups implements \Spatie\FlareClient\FlareMiddleware\FlareMiddleware /** * Middleware to set LibreNMS and Tools grouping data * - * @param \Spatie\FlareClient\Report $report - * @param callable $next * @return mixed */ - public function handle(Report $report, $next) + public function handle(Report $report, \Closure $next) { try { $version = Version::get(); diff --git a/app/Logging/Reporting/Middleware/SetInstanceId.php b/app/Logging/Reporting/Middleware/SetInstanceId.php index 1346af9c67..3fedd8b525 100644 --- a/app/Logging/Reporting/Middleware/SetInstanceId.php +++ b/app/Logging/Reporting/Middleware/SetInstanceId.php @@ -30,11 +30,9 @@ class SetInstanceId implements \Spatie\FlareClient\FlareMiddleware\FlareMiddlewa /** * Middleware to add instance ID, piggybacks on the "user id" feature. * - * @param \Spatie\FlareClient\Report $report - * @param callable $next * @return mixed */ - public function handle(Report $report, $next) + public function handle(Report $report, \Closure $next) { try { $user = $report->getGroup('user', []); diff --git a/app/Models/AlertSchedule.php b/app/Models/AlertSchedule.php index aeefbc2da5..f838a1f74d 100644 --- a/app/Models/AlertSchedule.php +++ b/app/Models/AlertSchedule.php @@ -28,10 +28,10 @@ namespace App\Models; use Carbon\Carbon; use Carbon\CarbonImmutable; use Date; -use DB; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\MorphToMany; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; use LibreNMS\Enum\AlertScheduleStatus; diff --git a/app/Models/Port.php b/app/Models/Port.php index 0ef91ea5c1..89a80ec59f 100644 --- a/app/Models/Port.php +++ b/app/Models/Port.php @@ -2,12 +2,12 @@ namespace App\Models; -use DB; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\MorphMany; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; use LibreNMS\Util\Rewrite; use Permissions; diff --git a/app/Notifications/AlertNotification.php b/app/Notifications/AlertNotification.php index a14e8d6b6d..ebdb545c7b 100644 --- a/app/Notifications/AlertNotification.php +++ b/app/Notifications/AlertNotification.php @@ -45,16 +45,15 @@ class AlertNotification extends Notification ->action('Acknowledge', 'alert.acknowledge') ->action('View', 'alert.view') ->options(['TTL' => 2000]) - ->data(['id' => $alert_id]) - // ->badge() - // ->dir() - // ->image() - // ->lang() - // ->renotify() - // ->requireInteraction() - // ->tag() - // ->vibrate() -; + ->data(['id' => $alert_id]); + // ->badge() + // ->dir() + // ->image() + // ->lang() + // ->renotify() + // ->requireInteraction() + // ->tag() + // ->vibrate() } /** diff --git a/app/Observers/MempoolObserver.php b/app/Observers/MempoolObserver.php index b35c49f335..ee7a974f46 100644 --- a/app/Observers/MempoolObserver.php +++ b/app/Observers/MempoolObserver.php @@ -31,7 +31,7 @@ use Rrd; class MempoolObserver extends ModuleModelObserver { /** @param \App\Models\Mempool $model */ - public function updated($model) + public function updated($model): void { parent::updated($model); diff --git a/app/Observers/ModuleModelObserver.php b/app/Observers/ModuleModelObserver.php index 620a26d058..2ea6d66105 100644 --- a/app/Observers/ModuleModelObserver.php +++ b/app/Observers/ModuleModelObserver.php @@ -57,7 +57,7 @@ class ModuleModelObserver /** * @param Eloquent $model */ - public function updated($model) + public function updated($model): void { d_echo('Updated data:', 'U'); d_echo($model->getDirty()); @@ -66,7 +66,7 @@ class ModuleModelObserver /** * @param Eloquent $model */ - public function created($model) + public function created($model): void { echo '+'; } @@ -74,7 +74,7 @@ class ModuleModelObserver /** * @param Eloquent $model */ - public function deleted($model) + public function deleted($model): void { echo '-'; } diff --git a/app/Observers/PackageObserver.php b/app/Observers/PackageObserver.php index 5a005cbc9f..da904e8286 100644 --- a/app/Observers/PackageObserver.php +++ b/app/Observers/PackageObserver.php @@ -14,7 +14,7 @@ class PackageObserver * @param \App\Models\Package $package * @return void */ - public function created(Package $package) + public function created(Package $package): void { Eventlog::log('Package installed: ' . $package, $package->device_id, 'package', 3); Log::info("+ $package"); @@ -26,7 +26,7 @@ class PackageObserver * @param \App\Models\Package $package * @return void */ - public function updated(Package $package) + public function updated(Package $package): void { if ($package->getOriginal('version') !== $package->version || $package->getOriginal('build') !== $package->build) { $message = $package . ' from ' . $package->getOriginal('version') . ($package->getOriginal('build') ? '-' . $package->getOriginal('build') : ''); @@ -41,7 +41,7 @@ class PackageObserver * @param \App\Models\Package $package * @return void */ - public function deleted(Package $package) + public function deleted(Package $package): void { Eventlog::log('Package removed: ' . $package, $package->device_id, 'package', 3); Log::info("- $package"); @@ -53,7 +53,7 @@ class PackageObserver * @param \App\Models\Package $package * @return void */ - public function restored(Package $package) + public function restored(Package $package): void { // } @@ -64,7 +64,7 @@ class PackageObserver * @param \App\Models\Package $package * @return void */ - public function forceDeleted(Package $package) + public function forceDeleted(Package $package): void { // } diff --git a/app/Observers/ServiceObserver.php b/app/Observers/ServiceObserver.php index c40b213cad..d1e19184aa 100644 --- a/app/Observers/ServiceObserver.php +++ b/app/Observers/ServiceObserver.php @@ -12,7 +12,7 @@ class ServiceObserver * @param \App\Models\Service $service * @return void */ - public function created(Service $service) + public function created(Service $service): void { // } @@ -23,7 +23,7 @@ class ServiceObserver * @param \App\Models\Service $service * @return void */ - public function updated(Service $service) + public function updated(Service $service): void { // } @@ -34,7 +34,7 @@ class ServiceObserver * @param \App\Models\Service $service * @return void */ - public function deleted(Service $service) + public function deleted(Service $service): void { // } @@ -45,7 +45,7 @@ class ServiceObserver * @param \App\Models\Service $service * @return void */ - public function restored(Service $service) + public function restored(Service $service): void { // } @@ -56,7 +56,7 @@ class ServiceObserver * @param \App\Models\Service $service * @return void */ - public function forceDeleted(Service $service) + public function forceDeleted(Service $service): void { // } diff --git a/app/Observers/UserObserver.php b/app/Observers/UserObserver.php index 06fa7479bf..f94abe8837 100644 --- a/app/Observers/UserObserver.php +++ b/app/Observers/UserObserver.php @@ -12,7 +12,7 @@ class UserObserver * @param \App\Models\User $user * @return void */ - public function deleted(User $user) + public function deleted(User $user): void { $user->apiTokens()->delete(); $user->notificationAttribs()->delete(); diff --git a/app/Policies/DashboardPolicy.php b/app/Policies/DashboardPolicy.php index 64732c6d18..998cf0ed6a 100644 --- a/app/Policies/DashboardPolicy.php +++ b/app/Policies/DashboardPolicy.php @@ -24,9 +24,8 @@ class DashboardPolicy * Determine whether the user can view any dashboard. * * @param \App\Models\User $user - * @return mixed */ - public function viewAny(User $user) + public function viewAny(User $user): bool { return true; } @@ -36,9 +35,8 @@ class DashboardPolicy * * @param \App\Models\User $user * @param \App\Models\Dashboard $dashboard - * @return mixed */ - public function view(User $user, Dashboard $dashboard) + public function view(User $user, Dashboard $dashboard): bool { return $dashboard->user_id == $user->user_id || $dashboard->access > 0; } @@ -47,9 +45,8 @@ class DashboardPolicy * Determine whether the user can create dashboards. * * @param \App\Models\User $user - * @return mixed */ - public function create(User $user) + public function create(User $user): bool { return true; } @@ -59,9 +56,8 @@ class DashboardPolicy * * @param \App\Models\User $user * @param \App\Models\Dashboard $dashboard - * @return mixed */ - public function update(User $user, Dashboard $dashboard) + public function update(User $user, Dashboard $dashboard): bool { return $dashboard->user_id == $user->user_id || $dashboard->access > 1; } @@ -71,9 +67,8 @@ class DashboardPolicy * * @param \App\Models\User $user * @param \App\Models\Dashboard $dashboard - * @return mixed */ - public function delete(User $user, Dashboard $dashboard) + public function delete(User $user, Dashboard $dashboard): bool { return $dashboard->user_id == $user->user_id || $user->isAdmin(); } @@ -84,7 +79,6 @@ class DashboardPolicy * @param \App\Models\User $user * @param \App\Models\Dashboard $dashboard * @param int $target_user_id - * @return bool */ public function copy(User $user, Dashboard $dashboard, int $target_user_id): bool { diff --git a/app/Policies/DeviceGroupPolicy.php b/app/Policies/DeviceGroupPolicy.php index a59bad2ac9..decef7203f 100644 --- a/app/Policies/DeviceGroupPolicy.php +++ b/app/Policies/DeviceGroupPolicy.php @@ -21,9 +21,8 @@ class DeviceGroupPolicy * Determine whether the user can manage device groups. * * @param \App\Models\User $user - * @return bool */ - public function manage(User $user) + public function manage(User $user): bool { return false; } @@ -33,9 +32,8 @@ class DeviceGroupPolicy * * @param \App\Models\User $user * @param \App\Models\DeviceGroup $deviceGroup - * @return mixed */ - public function view(User $user, DeviceGroup $deviceGroup) + public function view(User $user, DeviceGroup $deviceGroup): bool { return false; } @@ -44,9 +42,8 @@ class DeviceGroupPolicy * Determine whether the user can view any device group. * * @param \App\Models\User $user - * @return mixed */ - public function viewAny(User $user) + public function viewAny(User $user): bool { return false; } @@ -55,9 +52,8 @@ class DeviceGroupPolicy * Determine whether the user can create device groups. * * @param \App\Models\User $user - * @return mixed */ - public function create(User $user) + public function create(User $user): bool { return false; } @@ -67,9 +63,8 @@ class DeviceGroupPolicy * * @param \App\Models\User $user * @param \App\Models\DeviceGroup $deviceGroup - * @return mixed */ - public function update(User $user, DeviceGroup $deviceGroup) + public function update(User $user, DeviceGroup $deviceGroup): bool { return false; } @@ -79,9 +74,8 @@ class DeviceGroupPolicy * * @param \App\Models\User $user * @param \App\Models\DeviceGroup $deviceGroup - * @return mixed */ - public function delete(User $user, DeviceGroup $deviceGroup) + public function delete(User $user, DeviceGroup $deviceGroup): bool { return false; } @@ -91,9 +85,8 @@ class DeviceGroupPolicy * * @param \App\Models\User $user * @param \App\Models\DeviceGroup $deviceGroup - * @return mixed */ - public function restore(User $user, DeviceGroup $deviceGroup) + public function restore(User $user, DeviceGroup $deviceGroup): bool { return false; } @@ -103,9 +96,8 @@ class DeviceGroupPolicy * * @param \App\Models\User $user * @param \App\Models\DeviceGroup $deviceGroup - * @return mixed */ - public function forceDelete(User $user, DeviceGroup $deviceGroup) + public function forceDelete(User $user, DeviceGroup $deviceGroup): bool { return false; } diff --git a/app/Policies/DevicePolicy.php b/app/Policies/DevicePolicy.php index f2e2cc5ec3..4fcae49b68 100644 --- a/app/Policies/DevicePolicy.php +++ b/app/Policies/DevicePolicy.php @@ -15,9 +15,8 @@ class DevicePolicy * Determine whether the user can view any devices. * * @param \App\Models\User $user - * @return mixed */ - public function viewAny(User $user) + public function viewAny(User $user): bool { return $user->hasGlobalRead(); } @@ -27,9 +26,8 @@ class DevicePolicy * * @param \App\Models\User $user * @param \App\Models\Device $device - * @return mixed */ - public function view(User $user, Device $device) + public function view(User $user, Device $device): bool { return $this->viewAny($user) || Permissions::canAccessDevice($device, $user); } @@ -38,9 +36,8 @@ class DevicePolicy * Determine whether the user can create devices. * * @param \App\Models\User $user - * @return mixed */ - public function create(User $user) + public function create(User $user): bool { return $user->hasGlobalAdmin(); } @@ -50,9 +47,8 @@ class DevicePolicy * * @param \App\Models\User $user * @param \App\Models\Device $device - * @return mixed */ - public function update(User $user, Device $device) + public function update(User $user, Device $device): bool { return $user->isAdmin(); } @@ -62,9 +58,8 @@ class DevicePolicy * * @param \App\Models\User $user * @param \App\Models\Device $device - * @return mixed */ - public function delete(User $user, Device $device) + public function delete(User $user, Device $device): bool { return $user->isAdmin(); } @@ -74,9 +69,8 @@ class DevicePolicy * * @param \App\Models\User $user * @param \App\Models\Device $device - * @return mixed */ - public function restore(User $user, Device $device) + public function restore(User $user, Device $device): bool { return $user->hasGlobalAdmin(); } @@ -86,9 +80,8 @@ class DevicePolicy * * @param \App\Models\User $user * @param \App\Models\Device $device - * @return mixed */ - public function forceDelete(User $user, Device $device) + public function forceDelete(User $user, Device $device): bool { return $user->isAdmin(); } @@ -99,9 +92,8 @@ class DevicePolicy * * @param \App\Models\User $user * @param \App\Models\Device $device - * @return mixed */ - public function showConfig(User $user, Device $device) + public function showConfig(User $user, Device $device): bool { return $user->isAdmin(); } @@ -111,9 +103,8 @@ class DevicePolicy * * @param \App\Models\User $user * @param \App\Models\Device $device - * @return mixed */ - public function updateNotes(User $user, Device $device) + public function updateNotes(User $user, Device $device): bool { return $user->isAdmin(); } diff --git a/app/Policies/PollerClusterPolicy.php b/app/Policies/PollerClusterPolicy.php index 9984659398..113da72370 100644 --- a/app/Policies/PollerClusterPolicy.php +++ b/app/Policies/PollerClusterPolicy.php @@ -14,9 +14,8 @@ class PollerClusterPolicy * Determine whether the user can view any poller clusters. * * @param \App\Models\User $user - * @return mixed */ - public function viewAny(User $user) + public function viewAny(User $user): bool { return $user->hasGlobalAdmin(); } @@ -26,22 +25,20 @@ class PollerClusterPolicy * * @param \App\Models\User $user * @param \App\Models\PollerCluster $pollerCluster - * @return mixed */ - public function view(User $user, PollerCluster $pollerCluster) + public function view(User $user, PollerCluster $pollerCluster): bool { - // + return $this->viewAny($user); } /** * Determine whether the user can create poller clusters. * * @param \App\Models\User $user - * @return mixed */ - public function create(User $user) + public function create(User $user): bool { - // + return $this->viewAny($user); } /** @@ -49,9 +46,8 @@ class PollerClusterPolicy * * @param \App\Models\User $user * @param \App\Models\PollerCluster $pollerCluster - * @return mixed */ - public function update(User $user, PollerCluster $pollerCluster) + public function update(User $user, PollerCluster $pollerCluster): bool { return $user->isAdmin(); } @@ -61,9 +57,8 @@ class PollerClusterPolicy * * @param \App\Models\User $user * @param \App\Models\PollerCluster $pollerCluster - * @return mixed */ - public function delete(User $user, PollerCluster $pollerCluster) + public function delete(User $user, PollerCluster $pollerCluster): bool { return $user->isAdmin(); } @@ -73,11 +68,10 @@ class PollerClusterPolicy * * @param \App\Models\User $user * @param \App\Models\PollerCluster $pollerCluster - * @return mixed */ - public function restore(User $user, PollerCluster $pollerCluster) + public function restore(User $user, PollerCluster $pollerCluster): bool { - // + return $this->viewAny($user); } /** @@ -85,20 +79,18 @@ class PollerClusterPolicy * * @param \App\Models\User $user * @param \App\Models\PollerCluster $pollerCluster - * @return mixed */ - public function forceDelete(User $user, PollerCluster $pollerCluster) + public function forceDelete(User $user, PollerCluster $pollerCluster): bool { - // + return $this->viewAny($user); } /** * Determine whether the user can manage the poller cluster. * * @param \App\Models\User $user - * @return mixed */ - public function manage(User $user) + public function manage(User $user): bool { return $user->isAdmin(); } diff --git a/app/Policies/PortPolicy.php b/app/Policies/PortPolicy.php index 8831ef29de..45eea09bdb 100644 --- a/app/Policies/PortPolicy.php +++ b/app/Policies/PortPolicy.php @@ -15,9 +15,8 @@ class PortPolicy * Determine whether the user can view any ports. * * @param \App\Models\User $user - * @return mixed */ - public function viewAny(User $user) + public function viewAny(User $user): bool { return $user->hasGlobalRead(); } @@ -27,9 +26,8 @@ class PortPolicy * * @param \App\Models\User $user * @param \App\Models\Port $port - * @return mixed */ - public function view(User $user, Port $port) + public function view(User $user, Port $port): bool { return $this->viewAny($user) || Permissions::canAccessDevice($port->device_id, $user) || Permissions::canAccessPort($port, $user); } @@ -38,9 +36,8 @@ class PortPolicy * Determine whether the user can create ports. * * @param \App\Models\User $user - * @return mixed */ - public function create(User $user) + public function create(User $user): bool { return false; } @@ -50,9 +47,8 @@ class PortPolicy * * @param \App\Models\User $user * @param \App\Models\Port $port - * @return mixed */ - public function update(User $user, Port $port) + public function update(User $user, Port $port): bool { return $user->hasGlobalAdmin(); } @@ -62,9 +58,8 @@ class PortPolicy * * @param \App\Models\User $user * @param \App\Models\Port $port - * @return mixed */ - public function delete(User $user, Port $port) + public function delete(User $user, Port $port): bool { return $user->hasGlobalAdmin(); } @@ -74,9 +69,8 @@ class PortPolicy * * @param \App\Models\User $user * @param \App\Models\Port $port - * @return mixed */ - public function restore(User $user, Port $port) + public function restore(User $user, Port $port): bool { return $user->hasGlobalAdmin(); } @@ -86,9 +80,8 @@ class PortPolicy * * @param \App\Models\User $user * @param \App\Models\Port $port - * @return mixed */ - public function forceDelete(User $user, Port $port) + public function forceDelete(User $user, Port $port): bool { return $user->hasGlobalAdmin(); } diff --git a/app/Policies/ServiceTemplatePolicy.php b/app/Policies/ServiceTemplatePolicy.php index 1098ddd57c..84862e12ac 100644 --- a/app/Policies/ServiceTemplatePolicy.php +++ b/app/Policies/ServiceTemplatePolicy.php @@ -14,9 +14,8 @@ class ServiceTemplatePolicy * Determine whether the user can view any service templates. * * @param \App\Models\User $user - * @return mixed */ - public function viewAny(User $user) + public function viewAny(User $user): bool { return $user->hasGlobalRead(); } @@ -26,9 +25,8 @@ class ServiceTemplatePolicy * * @param \App\Models\User $user * @param \App\Models\ServiceTemplate $template - * @return mixed */ - public function view(User $user, ServiceTemplate $template) + public function view(User $user, ServiceTemplate $template): bool { return $this->viewAny($user); } @@ -37,9 +35,8 @@ class ServiceTemplatePolicy * Determine whether the user can create service templates. * * @param \App\Models\User $user - * @return mixed */ - public function create(User $user) + public function create(User $user): bool { return $user->hasGlobalAdmin(); } @@ -49,9 +46,8 @@ class ServiceTemplatePolicy * * @param \App\Models\User $user * @param \App\Models\ServiceTemplate $template - * @return mixed */ - public function update(User $user, ServiceTemplate $template) + public function update(User $user, ServiceTemplate $template): bool { return $user->isAdmin(); } @@ -61,9 +57,8 @@ class ServiceTemplatePolicy * * @param \App\Models\User $user * @param \App\Models\ServiceTemplate $template - * @return mixed */ - public function delete(User $user, ServiceTemplate $template) + public function delete(User $user, ServiceTemplate $template): bool { return $user->isAdmin(); } @@ -73,9 +68,8 @@ class ServiceTemplatePolicy * * @param \App\Models\User $user * @param \App\Models\ServiceTemplate $template - * @return mixed */ - public function restore(User $user, ServiceTemplate $template) + public function restore(User $user, ServiceTemplate $template): bool { return $user->hasGlobalAdmin(); } @@ -85,9 +79,8 @@ class ServiceTemplatePolicy * * @param \App\Models\User $user * @param \App\Models\ServiceTemplate $template - * @return mixed */ - public function forceDelete(User $user, ServiceTemplate $template) + public function forceDelete(User $user, ServiceTemplate $template): bool { return $user->isAdmin(); } @@ -98,9 +91,8 @@ class ServiceTemplatePolicy * * @param \App\Models\User $user * @param \App\Models\ServiceTemplate $template - * @return mixed */ - public function showConfig(User $user, ServiceTemplate $template) + public function showConfig(User $user, ServiceTemplate $template): bool { return $user->isAdmin(); } @@ -110,9 +102,8 @@ class ServiceTemplatePolicy * * @param \App\Models\User $user * @param \App\Models\ServiceTemplate $template - * @return mixed */ - public function updateNotes(User $user, ServiceTemplate $template) + public function updateNotes(User $user, ServiceTemplate $template): bool { return $user->isAdmin(); } diff --git a/app/Policies/UserPolicy.php b/app/Policies/UserPolicy.php index 0011df0402..132ff45bea 100644 --- a/app/Policies/UserPolicy.php +++ b/app/Policies/UserPolicy.php @@ -13,9 +13,8 @@ class UserPolicy * Determine whether the user can manage users. * * @param User $user - * @return bool */ - public function manage(User $user) + public function manage(User $user): bool { return $user->isAdmin(); } @@ -25,9 +24,8 @@ class UserPolicy * * @param User $user * @param User $target - * @return bool */ - public function view(User $user, User $target) + public function view(User $user, User $target): bool { return $user->isAdmin() || $target->is($user); } @@ -36,9 +34,8 @@ class UserPolicy * Determine whether the user can view any user. * * @param User $user - * @return mixed */ - public function viewAny(User $user) + public function viewAny(User $user): bool { return $user->isAdmin(); } @@ -47,9 +44,8 @@ class UserPolicy * Determine whether the user can create users. * * @param User $user - * @return bool */ - public function create(User $user) + public function create(User $user): bool { return $user->isAdmin(); } @@ -59,9 +55,8 @@ class UserPolicy * * @param User $user * @param User $target - * @return bool */ - public function update(User $user, User $target) + public function update(User $user, User $target): bool { return $user->isAdmin() || $target->is($user); } @@ -71,9 +66,8 @@ class UserPolicy * * @param User $user * @param User $target - * @return bool */ - public function delete(User $user, User $target) + public function delete(User $user, User $target): bool { return $user->isAdmin(); } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 6066a65de9..88fd4d5cb3 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -20,7 +20,7 @@ class AppServiceProvider extends ServiceProvider * * @return void */ - public function register() + public function register(): void { $this->registerFacades(); $this->registerGeocoder(); @@ -48,7 +48,7 @@ class AppServiceProvider extends ServiceProvider * * @return void */ - public function boot() + public function boot(): void { \Illuminate\Pagination\Paginator::useBootstrap(); diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index ffc8ffde44..cf45f0e5a2 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -29,10 +29,8 @@ class AuthServiceProvider extends ServiceProvider * * @return void */ - public function boot() + public function boot(): void { - $this->registerPolicies(); - Auth::provider('legacy', function ($app, array $config) { return new LegacyUserProvider(); }); diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index 395c518bc4..2be04f5d9d 100644 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -9,10 +9,8 @@ class BroadcastServiceProvider extends ServiceProvider { /** * Bootstrap any application services. - * - * @return void */ - public function boot() + public function boot(): void { Broadcast::routes(); diff --git a/app/Providers/CliServiceProvider.php b/app/Providers/CliServiceProvider.php index a0234a1a9a..5c24f58bfb 100644 --- a/app/Providers/CliServiceProvider.php +++ b/app/Providers/CliServiceProvider.php @@ -6,7 +6,7 @@ use Illuminate\Support\ServiceProvider; class CliServiceProvider extends ServiceProvider { - public function register() + public function register(): void { // Restrict LibreNMS CLI commands if (defined('ARTISAN_BINARY') && ARTISAN_BINARY == 'lnms' && $this->app->environment() == 'production') { diff --git a/app/Providers/ComposerServiceProvider.php b/app/Providers/ComposerServiceProvider.php index 6c695cacfe..2fb5748530 100644 --- a/app/Providers/ComposerServiceProvider.php +++ b/app/Providers/ComposerServiceProvider.php @@ -35,7 +35,7 @@ class ComposerServiceProvider extends ServiceProvider * * @return void */ - public function boot() + public function boot(): void { View::composer('layouts.librenmsv1', \App\Http\ViewComposers\LayoutComposer::class); View::composer('layouts.menu', \App\Http\ViewComposers\MenuComposer::class); @@ -46,7 +46,7 @@ class ComposerServiceProvider extends ServiceProvider * * @return void */ - public function register() + public function register(): void { // } diff --git a/app/Providers/ConfigServiceProvider.php b/app/Providers/ConfigServiceProvider.php index 2b2560639f..b7cd216b0c 100644 --- a/app/Providers/ConfigServiceProvider.php +++ b/app/Providers/ConfigServiceProvider.php @@ -12,7 +12,7 @@ class ConfigServiceProvider extends ServiceProvider * * @return void */ - public function register() + public function register(): void { // } @@ -22,7 +22,7 @@ class ConfigServiceProvider extends ServiceProvider * * @return void */ - public function boot() + public function boot(): void { Config::load(); } diff --git a/app/Providers/DatastoreServiceProvider.php b/app/Providers/DatastoreServiceProvider.php index 1ea545dca7..e62e5e4ab5 100644 --- a/app/Providers/DatastoreServiceProvider.php +++ b/app/Providers/DatastoreServiceProvider.php @@ -41,7 +41,7 @@ class DatastoreServiceProvider extends ServiceProvider 'LibreNMS\Data\Store\Rrd', ]; - public function register() + public function register(): void { // set up bindings foreach ($this->stores as $store) { diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 2ea91fd653..2a7481f0e9 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -40,7 +40,7 @@ class EventServiceProvider extends ServiceProvider * * @return void */ - public function boot() + public function boot(): void { // } @@ -50,7 +50,7 @@ class EventServiceProvider extends ServiceProvider * * @return bool */ - public function shouldDiscoverEvents() + public function shouldDiscoverEvents(): bool { return false; } diff --git a/app/Providers/LegacyUserProvider.php b/app/Providers/LegacyUserProvider.php index bf060ba4ca..188c0b6118 100644 --- a/app/Providers/LegacyUserProvider.php +++ b/app/Providers/LegacyUserProvider.php @@ -26,9 +26,9 @@ namespace App\Providers; use App\Models\User; -use DB; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Contracts\Auth\UserProvider; +use Illuminate\Support\Facades\DB; use LibreNMS\Authentication\LegacyAuth; use LibreNMS\Exceptions\AuthenticationException; use LibreNMS\Util\Debug; @@ -71,7 +71,7 @@ class LegacyUserProvider implements UserProvider * @param string $token * @return \Illuminate\Contracts\Auth\Authenticatable|null */ - public function retrieveByToken($identifier, $token) + public function retrieveByToken($identifier, $token): ?Authenticatable { $user = new User(); $user = $user->where($user->getAuthIdentifierName(), $identifier)->first(); @@ -97,7 +97,7 @@ class LegacyUserProvider implements UserProvider * @param string $token * @return void */ - public function updateRememberToken(Authenticatable $user, $token) + public function updateRememberToken(Authenticatable $user, $token): void { /** @var User $user */ $user->setRememberToken($token); diff --git a/app/Providers/PluginProvider.php b/app/Providers/PluginProvider.php index f20fa6b9c6..81a5fe8497 100644 --- a/app/Providers/PluginProvider.php +++ b/app/Providers/PluginProvider.php @@ -32,7 +32,7 @@ use Illuminate\Support\Str; class PluginProvider extends ServiceProvider { - public function register() + public function register(): void { $this->app->singleton(PluginManager::class, function ($app) { return new PluginManager; diff --git a/app/Providers/SnmptrapProvider.php b/app/Providers/SnmptrapProvider.php index c97d960430..0ab3d33b95 100644 --- a/app/Providers/SnmptrapProvider.php +++ b/app/Providers/SnmptrapProvider.php @@ -13,7 +13,7 @@ class SnmptrapProvider extends ServiceProvider * * @return void */ - public function boot() + public function boot(): void { // } @@ -23,7 +23,7 @@ class SnmptrapProvider extends ServiceProvider * * @return void */ - public function register() + public function register(): void { $this->app->bind(SnmptrapHandler::class, function ($app, $options) { $oid = reset($options); diff --git a/app/Providers/TokenUserProvider.php b/app/Providers/TokenUserProvider.php index 37b769cbd2..d5478e6028 100644 --- a/app/Providers/TokenUserProvider.php +++ b/app/Providers/TokenUserProvider.php @@ -38,7 +38,7 @@ class TokenUserProvider extends LegacyUserProvider implements UserProvider * @param string $token * @return \Illuminate\Contracts\Auth\Authenticatable|null */ - public function retrieveByToken($identifier, $token) + public function retrieveByToken($identifier, $token): ?Authenticatable { return null; } @@ -50,7 +50,7 @@ class TokenUserProvider extends LegacyUserProvider implements UserProvider * @param string $token * @return void */ - public function updateRememberToken(Authenticatable $user, $token) + public function updateRememberToken(Authenticatable $user, $token): void { } diff --git a/bootstrap/app.php b/bootstrap/app.php index ae8c1ee0ca..b1a7868136 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -11,10 +11,12 @@ | */ -$app = new App\Application( +$app = new Illuminate\Foundation\Application( $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__) ); +$app->usePublicPath($app->basePath('html')); + /* |-------------------------------------------------------------------------- | Bind Important Interfaces diff --git a/composer.json b/composer.json index f032f75588..7bc8d5d3c5 100644 --- a/composer.json +++ b/composer.json @@ -28,42 +28,42 @@ "amenadiel/jpgraph": "^4", "clue/socket-raw": "^1.4", "dapphp/radius": "^3.0", - "doctrine/dbal": "^2.13", + "doctrine/dbal": "^3.5", "easybook/geshi": "^1.0.8", "ezyang/htmlpurifier": "^4.8", "fico7489/laravel-pivot": "^3.0", "influxdb/influxdb-php": "^1.15", "justinrainbow/json-schema": "^5.2", - "laravel-notification-channels/webpush": "^7.0", - "laravel/framework": "^9.36", - "laravel/tinker": "^2.7", - "laravel/ui": "^4.0", - "librenms/laravel-vue-i18n-generator": "^0.1.46", - "mews/purifier": "^3.3", - "nunomaduro/laravel-console-summary": "^1.8", + "laravel-notification-channels/webpush": "^7.1", + "laravel/framework": "^10.8", + "laravel/tinker": "^2.8", + "laravel/ui": "^4.2", + "librenms/laravel-vue-i18n-generator": "dev-master", + "mews/purifier": "^3.4", + "nunomaduro/laravel-console-summary": "^1.9", "pear/console_color2": "^0.1", "pear/console_table": "^1.3", "pear/net_dns2": "^1.5", "php-amqplib/php-amqplib": "^3.1", - "php-flasher/flasher-laravel": "^0.9", + "php-flasher/flasher-laravel": "^1.12", "phpmailer/phpmailer": "~6.0", "predis/predis": "^2.0", - "socialiteproviders/manager": "^4.1", - "spatie/laravel-ignition": "^1.4", - "symfony/yaml": "^6.0", + "socialiteproviders/manager": "^4.3", + "spatie/laravel-ignition": "^2.0", + "symfony/yaml": "^6.2", "tecnickcom/tcpdf": "^6.4", "tightenco/ziggy": "^0.9" }, "require-dev": { - "barryvdh/laravel-debugbar": "^3.6", - "barryvdh/laravel-ide-helper": "^2.12", + "barryvdh/laravel-debugbar": "^3.8", + "barryvdh/laravel-ide-helper": "^2.13", "composer/composer": "^2.4", "fakerphp/faker": "^1.9.1", "friendsofphp/php-cs-fixer": "^v3.4", - "laravel/dusk": "^7.1", + "laravel/dusk": "^7.4", "mockery/mockery": "^1.4.4", - "nunomaduro/collision": "^6.3", - "nunomaduro/larastan": "^2.0", + "nunomaduro/collision": "^7.0", + "nunomaduro/larastan": "^2.4", "php-parallel-lint/php-parallel-lint": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-mockery": "^1.0", @@ -153,5 +153,7 @@ "type": "opencollective", "url": "https://opencollective.com/librenms" } - ] + ], + "minimum-stability": "stable", + "prefer-stable": true } diff --git a/composer.lock b/composer.lock index 04c927834f..ce2c71b261 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4a8a1c7d52ce1cb29b37826a53d89804", + "content-hash": "84e26f5bbd383d970a6c19a1b6902a15", "packages": [ { "name": "amenadiel/jpgraph", @@ -80,26 +80,25 @@ }, { "name": "brick/math", - "version": "0.10.2", + "version": "0.11.0", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "459f2781e1a08d52ee56b0b1444086e038561e3f" + "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/459f2781e1a08d52ee56b0b1444086e038561e3f", - "reference": "459f2781e1a08d52ee56b0b1444086e038561e3f", + "url": "https://api.github.com/repos/brick/math/zipball/0ad82ce168c82ba30d1c01ec86116ab52f589478", + "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478", "shasum": "" }, "require": { - "ext-json": "*", - "php": "^7.4 || ^8.0" + "php": "^8.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", "phpunit/phpunit": "^9.0", - "vimeo/psalm": "4.25.0" + "vimeo/psalm": "5.0.0" }, "type": "library", "autoload": { @@ -124,7 +123,7 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.10.2" + "source": "https://github.com/brick/math/tree/0.11.0" }, "funding": [ { @@ -132,7 +131,7 @@ "type": "github" } ], - "time": "2022-08-10T22:54:19+00:00" + "time": "2023-01-15T23:15:59+00:00" }, { "name": "clue/socket-raw", @@ -442,35 +441,39 @@ }, { "name": "doctrine/dbal", - "version": "2.13.9", + "version": "3.6.2", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "c480849ca3ad6706a39c970cdfe6888fa8a058b8" + "reference": "b4bd1cfbd2b916951696d82e57d054394d84864c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/c480849ca3ad6706a39c970cdfe6888fa8a058b8", - "reference": "c480849ca3ad6706a39c970cdfe6888fa8a058b8", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/b4bd1cfbd2b916951696d82e57d054394d84864c", + "reference": "b4bd1cfbd2b916951696d82e57d054394d84864c", "shasum": "" }, "require": { - "doctrine/cache": "^1.0|^2.0", + "composer-runtime-api": "^2", + "doctrine/cache": "^1.11|^2.0", "doctrine/deprecations": "^0.5.3|^1", - "doctrine/event-manager": "^1.0", - "ext-pdo": "*", - "php": "^7.1 || ^8" + "doctrine/event-manager": "^1|^2", + "php": "^7.4 || ^8.0", + "psr/cache": "^1|^2|^3", + "psr/log": "^1|^2|^3" }, "require-dev": { - "doctrine/coding-standard": "9.0.0", - "jetbrains/phpstorm-stubs": "2021.1", - "phpstan/phpstan": "1.4.6", - "phpunit/phpunit": "^7.5.20|^8.5|9.5.16", - "psalm/plugin-phpunit": "0.16.1", - "squizlabs/php_codesniffer": "3.6.2", - "symfony/cache": "^4.4", - "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", - "vimeo/psalm": "4.22.0" + "doctrine/coding-standard": "11.1.0", + "fig/log-test": "^1", + "jetbrains/phpstorm-stubs": "2022.3", + "phpstan/phpstan": "1.10.9", + "phpstan/phpstan-strict-rules": "^1.5", + "phpunit/phpunit": "9.6.6", + "psalm/plugin-phpunit": "0.18.4", + "squizlabs/php_codesniffer": "3.7.2", + "symfony/cache": "^5.4|^6.0", + "symfony/console": "^4.4|^5.4|^6.0", + "vimeo/psalm": "4.30.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -481,7 +484,7 @@ "type": "library", "autoload": { "psr-4": { - "Doctrine\\DBAL\\": "lib/Doctrine/DBAL" + "Doctrine\\DBAL\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -524,14 +527,13 @@ "queryobject", "sasql", "sql", - "sqlanywhere", "sqlite", "sqlserver", "sqlsrv" ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/2.13.9" + "source": "https://github.com/doctrine/dbal/tree/3.6.2" }, "funding": [ { @@ -547,7 +549,7 @@ "type": "tidelift" } ], - "time": "2022-05-02T20:28:55+00:00" + "time": "2023-04-14T07:25:38+00:00" }, { "name": "doctrine/deprecations", @@ -594,30 +596,29 @@ }, { "name": "doctrine/event-manager", - "version": "1.2.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/event-manager.git", - "reference": "95aa4cb529f1e96576f3fda9f5705ada4056a520" + "reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/event-manager/zipball/95aa4cb529f1e96576f3fda9f5705ada4056a520", - "reference": "95aa4cb529f1e96576f3fda9f5705ada4056a520", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/750671534e0241a7c50ea5b43f67e23eb5c96f32", + "reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32", "shasum": "" }, "require": { - "doctrine/deprecations": "^0.5.3 || ^1", - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "conflict": { "doctrine/common": "<2.9" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^10", - "phpstan/phpstan": "~1.4.10 || ^1.8.8", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.24" + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.8.8", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^4.28" }, "type": "library", "autoload": { @@ -666,7 +667,7 @@ ], "support": { "issues": "https://github.com/doctrine/event-manager/issues", - "source": "https://github.com/doctrine/event-manager/tree/1.2.0" + "source": "https://github.com/doctrine/event-manager/tree/2.0.0" }, "funding": [ { @@ -682,7 +683,7 @@ "type": "tidelift" } ], - "time": "2022-10-12T20:51:15+00:00" + "time": "2022-10-12T20:59:15+00:00" }, { "name": "doctrine/inflector", @@ -1279,22 +1280,22 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.5.0", + "version": "7.7.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", - "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5", + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.9 || ^2.4", + "guzzlehttp/promises": "^1.5.3 || ^2.0", + "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -1305,7 +1306,8 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", - "php-http/client-integration-tests": "^3.0", + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, @@ -1319,9 +1321,6 @@ "bamarni-bin": { "bin-links": true, "forward-command": false - }, - "branch-alias": { - "dev-master": "7.5-dev" } }, "autoload": { @@ -1387,7 +1386,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.5.0" + "source": "https://github.com/guzzle/guzzle/tree/7.7.0" }, "funding": [ { @@ -1403,38 +1402,37 @@ "type": "tidelift" } ], - "time": "2022-08-28T15:39:27+00:00" + "time": "2023-05-21T14:04:53+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.2", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "b94b2807d85443f9719887892882d0329d1e2598" + "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", - "reference": "b94b2807d85443f9719887892882d0329d1e2598", + "url": "https://api.github.com/repos/guzzle/promises/zipball/3a494dc7dc1d7d12e511890177ae2d0e6c107da6", + "reference": "3a494dc7dc1d7d12e511890177ae2d0e6c107da6", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Promise\\": "src/" } @@ -1471,7 +1469,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.2" + "source": "https://github.com/guzzle/promises/tree/2.0.0" }, "funding": [ { @@ -1487,7 +1485,7 @@ "type": "tidelift" } ], - "time": "2022-08-28T14:55:35+00:00" + "time": "2023-05-21T13:50:22+00:00" }, { "name": "guzzlehttp/psr7", @@ -1886,20 +1884,21 @@ }, { "name": "laravel/framework", - "version": "v9.52.5", + "version": "v10.11.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "e14d28c0f9403630d13f308bb43f3d3cb73d6d67" + "reference": "21a5b6d9b669f32c10cc8ba776511b5f62599fea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/e14d28c0f9403630d13f308bb43f3d3cb73d6d67", - "reference": "e14d28c0f9403630d13f308bb43f3d3cb73d6d67", + "url": "https://api.github.com/repos/laravel/framework/zipball/21a5b6d9b669f32c10cc8ba776511b5f62599fea", + "reference": "21a5b6d9b669f32c10cc8ba776511b5f62599fea", "shasum": "" }, "require": { "brick/math": "^0.9.3|^0.10.2|^0.11", + "composer-runtime-api": "^2.2", "doctrine/inflector": "^2.0.5", "dragonmantank/cron-expression": "^3.3.2", "egulias/email-validator": "^3.2.1|^4.0", @@ -1912,28 +1911,28 @@ "ext-tokenizer": "*", "fruitcake/php-cors": "^1.2", "guzzlehttp/uri-template": "^1.0", - "laravel/serializable-closure": "^1.2.2", + "laravel/serializable-closure": "^1.3", "league/commonmark": "^2.2.1", "league/flysystem": "^3.8.0", - "monolog/monolog": "^2.0", + "monolog/monolog": "^3.0", "nesbot/carbon": "^2.62.1", "nunomaduro/termwind": "^1.13", - "php": "^8.0.2", + "php": "^8.1", "psr/container": "^1.1.1|^2.0.1", "psr/log": "^1.0|^2.0|^3.0", "psr/simple-cache": "^1.0|^2.0|^3.0", "ramsey/uuid": "^4.7", - "symfony/console": "^6.0.9", - "symfony/error-handler": "^6.0", - "symfony/finder": "^6.0", - "symfony/http-foundation": "^6.0", - "symfony/http-kernel": "^6.0", - "symfony/mailer": "^6.0", - "symfony/mime": "^6.0", - "symfony/process": "^6.0", - "symfony/routing": "^6.0", - "symfony/uid": "^6.0", - "symfony/var-dumper": "^6.0", + "symfony/console": "^6.2", + "symfony/error-handler": "^6.2", + "symfony/finder": "^6.2", + "symfony/http-foundation": "^6.2", + "symfony/http-kernel": "^6.2", + "symfony/mailer": "^6.2", + "symfony/mime": "^6.2", + "symfony/process": "^6.2", + "symfony/routing": "^6.2", + "symfony/uid": "^6.2", + "symfony/var-dumper": "^6.2", "tijsverkoyen/css-to-inline-styles": "^2.2.5", "vlucas/phpdotenv": "^5.4.1", "voku/portable-ascii": "^2.0" @@ -1969,6 +1968,7 @@ "illuminate/notifications": "self.version", "illuminate/pagination": "self.version", "illuminate/pipeline": "self.version", + "illuminate/process": "self.version", "illuminate/queue": "self.version", "illuminate/redis": "self.version", "illuminate/routing": "self.version", @@ -1982,7 +1982,7 @@ "require-dev": { "ably/ably-php": "^1.0", "aws/aws-sdk-php": "^3.235.5", - "doctrine/dbal": "^2.13.3|^3.1.4", + "doctrine/dbal": "^3.5.1", "ext-gmp": "*", "fakerphp/faker": "^1.21", "guzzlehttp/guzzle": "^7.5", @@ -1992,20 +1992,20 @@ "league/flysystem-read-only": "^3.3", "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.5.1", - "orchestra/testbench-core": "^7.16", + "orchestra/testbench-core": "^8.4", "pda/pheanstalk": "^4.0", "phpstan/phpdoc-parser": "^1.15", "phpstan/phpstan": "^1.4.7", - "phpunit/phpunit": "^9.5.8", - "predis/predis": "^1.1.9|^2.0.2", - "symfony/cache": "^6.0", - "symfony/http-client": "^6.0" + "phpunit/phpunit": "^10.0.7", + "predis/predis": "^2.0.2", + "symfony/cache": "^6.2", + "symfony/http-client": "^6.2.4" }, "suggest": { "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.235.5).", "brianium/paratest": "Required to run tests in parallel (^6.0).", - "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.4).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (^3.5.1).", "ext-apcu": "Required to use the APC cache driver.", "ext-fileinfo": "Required to use the Filesystem class.", "ext-ftp": "Required to use the Flysystem FTP driver.", @@ -2027,21 +2027,21 @@ "mockery/mockery": "Required to use mocking (^1.5.1).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", - "phpunit/phpunit": "Required to use assertions and run tests (^9.5.8).", - "predis/predis": "Required to use the predis connector (^1.1.9|^2.0.2).", + "phpunit/phpunit": "Required to use assertions and run tests (^9.5.8|^10.0.7).", + "predis/predis": "Required to use the predis connector (^2.0.2).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^6.0).", - "symfony/filesystem": "Required to enable support for relative symbolic links (^6.0).", - "symfony/http-client": "Required to enable support for the Symfony API mail transports (^6.0).", - "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^6.0).", - "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^6.2).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^6.2).", + "symfony/http-client": "Required to enable support for the Symfony API mail transports (^6.2).", + "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^6.2).", + "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.2).", "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "9.x-dev" + "dev-master": "10.x-dev" } }, "autoload": { @@ -2080,7 +2080,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-03-28T18:03:54+00:00" + "time": "2023-05-16T13:59:23+00:00" }, { "name": "laravel/serializable-closure", @@ -2281,16 +2281,16 @@ }, { "name": "laravel/ui", - "version": "v4.2.1", + "version": "v4.2.2", "source": { "type": "git", "url": "https://github.com/laravel/ui.git", - "reference": "05ff7ac1eb55e2dfd10edcfb18c953684d693907" + "reference": "a58ec468db4a340b33f3426c778784717a2c144b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/ui/zipball/05ff7ac1eb55e2dfd10edcfb18c953684d693907", - "reference": "05ff7ac1eb55e2dfd10edcfb18c953684d693907", + "url": "https://api.github.com/repos/laravel/ui/zipball/a58ec468db4a340b33f3426c778784717a2c144b", + "reference": "a58ec468db4a340b33f3426c778784717a2c144b", "shasum": "" }, "require": { @@ -2337,9 +2337,9 @@ "ui" ], "support": { - "source": "https://github.com/laravel/ui/tree/v4.2.1" + "source": "https://github.com/laravel/ui/tree/v4.2.2" }, - "time": "2023-02-17T09:17:24+00:00" + "time": "2023-05-09T19:47:28+00:00" }, { "name": "league/commonmark", @@ -2531,19 +2531,20 @@ }, { "name": "league/flysystem", - "version": "3.12.3", + "version": "3.15.1", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "81e87e74dd5213795c7846d65089712d2dda90ce" + "reference": "a141d430414fcb8bf797a18716b09f759a385bed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/81e87e74dd5213795c7846d65089712d2dda90ce", - "reference": "81e87e74dd5213795c7846d65089712d2dda90ce", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a141d430414fcb8bf797a18716b09f759a385bed", + "reference": "a141d430414fcb8bf797a18716b09f759a385bed", "shasum": "" }, "require": { + "league/flysystem-local": "^3.0.0", "league/mime-type-detection": "^1.0.0", "php": "^8.0.2" }, @@ -2602,7 +2603,7 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.12.3" + "source": "https://github.com/thephpleague/flysystem/tree/3.15.1" }, "funding": [ { @@ -2612,13 +2613,69 @@ { "url": "https://github.com/frankdejonge", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/league/flysystem", - "type": "tidelift" } ], - "time": "2023-02-18T15:32:41+00:00" + "time": "2023-05-04T09:04:26+00:00" + }, + { + "name": "league/flysystem-local", + "version": "3.15.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-local.git", + "reference": "543f64c397fefdf9cfeac443ffb6beff602796b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/543f64c397fefdf9cfeac443ffb6beff602796b3", + "reference": "543f64c397fefdf9cfeac443ffb6beff602796b3", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "league/flysystem": "^3.0.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\Local\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Local filesystem adapter for Flysystem.", + "keywords": [ + "Flysystem", + "file", + "files", + "filesystem", + "local" + ], + "support": { + "issues": "https://github.com/thephpleague/flysystem-local/issues", + "source": "https://github.com/thephpleague/flysystem-local/tree/3.15.0" + }, + "funding": [ + { + "url": "https://ecologi.com/frankdejonge", + "type": "custom" + }, + { + "url": "https://github.com/frankdejonge", + "type": "github" + } + ], + "time": "2023-05-02T20:02:14+00:00" }, { "name": "league/mime-type-detection", @@ -2754,29 +2811,30 @@ }, { "name": "librenms/laravel-vue-i18n-generator", - "version": "0.1.48", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/librenms/laravel-vue-i18n-generator.git", - "reference": "956cb56130ee8c1faa48996184f5e37e9d25ac2f" + "reference": "c662202e21b41a33b1da405c0ca167983ac7e4e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/librenms/laravel-vue-i18n-generator/zipball/956cb56130ee8c1faa48996184f5e37e9d25ac2f", - "reference": "956cb56130ee8c1faa48996184f5e37e9d25ac2f", + "url": "https://api.github.com/repos/librenms/laravel-vue-i18n-generator/zipball/c662202e21b41a33b1da405c0ca167983ac7e4e9", + "reference": "c662202e21b41a33b1da405c0ca167983ac7e4e9", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", - "illuminate/console": "^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/support": "^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0", + "illuminate/console": "^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0|^10.0", + "illuminate/support": "^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0|^10.0", "php": ">=5.5.0" }, "require-dev": { - "orchestra/testbench": "^7", + "orchestra/testbench": "^7|^8.0", "phpunit/phpunit": "^9" }, + "default-branch": true, "type": "library", "extra": { "laravel": { @@ -2812,9 +2870,9 @@ ], "support": { "issues": "https://github.com/librenms/laravel-vue-i18n-generator/issues", - "source": "https://github.com/librenms/laravel-vue-i18n-generator/tree/0.1.48" + "source": "https://github.com/librenms/laravel-vue-i18n-generator/tree/master" }, - "time": "2022-10-11T14:28:22+00:00" + "time": "2023-02-17T21:30:56+00:00" }, { "name": "mews/purifier", @@ -2963,42 +3021,41 @@ }, { "name": "monolog/monolog", - "version": "2.9.1", + "version": "3.3.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1" + "reference": "9b5daeaffce5b926cac47923798bba91059e60e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f259e2b15fb95494c83f52d3caad003bbf5ffaa1", - "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/9b5daeaffce5b926cac47923798bba91059e60e2", + "reference": "9b5daeaffce5b926cac47923798bba91059e60e2", "shasum": "" }, "require": { - "php": ">=7.2", - "psr/log": "^1.0.1 || ^2.0 || ^3.0" + "php": ">=8.1", + "psr/log": "^2.0 || ^3.0" }, "provide": { - "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" + "psr/log-implementation": "3.0.0" }, "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "aws/aws-sdk-php": "^3.0", "doctrine/couchdb": "~1.0@dev", "elasticsearch/elasticsearch": "^7 || ^8", "ext-json": "*", "graylog2/gelf-php": "^1.4.2 || ^2@dev", - "guzzlehttp/guzzle": "^7.4", + "guzzlehttp/guzzle": "^7.4.5", "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpspec/prophecy": "^1.15", - "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5.14", - "predis/predis": "^1.1 || ^2.0", - "rollbar/rollbar": "^1.3 || ^2 || ^3", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-strict-rules": "^1.4", + "phpunit/phpunit": "^9.5.26", + "predis/predis": "^1.1 || ^2", "ruflin/elastica": "^7", - "swiftmailer/swiftmailer": "^5.3|^6.0", "symfony/mailer": "^5.4 || ^6", "symfony/mime": "^5.4 || ^6" }, @@ -3021,7 +3078,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { @@ -3049,7 +3106,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.9.1" + "source": "https://github.com/Seldaek/monolog/tree/3.3.1" }, "funding": [ { @@ -3061,7 +3118,7 @@ "type": "tidelift" } ], - "time": "2023-02-06T13:44:46+00:00" + "time": "2023-02-06T13:46:10+00:00" }, { "name": "nesbot/carbon", @@ -3316,16 +3373,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.4", + "version": "v4.15.5", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290" + "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290", - "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e", + "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e", "shasum": "" }, "require": { @@ -3366,9 +3423,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5" }, - "time": "2023-03-05T19:49:14+00:00" + "time": "2023-05-19T20:20:00+00:00" }, { "name": "nunomaduro/laravel-console-summary", @@ -3880,16 +3937,16 @@ }, { "name": "php-flasher/flasher", - "version": "v0.9.8", + "version": "v1.13.1", "source": { "type": "git", "url": "https://github.com/php-flasher/flasher.git", - "reference": "07c043e4be6143fe8b4c59ffc8af7dd42ba04c4e" + "reference": "4f75f1d3638522db2531e76a27e96075432011c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-flasher/flasher/zipball/07c043e4be6143fe8b4c59ffc8af7dd42ba04c4e", - "reference": "07c043e4be6143fe8b4c59ffc8af7dd42ba04c4e", + "url": "https://api.github.com/repos/php-flasher/flasher/zipball/4f75f1d3638522db2531e76a27e96075432011c8", + "reference": "4f75f1d3638522db2531e76a27e96075432011c8", "shasum": "" }, "require": { @@ -3910,40 +3967,49 @@ ], "authors": [ { - "name": "Younes Khoubza", + "name": "Younes KHOUBZA", "email": "younes.khoubza@gmail.com", - "homepage": "https://github.com/yoeunes", + "homepage": "https://www.linkedin.com/in/younes-khoubza", "role": "Developer" } ], - "description": "A powerful and flexible flash notifications system for PHP", - "homepage": "https://php-flasher.github.io/", + "description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.", + "homepage": "https://php-flasher.io", "keywords": [ - "Flasher", - "alerts", - "flash", + "custom-adapter", + "dark-mode", + "desktop-notifications", + "flash-messages", + "framework-agnostic", + "javascript", "laravel", - "lumen", - "messages", - "notifications", - "notify", + "notification-system", "noty", "notyf", "php", + "php-flasher", + "phpstorm-auto-complete", "pnotify", - "sweet alert", + "rtl", + "sweetalert", "symfony", - "toastr" + "toastr", + "user-experience", + "user-feedback", + "yoeunes" ], "support": { - "issues": "https://github.com/php-flasher/flasher/issues", - "source": "https://github.com/php-flasher/flasher/tree/v0.9.8" + "source": "https://github.com/php-flasher/flasher/tree/v1.13.1" }, "funding": [ { "url": "https://www.paypal.com/paypalme/yoeunes", "type": "custom" }, + { + "url": "https://github.com/yoeunes", + "type": "github" + }, { "url": "https://ko-fi.com/yoeunes", "type": "ko_fi" @@ -3957,42 +4023,39 @@ "type": "patreon" } ], - "time": "2022-03-08T15:15:29+00:00" + "time": "2023-01-15T22:24:30+00:00" }, { "name": "php-flasher/flasher-laravel", - "version": "v0.9.8", + "version": "v1.13.1", "source": { "type": "git", "url": "https://github.com/php-flasher/flasher-laravel.git", - "reference": "247b28cfa9471ce6eef61673eb7574a5ba48ac91" + "reference": "19a6f8402747cc99350e1f340a851fa47fda4929" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-flasher/flasher-laravel/zipball/247b28cfa9471ce6eef61673eb7574a5ba48ac91", - "reference": "247b28cfa9471ce6eef61673eb7574a5ba48ac91", + "url": "https://api.github.com/repos/php-flasher/flasher-laravel/zipball/19a6f8402747cc99350e1f340a851fa47fda4929", + "reference": "19a6f8402747cc99350e1f340a851fa47fda4929", "shasum": "" }, "require": { - "illuminate/support": "^4.0|^5.0|^6.0|^7.0|^8.0|^9.0", + "illuminate/support": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0", "php": ">=5.3", - "php-flasher/flasher": "^0.9" + "php-flasher/flasher": "^1.13" }, "type": "library", "extra": { "laravel": { - "providers": [ - "Flasher\\Laravel\\FlasherServiceProvider" - ], "aliases": { "Flasher": "Flasher\\Laravel\\Facade\\Flasher" - } + }, + "providers": [ + "Flasher\\Laravel\\FlasherServiceProvider" + ] } }, "autoload": { - "files": [ - "helpers.php" - ], "psr-4": { "Flasher\\Laravel\\": "" } @@ -4003,39 +4066,49 @@ ], "authors": [ { - "name": "Younes Khoubza", + "name": "Younes KHOUBZA", "email": "younes.khoubza@gmail.com", - "homepage": "https://github.com/yoeunes", + "homepage": "https://www.linkedin.com/in/younes-khoubza", "role": "Developer" } ], - "description": "Laravel package integrating PHP Flasher into Laravel applications", - "homepage": "https://php-flasher.github.io/", + "description": "PHPFlasher - A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience. Intuitive design for beginners & experienced developers. A reliable, flexible solution.", + "homepage": "https://php-flasher.io", "keywords": [ - "Flasher", - "alerts", - "bundle", - "flex", + "custom-adapter", + "dark-mode", + "desktop-notifications", + "flash-messages", + "framework-agnostic", + "javascript", "laravel", - "lumen", - "messages", - "notifications", - "notify", + "notification-system", + "noty", + "notyf", "php", + "php-flasher", + "phpstorm-auto-complete", "pnotify", + "rtl", + "sweetalert", "symfony", "toastr", + "user-experience", + "user-feedback", "yoeunes" ], "support": { - "issues": "https://github.com/php-flasher/flasher-laravel/issues", - "source": "https://github.com/php-flasher/flasher-laravel/tree/v0.9.8" + "source": "https://github.com/php-flasher/flasher-laravel/tree/v1.13.1" }, "funding": [ { "url": "https://www.paypal.com/paypalme/yoeunes", "type": "custom" }, + { + "url": "https://github.com/yoeunes", + "type": "github" + }, { "url": "https://ko-fi.com/yoeunes", "type": "ko_fi" @@ -4049,7 +4122,7 @@ "type": "patreon" } ], - "time": "2022-03-09T07:43:55+00:00" + "time": "2023-01-21T13:25:13+00:00" }, { "name": "phpmailer/phpmailer", @@ -4374,6 +4447,55 @@ ], "time": "2023-03-02T18:32:04+00:00" }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" + }, { "name": "psr/container", "version": "2.0.2", @@ -4479,21 +4601,21 @@ }, { "name": "psr/http-client", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", "shasum": "" }, "require": { "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -4513,7 +4635,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP clients", @@ -4525,9 +4647,9 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/master" + "source": "https://github.com/php-fig/http-client/tree/1.0.2" }, - "time": "2020-06-29T06:28:15+00:00" + "time": "2023-04-10T20:12:12+00:00" }, { "name": "psr/http-factory", @@ -4586,16 +4708,16 @@ }, { "name": "psr/http-message", - "version": "1.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { @@ -4604,7 +4726,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -4619,7 +4741,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -4633,9 +4755,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2023-04-04T09:50:52+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "psr/log", @@ -4740,16 +4862,16 @@ }, { "name": "psy/psysh", - "version": "v0.11.15", + "version": "v0.11.18", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "5350ce0ec8ecf2c5b5cf554cd2496f97b444af85" + "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/5350ce0ec8ecf2c5b5cf554cd2496f97b444af85", - "reference": "5350ce0ec8ecf2c5b5cf554cd2496f97b444af85", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/4f00ee9e236fa6a48f4560d1300b9c961a70a7ec", + "reference": "4f00ee9e236fa6a48f4560d1300b9c961a70a7ec", "shasum": "" }, "require": { @@ -4810,9 +4932,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.15" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.18" }, - "time": "2023-04-07T21:57:09+00:00" + "time": "2023-05-23T02:31:11+00:00" }, { "name": "ralouphie/getallheaders", @@ -4949,20 +5071,20 @@ }, { "name": "ramsey/uuid", - "version": "4.7.3", + "version": "4.7.4", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "433b2014e3979047db08a17a205f410ba3869cf2" + "reference": "60a4c63ab724854332900504274f6150ff26d286" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/433b2014e3979047db08a17a205f410ba3869cf2", - "reference": "433b2014e3979047db08a17a205f410ba3869cf2", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/60a4c63ab724854332900504274f6150ff26d286", + "reference": "60a4c63ab724854332900504274f6150ff26d286", "shasum": "" }, "require": { - "brick/math": "^0.8.8 || ^0.9 || ^0.10", + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11", "ext-json": "*", "php": "^8.0", "ramsey/collection": "^1.2 || ^2.0" @@ -5025,7 +5147,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.3" + "source": "https://github.com/ramsey/uuid/tree/4.7.4" }, "funding": [ { @@ -5037,7 +5159,7 @@ "type": "tidelift" } ], - "time": "2023-01-12T18:13:24+00:00" + "time": "2023-04-15T23:01:58+00:00" }, { "name": "socialiteproviders/manager", @@ -5177,16 +5299,16 @@ }, { "name": "spatie/flare-client-php", - "version": "1.3.5", + "version": "1.3.6", "source": { "type": "git", "url": "https://github.com/spatie/flare-client-php.git", - "reference": "3e5dd5ac4928f3d2d036bd02de5eb83fd0ef1f42" + "reference": "530ac81255af79f114344286e4275f8869c671e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/3e5dd5ac4928f3d2d036bd02de5eb83fd0ef1f42", - "reference": "3e5dd5ac4928f3d2d036bd02de5eb83fd0ef1f42", + "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/530ac81255af79f114344286e4275f8869c671e2", + "reference": "530ac81255af79f114344286e4275f8869c671e2", "shasum": "" }, "require": { @@ -5234,7 +5356,7 @@ ], "support": { "issues": "https://github.com/spatie/flare-client-php/issues", - "source": "https://github.com/spatie/flare-client-php/tree/1.3.5" + "source": "https://github.com/spatie/flare-client-php/tree/1.3.6" }, "funding": [ { @@ -5242,42 +5364,51 @@ "type": "github" } ], - "time": "2023-01-23T15:58:46+00:00" + "time": "2023-04-12T07:57:12+00:00" }, { "name": "spatie/ignition", - "version": "1.4.5", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/spatie/ignition.git", - "reference": "cc09114b7057bd217b676f047544b33f5b6247e6" + "reference": "f747d83c6d7cb6229b462f3ddbb3a82dc0db0f78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ignition/zipball/cc09114b7057bd217b676f047544b33f5b6247e6", - "reference": "cc09114b7057bd217b676f047544b33f5b6247e6", + "url": "https://api.github.com/repos/spatie/ignition/zipball/f747d83c6d7cb6229b462f3ddbb3a82dc0db0f78", + "reference": "f747d83c6d7cb6229b462f3ddbb3a82dc0db0f78", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", "php": "^8.0", + "spatie/backtrace": "^1.4", "spatie/flare-client-php": "^1.1", "symfony/console": "^5.4|^6.0", "symfony/var-dumper": "^5.4|^6.0" }, "require-dev": { + "illuminate/cache": "^9.52", "mockery/mockery": "^1.4", "pestphp/pest": "^1.20", "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", - "symfony/process": "^5.4|^6.0" + "psr/simple-cache-implementation": "*", + "symfony/cache": "^6.2", + "symfony/process": "^5.4|^6.0", + "vlucas/phpdotenv": "^5.5" + }, + "suggest": { + "openai-php/client": "Require get solutions from OpenAI", + "simple-cache-implementation": "To cache solutions from OpenAI" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.4.x-dev" + "dev-main": "1.5.x-dev" } }, "autoload": { @@ -5316,45 +5447,47 @@ "type": "github" } ], - "time": "2023-02-28T16:49:47+00:00" + "time": "2023-05-04T13:20:26+00:00" }, { "name": "spatie/laravel-ignition", - "version": "1.6.4", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ignition.git", - "reference": "1a2b4bd3d48c72526c0ba417687e5c56b5cf49bc" + "reference": "2f99fa6b732a6049e78ed34e4608ce589605ae54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/1a2b4bd3d48c72526c0ba417687e5c56b5cf49bc", - "reference": "1a2b4bd3d48c72526c0ba417687e5c56b5cf49bc", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/2f99fa6b732a6049e78ed34e4608ce589605ae54", + "reference": "2f99fa6b732a6049e78ed34e4608ce589605ae54", "shasum": "" }, "require": { "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "illuminate/support": "^8.77|^9.27", - "monolog/monolog": "^2.3", - "php": "^8.0", - "spatie/flare-client-php": "^1.0.1", - "spatie/ignition": "^1.4.1", - "symfony/console": "^5.0|^6.0", - "symfony/var-dumper": "^5.0|^6.0" + "illuminate/support": "^10.0", + "php": "^8.1", + "spatie/flare-client-php": "^1.3.5", + "spatie/ignition": "^1.5.0", + "symfony/console": "^6.2.3", + "symfony/var-dumper": "^6.2.3" }, "require-dev": { - "filp/whoops": "^2.14", - "livewire/livewire": "^2.8|dev-develop", - "mockery/mockery": "^1.4", - "nunomaduro/larastan": "^1.0", - "orchestra/testbench": "^6.23|^7.0", - "pestphp/pest": "^1.20", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "spatie/laravel-ray": "^1.27" + "livewire/livewire": "^2.11", + "mockery/mockery": "^1.5.1", + "openai-php/client": "^0.3.4", + "orchestra/testbench": "^8.0", + "pestphp/pest": "^1.22.3", + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan-deprecation-rules": "^1.1.1", + "phpstan/phpstan-phpunit": "^1.3.3", + "vlucas/phpdotenv": "^5.5" + }, + "suggest": { + "openai-php/client": "Require get solutions from OpenAI", + "psr/simple-cache-implementation": "Needed to cache solutions from OpenAI" }, "type": "library", "extra": { @@ -5406,7 +5539,7 @@ "type": "github" } ], - "time": "2023-01-03T19:28:04+00:00" + "time": "2023-05-09T07:19:31+00:00" }, { "name": "spomky-labs/base64url", @@ -5585,16 +5718,16 @@ }, { "name": "symfony/console", - "version": "v6.2.8", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b" + "reference": "12288d9f4500f84a4d02254d4aa968b15488476f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3582d68a64a86ec25240aaa521ec8bc2342b369b", - "reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b", + "url": "https://api.github.com/repos/symfony/console/zipball/12288d9f4500f84a4d02254d4aa968b15488476f", + "reference": "12288d9f4500f84a4d02254d4aa968b15488476f", "shasum": "" }, "require": { @@ -5661,7 +5794,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.2.8" + "source": "https://github.com/symfony/console/tree/v6.2.10" }, "funding": [ { @@ -5677,7 +5810,7 @@ "type": "tidelift" } ], - "time": "2023-03-29T21:42:15+00:00" + "time": "2023-04-28T13:37:43+00:00" }, { "name": "symfony/css-selector", @@ -5813,16 +5946,16 @@ }, { "name": "symfony/error-handler", - "version": "v6.2.7", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "61e90f94eb014054000bc902257d2763fac09166" + "reference": "8b7e9f124640cb0611624a9383176c3e5f7d8cfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/61e90f94eb014054000bc902257d2763fac09166", - "reference": "61e90f94eb014054000bc902257d2763fac09166", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/8b7e9f124640cb0611624a9383176c3e5f7d8cfb", + "reference": "8b7e9f124640cb0611624a9383176c3e5f7d8cfb", "shasum": "" }, "require": { @@ -5864,7 +5997,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.2.7" + "source": "https://github.com/symfony/error-handler/tree/v6.2.10" }, "funding": [ { @@ -5880,7 +6013,7 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:44:56+00:00" + "time": "2023-04-18T13:46:08+00:00" }, { "name": "symfony/event-dispatcher", @@ -6110,16 +6243,16 @@ }, { "name": "symfony/http-foundation", - "version": "v6.2.8", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "511a524affeefc191939348823ac75e9921c2112" + "reference": "49adbb92bcb4e3c2943719d2756271e8b9602acc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/511a524affeefc191939348823ac75e9921c2112", - "reference": "511a524affeefc191939348823ac75e9921c2112", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/49adbb92bcb4e3c2943719d2756271e8b9602acc", + "reference": "49adbb92bcb4e3c2943719d2756271e8b9602acc", "shasum": "" }, "require": { @@ -6168,7 +6301,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.2.8" + "source": "https://github.com/symfony/http-foundation/tree/v6.2.10" }, "funding": [ { @@ -6184,20 +6317,20 @@ "type": "tidelift" } ], - "time": "2023-03-29T21:42:15+00:00" + "time": "2023-04-18T13:46:08+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.2.8", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "9563229e56076070d92ca30c089e801e8a4629a3" + "reference": "81064a65a5496f17d2b6984f6519406f98864215" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9563229e56076070d92ca30c089e801e8a4629a3", - "reference": "9563229e56076070d92ca30c089e801e8a4629a3", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/81064a65a5496f17d2b6984f6519406f98864215", + "reference": "81064a65a5496f17d2b6984f6519406f98864215", "shasum": "" }, "require": { @@ -6279,7 +6412,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.2.8" + "source": "https://github.com/symfony/http-kernel/tree/v6.2.10" }, "funding": [ { @@ -6295,7 +6428,7 @@ "type": "tidelift" } ], - "time": "2023-03-31T12:00:10+00:00" + "time": "2023-04-28T13:50:28+00:00" }, { "name": "symfony/mailer", @@ -6378,16 +6511,16 @@ }, { "name": "symfony/mime", - "version": "v6.2.7", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "62e341f80699badb0ad70b31149c8df89a2d778e" + "reference": "b6c137fc53a9f7c4c951cd3f362b3734c7a97723" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/62e341f80699badb0ad70b31149c8df89a2d778e", - "reference": "62e341f80699badb0ad70b31149c8df89a2d778e", + "url": "https://api.github.com/repos/symfony/mime/zipball/b6c137fc53a9f7c4c951cd3f362b3734c7a97723", + "reference": "b6c137fc53a9f7c4c951cd3f362b3734c7a97723", "shasum": "" }, "require": { @@ -6441,7 +6574,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.2.7" + "source": "https://github.com/symfony/mime/tree/v6.2.10" }, "funding": [ { @@ -6457,7 +6590,7 @@ "type": "tidelift" } ], - "time": "2023-02-24T10:42:00+00:00" + "time": "2023-04-19T09:54:16+00:00" }, { "name": "symfony/polyfill-ctype", @@ -7119,16 +7252,16 @@ }, { "name": "symfony/process", - "version": "v6.2.8", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "75ed64103df4f6615e15a7fe38b8111099f47416" + "reference": "b34cdbc9c5e75d45a3703e63a48ad07aafa8bf2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/75ed64103df4f6615e15a7fe38b8111099f47416", - "reference": "75ed64103df4f6615e15a7fe38b8111099f47416", + "url": "https://api.github.com/repos/symfony/process/zipball/b34cdbc9c5e75d45a3703e63a48ad07aafa8bf2e", + "reference": "b34cdbc9c5e75d45a3703e63a48ad07aafa8bf2e", "shasum": "" }, "require": { @@ -7160,7 +7293,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.2.8" + "source": "https://github.com/symfony/process/tree/v6.2.10" }, "funding": [ { @@ -7176,7 +7309,7 @@ "type": "tidelift" } ], - "time": "2023-03-09T16:20:02+00:00" + "time": "2023-04-18T13:56:57+00:00" }, { "name": "symfony/routing", @@ -7692,16 +7825,16 @@ }, { "name": "symfony/var-dumper", - "version": "v6.2.8", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "d37ab6787be2db993747b6218fcc96e8e3bb4bd0" + "reference": "41a750a23412ca76fdbbf5096943b4134272c1ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/d37ab6787be2db993747b6218fcc96e8e3bb4bd0", - "reference": "d37ab6787be2db993747b6218fcc96e8e3bb4bd0", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/41a750a23412ca76fdbbf5096943b4134272c1ab", + "reference": "41a750a23412ca76fdbbf5096943b4134272c1ab", "shasum": "" }, "require": { @@ -7760,7 +7893,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.2.8" + "source": "https://github.com/symfony/var-dumper/tree/v6.2.10" }, "funding": [ { @@ -7776,20 +7909,20 @@ "type": "tidelift" } ], - "time": "2023-03-29T21:42:15+00:00" + "time": "2023-04-18T13:46:08+00:00" }, { "name": "symfony/yaml", - "version": "v6.2.7", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e8e6a1d59e050525f27a1f530aa9703423cb7f57" + "reference": "61916f3861b1e9705b18cfde723921a71dd1559d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e8e6a1d59e050525f27a1f530aa9703423cb7f57", - "reference": "e8e6a1d59e050525f27a1f530aa9703423cb7f57", + "url": "https://api.github.com/repos/symfony/yaml/zipball/61916f3861b1e9705b18cfde723921a71dd1559d", + "reference": "61916f3861b1e9705b18cfde723921a71dd1559d", "shasum": "" }, "require": { @@ -7834,7 +7967,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v6.2.7" + "source": "https://github.com/symfony/yaml/tree/v6.2.10" }, "funding": [ { @@ -7850,7 +7983,7 @@ "type": "tidelift" } ], - "time": "2023-02-16T09:57:23+00:00" + "time": "2023-04-28T13:25:36+00:00" }, { "name": "tecnickcom/tcpdf", @@ -8198,16 +8331,16 @@ }, { "name": "web-token/jwt-core", - "version": "3.1.7", + "version": "3.2.7", "source": { "type": "git", "url": "https://github.com/web-token/jwt-core.git", - "reference": "ec2580e8cdd17410016216fbf1b645052c35f644" + "reference": "db58b6ebbe1a7d5869688e989b1cf110c6ab888f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/web-token/jwt-core/zipball/ec2580e8cdd17410016216fbf1b645052c35f644", - "reference": "ec2580e8cdd17410016216fbf1b645052c35f644", + "url": "https://api.github.com/repos/web-token/jwt-core/zipball/db58b6ebbe1a7d5869688e989b1cf110c6ab888f", + "reference": "db58b6ebbe1a7d5869688e989b1cf110c6ab888f", "shasum": "" }, "require": { @@ -8262,7 +8395,7 @@ "symfony" ], "support": { - "source": "https://github.com/web-token/jwt-core/tree/3.1.7" + "source": "https://github.com/web-token/jwt-core/tree/3.2.7" }, "funding": [ { @@ -8270,20 +8403,20 @@ "type": "patreon" } ], - "time": "2023-02-02T17:25:26+00:00" + "time": "2023-02-02T17:35:17+00:00" }, { "name": "web-token/jwt-key-mgmt", - "version": "3.1.7", + "version": "3.2.7", "source": { "type": "git", "url": "https://github.com/web-token/jwt-key-mgmt.git", - "reference": "bf6dec304f2a718d70f7316e498c612317c59e08" + "reference": "3b51eeeff38ac58ee86ec83d073b88b8294b1c7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/web-token/jwt-key-mgmt/zipball/bf6dec304f2a718d70f7316e498c612317c59e08", - "reference": "bf6dec304f2a718d70f7316e498c612317c59e08", + "url": "https://api.github.com/repos/web-token/jwt-key-mgmt/zipball/3b51eeeff38ac58ee86ec83d073b88b8294b1c7e", + "reference": "3b51eeeff38ac58ee86ec83d073b88b8294b1c7e", "shasum": "" }, "require": { @@ -8291,7 +8424,7 @@ "php": ">=8.1", "psr/http-client": "^1.0", "psr/http-factory": "^1.0", - "web-token/jwt-core": "^3.0" + "web-token/jwt-core": "^3.2" }, "suggest": { "ext-sodium": "Sodium is required for OKP key creation, EdDSA signature algorithm and ECDH-ES key encryption with OKP keys", @@ -8340,7 +8473,7 @@ "symfony" ], "support": { - "source": "https://github.com/web-token/jwt-key-mgmt/tree/3.1.7" + "source": "https://github.com/web-token/jwt-key-mgmt/tree/3.2.7" }, "funding": [ { @@ -8348,25 +8481,25 @@ "type": "patreon" } ], - "time": "2023-02-02T17:25:26+00:00" + "time": "2023-05-18T16:20:51+00:00" }, { "name": "web-token/jwt-signature", - "version": "3.1.7", + "version": "3.2.7", "source": { "type": "git", "url": "https://github.com/web-token/jwt-signature.git", - "reference": "14b71230d9632564e356b785366ad36880964190" + "reference": "156e0b0ef534e53eecf23a32a92ee6d8cb4fdac4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/web-token/jwt-signature/zipball/14b71230d9632564e356b785366ad36880964190", - "reference": "14b71230d9632564e356b785366ad36880964190", + "url": "https://api.github.com/repos/web-token/jwt-signature/zipball/156e0b0ef534e53eecf23a32a92ee6d8cb4fdac4", + "reference": "156e0b0ef534e53eecf23a32a92ee6d8cb4fdac4", "shasum": "" }, "require": { "php": ">=8.1", - "web-token/jwt-core": "^3.0" + "web-token/jwt-core": "^3.2" }, "suggest": { "web-token/jwt-signature-algorithm-ecdsa": "ECDSA Based Signature Algorithms", @@ -8417,7 +8550,7 @@ "symfony" ], "support": { - "source": "https://github.com/web-token/jwt-signature/tree/3.1.7" + "source": "https://github.com/web-token/jwt-signature/tree/3.2.7" }, "funding": [ { @@ -8425,26 +8558,26 @@ "type": "patreon" } ], - "time": "2023-02-02T17:25:26+00:00" + "time": "2023-05-18T16:20:51+00:00" }, { "name": "web-token/jwt-signature-algorithm-ecdsa", - "version": "3.1.7", + "version": "3.2.7", "source": { "type": "git", "url": "https://github.com/web-token/jwt-signature-algorithm-ecdsa.git", - "reference": "e09159600f19832cf4a68921e7299e564bc0eaf9" + "reference": "34b119d6b5eca53914ad3b96660e5bd7fb5538b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/web-token/jwt-signature-algorithm-ecdsa/zipball/e09159600f19832cf4a68921e7299e564bc0eaf9", - "reference": "e09159600f19832cf4a68921e7299e564bc0eaf9", + "url": "https://api.github.com/repos/web-token/jwt-signature-algorithm-ecdsa/zipball/34b119d6b5eca53914ad3b96660e5bd7fb5538b9", + "reference": "34b119d6b5eca53914ad3b96660e5bd7fb5538b9", "shasum": "" }, "require": { "ext-openssl": "*", "php": ">=8.1", - "web-token/jwt-signature": "^3.0" + "web-token/jwt-signature": "^3.2" }, "type": "library", "autoload": { @@ -8487,7 +8620,7 @@ "symfony" ], "support": { - "source": "https://github.com/web-token/jwt-signature-algorithm-ecdsa/tree/3.1.7" + "source": "https://github.com/web-token/jwt-signature-algorithm-ecdsa/tree/3.2.7" }, "funding": [ { @@ -8495,11 +8628,11 @@ "type": "patreon" } ], - "time": "2022-08-04T21:04:09+00:00" + "time": "2023-05-18T16:20:51+00:00" }, { "name": "web-token/jwt-util-ecc", - "version": "3.1.7", + "version": "3.2.7", "source": { "type": "git", "url": "https://github.com/web-token/jwt-util-ecc.git", @@ -8560,7 +8693,7 @@ "symfony" ], "support": { - "source": "https://github.com/web-token/jwt-util-ecc/tree/3.1.7" + "source": "https://github.com/web-token/jwt-util-ecc/tree/3.2.7" }, "funding": [ { @@ -9637,16 +9770,16 @@ }, { "name": "fakerphp/faker", - "version": "v1.21.0", + "version": "v1.22.0", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d" + "reference": "f85772abd508bd04e20bb4b1bbe260a68d0066d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/92efad6a967f0b79c499705c69b662f738cc9e4d", - "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/f85772abd508bd04e20bb4b1bbe260a68d0066d2", + "reference": "f85772abd508bd04e20bb4b1bbe260a68d0066d2", "shasum": "" }, "require": { @@ -9699,22 +9832,22 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.21.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.22.0" }, - "time": "2022-12-13T13:54:32+00:00" + "time": "2023-05-14T12:31:37+00:00" }, { "name": "filp/whoops", - "version": "2.15.1", + "version": "2.15.2", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "e864ac957acd66e1565f25efda61e37791a5db0b" + "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/e864ac957acd66e1565f25efda61e37791a5db0b", - "reference": "e864ac957acd66e1565f25efda61e37791a5db0b", + "url": "https://api.github.com/repos/filp/whoops/zipball/aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", + "reference": "aac9304c5ed61bf7b1b7a6064bf9806ab842ce73", "shasum": "" }, "require": { @@ -9764,7 +9897,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.15.1" + "source": "https://github.com/filp/whoops/tree/2.15.2" }, "funding": [ { @@ -9772,20 +9905,20 @@ "type": "github" } ], - "time": "2023-03-06T18:09:13+00:00" + "time": "2023-04-12T12:00:00+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.16.0", + "version": "v3.17.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "d40f9436e1c448d309fa995ab9c14c5c7a96f2dc" + "reference": "3f0ed862f22386c55a767461ef5083bddceeed79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/d40f9436e1c448d309fa995ab9c14c5c7a96f2dc", - "reference": "d40f9436e1c448d309fa995ab9c14c5c7a96f2dc", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/3f0ed862f22386c55a767461ef5083bddceeed79", + "reference": "3f0ed862f22386c55a767461ef5083bddceeed79", "shasum": "" }, "require": { @@ -9860,7 +9993,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.16.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.17.0" }, "funding": [ { @@ -9868,7 +10001,7 @@ "type": "github" } ], - "time": "2023-04-02T19:30:06+00:00" + "time": "2023-05-22T19:59:32+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -9923,16 +10056,16 @@ }, { "name": "laravel/dusk", - "version": "v7.7.0", + "version": "v7.7.1", "source": { "type": "git", "url": "https://github.com/laravel/dusk.git", - "reference": "c1d17269c317bc99fef3c2e885465d0bb6398434" + "reference": "836338ec355fc129b09f26f3cbc19de2daf065ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/dusk/zipball/c1d17269c317bc99fef3c2e885465d0bb6398434", - "reference": "c1d17269c317bc99fef3c2e885465d0bb6398434", + "url": "https://api.github.com/repos/laravel/dusk/zipball/836338ec355fc129b09f26f3cbc19de2daf065ad", + "reference": "836338ec355fc129b09f26f3cbc19de2daf065ad", "shasum": "" }, "require": { @@ -9951,7 +10084,9 @@ "require-dev": { "mockery/mockery": "^1.4.2", "orchestra/testbench": "^7.0|^8.0", - "phpunit/phpunit": "^9.5.10|^10.0.1" + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.5.10|^10.0.1", + "psy/psysh": "^0.11.12" }, "suggest": { "ext-pcntl": "Used to gracefully terminate Dusk when tests are running." @@ -9990,9 +10125,9 @@ ], "support": { "issues": "https://github.com/laravel/dusk/issues", - "source": "https://github.com/laravel/dusk/tree/v7.7.0" + "source": "https://github.com/laravel/dusk/tree/v7.7.1" }, - "time": "2023-02-21T11:38:10+00:00" + "time": "2023-04-13T14:50:22+00:00" }, { "name": "maximebf/debugbar", @@ -10193,38 +10328,40 @@ }, { "name": "nunomaduro/collision", - "version": "v6.4.0", + "version": "v7.1.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "f05978827b9343cba381ca05b8c7deee346b6015" + "reference": "2b97fed4950cf0ff148c18b853975ec8ea135e90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/f05978827b9343cba381ca05b8c7deee346b6015", - "reference": "f05978827b9343cba381ca05b8c7deee346b6015", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/2b97fed4950cf0ff148c18b853975ec8ea135e90", + "reference": "2b97fed4950cf0ff148c18b853975ec8ea135e90", "shasum": "" }, "require": { - "filp/whoops": "^2.14.5", - "php": "^8.0.0", - "symfony/console": "^6.0.2" + "filp/whoops": "^2.14.6", + "nunomaduro/termwind": "^1.15.1", + "php": "^8.1.0", + "symfony/console": "^6.2.7" }, "require-dev": { - "brianium/paratest": "^6.4.1", - "laravel/framework": "^9.26.1", - "laravel/pint": "^1.1.1", - "nunomaduro/larastan": "^1.0.3", - "nunomaduro/mock-final-classes": "^1.1.0", - "orchestra/testbench": "^7.7", - "phpunit/phpunit": "^9.5.23", - "spatie/ignition": "^1.4.1" + "brianium/paratest": "^7.1.0", + "laravel/framework": "^10.2.0", + "laravel/pint": "^1.6.0", + "laravel/sail": "^1.21.1", + "laravel/sanctum": "^3.2.1", + "laravel/tinker": "^2.8.1", + "nunomaduro/larastan": "^2.4.1", + "orchestra/testbench-core": "^8.0.3", + "pestphp/pest": "^2.0.0", + "phpunit/phpunit": "^10.0.14", + "sebastian/environment": "^6.0.0", + "spatie/laravel-ignition": "^2.0.0" }, "type": "library", "extra": { - "branch-alias": { - "dev-develop": "6.x-dev" - }, "laravel": { "providers": [ "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" @@ -10232,6 +10369,9 @@ } }, "autoload": { + "files": [ + "./src/Adapters/Phpunit/Autoload.php" + ], "psr-4": { "NunoMaduro\\Collision\\": "src/" } @@ -10277,20 +10417,20 @@ "type": "patreon" } ], - "time": "2023-01-03T12:54:54+00:00" + "time": "2023-03-03T10:00:22+00:00" }, { "name": "nunomaduro/larastan", - "version": "2.5.1", + "version": "v2.6.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/larastan.git", - "reference": "072e2c9566ae000bf66c92384fc933b81885244b" + "reference": "ccac5b25949576807862cf32ba1fce1769c06c42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/larastan/zipball/072e2c9566ae000bf66c92384fc933b81885244b", - "reference": "072e2c9566ae000bf66c92384fc933b81885244b", + "url": "https://api.github.com/repos/nunomaduro/larastan/zipball/ccac5b25949576807862cf32ba1fce1769c06c42", + "reference": "ccac5b25949576807862cf32ba1fce1769c06c42", "shasum": "" }, "require": { @@ -10304,7 +10444,7 @@ "illuminate/support": "^9.47.0 || ^10.0.0", "php": "^8.0.2", "phpmyadmin/sql-parser": "^5.6.0", - "phpstan/phpstan": "~1.10.3" + "phpstan/phpstan": "~1.10.6" }, "require-dev": { "nikic/php-parser": "^4.15.2", @@ -10353,7 +10493,7 @@ ], "support": { "issues": "https://github.com/nunomaduro/larastan/issues", - "source": "https://github.com/nunomaduro/larastan/tree/2.5.1" + "source": "https://github.com/nunomaduro/larastan/tree/v2.6.0" }, "funding": [ { @@ -10373,7 +10513,7 @@ "type": "patreon" } ], - "time": "2023-03-04T23:46:40+00:00" + "time": "2023-04-20T12:40:01+00:00" }, { "name": "phar-io/manifest", @@ -10809,22 +10949,23 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.18.1", + "version": "1.21.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "22dcdfd725ddf99583bfe398fc624ad6c5004a0f" + "reference": "6df62b08faef4f899772bc7c3bbabb93d2b7a21c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/22dcdfd725ddf99583bfe398fc624ad6c5004a0f", - "reference": "22dcdfd725ddf99583bfe398fc624ad6c5004a0f", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6df62b08faef4f899772bc7c3bbabb93d2b7a21c", + "reference": "6df62b08faef4f899772bc7c3bbabb93d2b7a21c", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { + "nikic/php-parser": "^4.15", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^1.5", @@ -10848,22 +10989,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.18.1" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.21.0" }, - "time": "2023-04-07T11:51:11+00:00" + "time": "2023-05-17T13:13:44+00:00" }, { "name": "phpstan/phpstan", - "version": "1.10.11", + "version": "1.10.15", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "8aa62e6ea8b58ffb650e02940e55a788cbc3fe21" + "reference": "762c4dac4da6f8756eebb80e528c3a47855da9bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8aa62e6ea8b58ffb650e02940e55a788cbc3fe21", - "reference": "8aa62e6ea8b58ffb650e02940e55a788cbc3fe21", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/762c4dac4da6f8756eebb80e528c3a47855da9bd", + "reference": "762c4dac4da6f8756eebb80e528c3a47855da9bd", "shasum": "" }, "require": { @@ -10912,7 +11053,7 @@ "type": "tidelift" } ], - "time": "2023-04-04T19:17:42+00:00" + "time": "2023-05-09T15:28:01+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -11332,16 +11473,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.6", + "version": "9.6.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "b65d59a059d3004a040c16a82e07bbdf6cfdd115" + "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b65d59a059d3004a040c16a82e07bbdf6cfdd115", - "reference": "b65d59a059d3004a040c16a82e07bbdf6cfdd115", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/17d621b3aff84d0c8b62539e269e87d8d5baa76e", + "reference": "17d621b3aff84d0c8b62539e269e87d8d5baa76e", "shasum": "" }, "require": { @@ -11415,7 +11556,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.6" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.8" }, "funding": [ { @@ -11431,76 +11572,27 @@ "type": "tidelift" } ], - "time": "2023-03-27T11:43:46+00:00" - }, - { - "name": "psr/cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/3.0.0" - }, - "time": "2021-02-03T23:26:27+00:00" + "time": "2023-05-11T05:14:45+00:00" }, { "name": "react/promise", - "version": "v2.9.0", + "version": "v2.10.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910" + "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/234f8fd1023c9158e2314fa9d7d0e6a83db42910", - "reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910", + "url": "https://api.github.com/repos/reactphp/promise/zipball/f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", + "reference": "f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38", "shasum": "" }, "require": { "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36" + "phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.36" }, "type": "library", "autoload": { @@ -11544,19 +11636,15 @@ ], "support": { "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.9.0" + "source": "https://github.com/reactphp/promise/tree/v2.10.0" }, "funding": [ { - "url": "https://github.com/WyriHaximus", - "type": "github" - }, - { - "url": "https://github.com/clue", - "type": "github" + "url": "https://opencollective.com/reactphp", + "type": "open_collective" } ], - "time": "2022-02-11T10:27:51+00:00" + "time": "2023-05-02T15:15:43+00:00" }, { "name": "sebastian/cli-parser", @@ -11858,16 +11946,16 @@ }, { "name": "sebastian/diff", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", "shasum": "" }, "require": { @@ -11912,7 +12000,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" }, "funding": [ { @@ -11920,7 +12008,7 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2023-05-07T05:35:17+00:00" }, { "name": "sebastian/environment", @@ -12524,16 +12612,16 @@ }, { "name": "seld/jsonlint", - "version": "1.9.0", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "4211420d25eba80712bff236a98960ef68b866b7" + "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/4211420d25eba80712bff236a98960ef68b866b7", - "reference": "4211420d25eba80712bff236a98960ef68b866b7", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/594fd6462aad8ecee0b45ca5045acea4776667f1", + "reference": "594fd6462aad8ecee0b45ca5045acea4776667f1", "shasum": "" }, "require": { @@ -12572,7 +12660,7 @@ ], "support": { "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.9.0" + "source": "https://github.com/Seldaek/jsonlint/tree/1.10.0" }, "funding": [ { @@ -12584,7 +12672,7 @@ "type": "tidelift" } ], - "time": "2022-04-01T13:37:23+00:00" + "time": "2023-05-11T13:16:46+00:00" }, { "name": "seld/phar-utils", @@ -12748,16 +12836,16 @@ }, { "name": "symfony/filesystem", - "version": "v6.2.7", + "version": "v6.2.10", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "82b6c62b959f642d000456f08c6d219d749215b3" + "reference": "fd588debf7d1bc16a2c84b4b3b71145d9946b894" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/82b6c62b959f642d000456f08c6d219d749215b3", - "reference": "82b6c62b959f642d000456f08c6d219d749215b3", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/fd588debf7d1bc16a2c84b4b3b71145d9946b894", + "reference": "fd588debf7d1bc16a2c84b4b3b71145d9946b894", "shasum": "" }, "require": { @@ -12791,7 +12879,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.2.7" + "source": "https://github.com/symfony/filesystem/tree/v6.2.10" }, "funding": [ { @@ -12807,7 +12895,7 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:44:56+00:00" + "time": "2023-04-18T13:46:08+00:00" }, { "name": "symfony/options-resolver", @@ -13149,8 +13237,10 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, + "stability-flags": { + "librenms/laravel-vue-i18n-generator": 20 + }, + "prefer-stable": true, "prefer-lowest": false, "platform": { "php": "^8.1", diff --git a/config/app.php b/config/app.php index 97e6c10777..d709e5d4ef 100644 --- a/config/app.php +++ b/config/app.php @@ -9,6 +9,7 @@ */ use Illuminate\Support\Facades\Facade; +use Illuminate\Support\ServiceProvider; return [ @@ -162,33 +163,10 @@ return [ | */ - 'providers' => [ - + 'providers' => ServiceProvider::defaultProviders()->merge([ /* * Laravel Framework Service Providers... */ - Illuminate\Auth\AuthServiceProvider::class, - Illuminate\Broadcasting\BroadcastServiceProvider::class, - Illuminate\Bus\BusServiceProvider::class, - Illuminate\Cache\CacheServiceProvider::class, - Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, - Illuminate\Cookie\CookieServiceProvider::class, - Illuminate\Database\DatabaseServiceProvider::class, - Illuminate\Encryption\EncryptionServiceProvider::class, - Illuminate\Filesystem\FilesystemServiceProvider::class, - Illuminate\Foundation\Providers\FoundationServiceProvider::class, - Illuminate\Hashing\HashServiceProvider::class, - Illuminate\Mail\MailServiceProvider::class, - Illuminate\Notifications\NotificationServiceProvider::class, - Illuminate\Pagination\PaginationServiceProvider::class, - Illuminate\Pipeline\PipelineServiceProvider::class, - Illuminate\Queue\QueueServiceProvider::class, - Illuminate\Redis\RedisServiceProvider::class, - Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, - Illuminate\Session\SessionServiceProvider::class, - Illuminate\Translation\TranslationServiceProvider::class, - Illuminate\Validation\ValidationServiceProvider::class, - Illuminate\View\ViewServiceProvider::class, /* * Package Service Providers... @@ -209,7 +187,7 @@ return [ App\Providers\DatastoreServiceProvider::class, App\Providers\SnmptrapProvider::class, App\Providers\PluginProvider::class, - ], + ])->toArray(), /* |-------------------------------------------------------------------------- diff --git a/config/auth.php b/config/auth.php index 48b1218528..053dd34ef8 100644 --- a/config/auth.php +++ b/config/auth.php @@ -11,15 +11,15 @@ return [ /* - |-------------------------------------------------------------------------- - | Authentication Defaults - |-------------------------------------------------------------------------- - | - | This option controls the default authentication "guard" and password - | reset options for your application. You may change these defaults - | as required, but they're a perfect start for most applications. - | - */ + |-------------------------------------------------------------------------- + | Authentication Defaults + |-------------------------------------------------------------------------- + | + | This option controls the default authentication "guard" and password + | reset options for your application. You may change these defaults + | as required, but they're a perfect start for most applications. + | + */ 'defaults' => [ 'guard' => 'web', @@ -27,21 +27,21 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Authentication Guards - |-------------------------------------------------------------------------- - | - | Next, you may define every authentication guard for your application. - | Of course, a great default configuration has been defined for you - | here which uses session storage and the Eloquent user provider. - | - | All authentication drivers have a user provider. This defines how the - | users are actually retrieved out of your database or other storage - | mechanisms used by this application to persist your user's data. - | - | Supported: "session" - | - */ + |-------------------------------------------------------------------------- + | Authentication Guards + |-------------------------------------------------------------------------- + | + | Next, you may define every authentication guard for your application. + | Of course, a great default configuration has been defined for you + | here which uses session storage and the Eloquent user provider. + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | Supported: "session" + | + */ 'guards' => [ 'web' => [ @@ -63,21 +63,21 @@ return [ ], /* - |-------------------------------------------------------------------------- - | User Providers - |-------------------------------------------------------------------------- - | - | All authentication drivers have a user provider. This defines how the - | users are actually retrieved out of your database or other storage - | mechanisms used by this application to persist your user's data. - | - | If you have multiple user tables or models you may configure multiple - | sources which represent each model / table. These sources may then - | be assigned to any extra authentication guards you have defined. - | - | Supported: "database", "eloquent" - | - */ + |-------------------------------------------------------------------------- + | User Providers + |-------------------------------------------------------------------------- + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | If you have multiple user tables or models you may configure multiple + | sources which represent each model / table. These sources may then + | be assigned to any extra authentication guards you have defined. + | + | Supported: "database", "eloquent" + | + */ 'providers' => [ 'users' => [ @@ -105,10 +105,14 @@ return [ | than one user table or model in the application and you want to have | separate password reset settings based on the specific user types. | - | The expire time is the number of minutes that each reset token will be + | The expiry time is the number of minutes that each reset token will be | considered valid. This security feature keeps tokens short-lived so | they have less time to be guessed. You may change this as needed. | + | The throttle setting is the number of seconds a user must wait before + | generating more password reset tokens. This prevents the user from + | quickly generating a very large amount of password reset tokens. + | */ 'passwords' => [ @@ -121,15 +125,15 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Password Confirmation Timeout - |-------------------------------------------------------------------------- - | - | Here you may define the amount of seconds before a password confirmation - | times out and the user is prompted to re-enter their password via the - | confirmation screen. By default, the timeout lasts for three hours. - | - */ + |-------------------------------------------------------------------------- + | Password Confirmation Timeout + |-------------------------------------------------------------------------- + | + | Here you may define the amount of seconds before a password confirmation + | times out and the user is prompted to re-enter their password via the + | confirmation screen. By default, the timeout lasts for three hours. + | + */ 'password_timeout' => 10800, diff --git a/config/broadcasting.php b/config/broadcasting.php index 1abfc3b574..621067a354 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -11,30 +11,30 @@ return [ /* - |-------------------------------------------------------------------------- - | Default Broadcaster - |-------------------------------------------------------------------------- - | - | This option controls the default broadcaster that will be used by the - | framework when an event needs to be broadcast. You may set this to - | any of the connections defined in the "connections" array below. - | - | Supported: "pusher", "ably", "redis", "log", "null" - | - */ + |-------------------------------------------------------------------------- + | Default Broadcaster + |-------------------------------------------------------------------------- + | + | This option controls the default broadcaster that will be used by the + | framework when an event needs to be broadcast. You may set this to + | any of the connections defined in the "connections" array below. + | + | Supported: "pusher", "ably", "redis", "log", "null" + | + */ 'default' => env('BROADCAST_DRIVER', 'null'), /* - |-------------------------------------------------------------------------- - | Broadcast Connections - |-------------------------------------------------------------------------- - | - | Here you may define all of the broadcast connections that will be used - | to broadcast events to other systems or over websockets. Samples of - | each available type of connection are provided inside this array. - | - */ + |-------------------------------------------------------------------------- + | Broadcast Connections + |-------------------------------------------------------------------------- + | + | Here you may define all of the broadcast connections that will be used + | to broadcast events to other systems or over websockets. Samples of + | each available type of connection are provided inside this array. + | + */ 'connections' => [ @@ -44,7 +44,7 @@ return [ 'secret' => env('PUSHER_APP_SECRET'), 'app_id' => env('PUSHER_APP_ID'), 'options' => [ - 'host' => env('PUSHER_HOST', 'api-' . env('PUSHER_APP_CLUSTER', 'mt1') . '.pusher.com') ?: 'api-' . env('PUSHER_APP_CLUSTER', 'mt1') . '.pusher.com', + 'host' => env('PUSHER_HOST') ?: 'api-' . env('PUSHER_APP_CLUSTER', 'mt1') . '.pusher.com', 'port' => env('PUSHER_PORT', 443), 'scheme' => env('PUSHER_SCHEME', 'https'), 'encrypted' => true, diff --git a/config/cache.php b/config/cache.php index 533b1af941..5e4f4b93e7 100644 --- a/config/cache.php +++ b/config/cache.php @@ -103,15 +103,15 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Cache Key Prefix - |-------------------------------------------------------------------------- - | - | When utilizing the APC, database, memcached, Redis, or DynamoDB cache - | stores there might be other applications using the same cache. For - | that reason, you may prefix every cache key to avoid collisions. - | - */ + |-------------------------------------------------------------------------- + | Cache Key Prefix + |-------------------------------------------------------------------------- + | + | When utilizing the APC, database, memcached, Redis, or DynamoDB cache + | stores there might be other applications using the same cache. For + | that reason, you may prefix every cache key to avoid collisions. + | + */ 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache_'), diff --git a/config/database.php b/config/database.php index 0c3b12b293..bbe9a3ae92 100644 --- a/config/database.php +++ b/config/database.php @@ -24,7 +24,6 @@ return [ */ 'default' => env('DB_CONNECTION', env('DBTEST') ? 'testing' : 'mysql'), - /* |-------------------------------------------------------------------------- | Database Connections @@ -46,7 +45,7 @@ return [ 'sqlite' => [ 'driver' => 'sqlite', 'url' => env('DATABASE_URL'), - 'database' => env('DB_DATABASE', storage_path('librenms.sqlite')), + 'database' => env('DB_DATABASE', database_path('librenms.sqlite')), 'prefix' => '', 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), ], @@ -159,6 +158,8 @@ return [ 'charset' => 'utf8', 'prefix' => '', 'prefix_indexes' => true, + // 'encrypt' => env('DB_ENCRYPT', 'yes'), + // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), ], 'testing_memory' => [ @@ -170,7 +171,7 @@ return [ 'testing_persistent' => [ 'driver' => 'sqlite', - 'database' => storage_path('testing.sqlite'), + 'database' => database_path('testing.sqlite'), 'prefix' => '', 'foreign_key_constraints' => true, ], @@ -178,28 +179,28 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Migration Repository Table - |-------------------------------------------------------------------------- - | - | This table keeps track of all the migrations that have already run for - | your application. Using this information, we can determine which of - | the migrations on disk haven't actually been run in the database. - | - */ + |-------------------------------------------------------------------------- + | Migration Repository Table + |-------------------------------------------------------------------------- + | + | This table keeps track of all the migrations that have already run for + | your application. Using this information, we can determine which of + | the migrations on disk haven't actually been run in the database. + | + */ 'migrations' => 'migrations', /* - |-------------------------------------------------------------------------- - | Redis Databases - |-------------------------------------------------------------------------- - | - | Redis is an open source, fast, and advanced key-value store that also - | provides a richer body of commands than a typical key-value system - | such as APC or Memcached. Laravel makes it easy to dig right in. - | - */ + |-------------------------------------------------------------------------- + | Redis Databases + |-------------------------------------------------------------------------- + | + | Redis is an open source, fast, and advanced key-value store that also + | provides a richer body of commands than a typical key-value system + | such as APC or Memcached. Laravel makes it easy to dig right in. + | + */ 'redis' => [ @@ -212,9 +213,11 @@ return [ 'default' => [ 'scheme' => env('REDIS_SCHEME', 'tcp'), + 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), - 'password' => env('REDIS_PASSWORD', null), + 'username' => env('REDIS_USERNAME'), + 'password' => env('REDIS_PASSWORD'), 'port' => env('REDIS_PORT', '6379'), 'database' => env('REDIS_DB', '0'), ], @@ -222,7 +225,8 @@ return [ 'cache' => [ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), - 'password' => env('REDIS_PASSWORD', null), + 'username' => env('REDIS_USERNAME'), + 'password' => env('REDIS_PASSWORD'), 'port' => env('REDIS_PORT', '6379'), 'database' => env('REDIS_CACHE_DB', '1'), ], diff --git a/config/filesystems.php b/config/filesystems.php index cf10d1d08b..8d68b56cca 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -11,15 +11,15 @@ return [ /* - |-------------------------------------------------------------------------- - | Default Filesystem Disk - |-------------------------------------------------------------------------- - | - | Here you may specify the default filesystem disk that should be used - | by the framework. The "local" disk, as well as a variety of cloud - | based disks are available to your application. Just store away! - | - */ + |-------------------------------------------------------------------------- + | Default Filesystem Disk + |-------------------------------------------------------------------------- + | + | Here you may specify the default filesystem disk that should be used + | by the framework. The "local" disk, as well as a variety of cloud + | based disks are available to your application. Just store away! + | + */ 'default' => env('FILESYSTEM_DISK', 'local'), @@ -72,15 +72,15 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Symbolic Links - |-------------------------------------------------------------------------- - | - | Here you may configure the symbolic links that will be created when the - | `storage:link` Artisan command is executed. The array keys should be - | the locations of the links and the values should be their targets. - | - */ + |-------------------------------------------------------------------------- + | Symbolic Links + |-------------------------------------------------------------------------- + | + | Here you may configure the symbolic links that will be created when the + | `storage:link` Artisan command is executed. The array keys should be + | the locations of the links and the values should be their targets. + | + */ 'links' => [ public_path('storage') => storage_path('app/public'), diff --git a/config/logging.php b/config/logging.php index ec9300667d..c9370d12da 100644 --- a/config/logging.php +++ b/config/logging.php @@ -11,6 +11,7 @@ use Monolog\Handler\NullHandler; use Monolog\Handler\StreamHandler; use Monolog\Handler\SyslogUdpHandler; +use Monolog\Processor\PsrLogMessageProcessor; return [ @@ -28,15 +29,15 @@ return [ 'default' => env('LOG_CHANNEL', 'stack'), /* - |-------------------------------------------------------------------------- - | Deprecations Log Channel - |-------------------------------------------------------------------------- - | - | This option controls the log channel that should be used to log warnings - | regarding deprecated PHP and library features. This allows you to get - | your application ready for upcoming major versions of dependencies. - | - */ + |-------------------------------------------------------------------------- + | Deprecations Log Channel + |-------------------------------------------------------------------------- + | + | This option controls the log channel that should be used to log warnings + | regarding deprecated PHP and library features. This allows you to get + | your application ready for upcoming major versions of dependencies. + | + */ 'deprecations' => [ 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), @@ -44,19 +45,19 @@ return [ ], /* - |-------------------------------------------------------------------------- - | Log Channels - |-------------------------------------------------------------------------- - | - | Here you may configure the log channels for your application. Out of - | the box, Laravel uses the Monolog PHP logging library. This gives - | you a variety of powerful log handlers / formatters to utilize. - | - | Available Drivers: "single", "daily", "slack", "syslog", - | "errorlog", "monolog", - | "custom", "stack" - | - */ + |-------------------------------------------------------------------------- + | Log Channels + |-------------------------------------------------------------------------- + | + | Here you may configure the log channels for your application. Out of + | the box, Laravel uses the Monolog PHP logging library. This gives + | you a variety of powerful log handlers / formatters to utilize. + | + | Available Drivers: "single", "daily", "slack", "syslog", + | "errorlog", "monolog", + | "custom", "stack" + | + */ 'channels' => [ 'stack' => [ @@ -82,6 +83,7 @@ return [ 'path' => env('APP_LOG', \LibreNMS\Config::get('log_file', base_path('logs/librenms.log'))), 'formatter' => \App\Logging\NoColorFormatter::class, 'level' => env('LOG_LEVEL', 'error'), + 'replace_placeholders' => true, ], 'daily' => [ @@ -90,6 +92,7 @@ return [ 'formatter' => \App\Logging\NoColorFormatter::class, 'level' => env('LOG_LEVEL', 'error'), 'days' => 14, + 'replace_placeholders' => true, ], 'slack' => [ @@ -98,6 +101,7 @@ return [ 'username' => 'Laravel Log', 'emoji' => ':boom:', 'level' => env('LOG_LEVEL', 'critical'), + 'replace_placeholders' => true, ], 'papertrail' => [ @@ -109,6 +113,7 @@ return [ 'port' => env('PAPERTRAIL_PORT'), 'connectionString' => 'tls://' . env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'), ], + 'processors' => [PsrLogMessageProcessor::class], ], 'stderr' => [ @@ -119,6 +124,7 @@ return [ 'with' => [ 'stream' => 'php://stderr', ], + 'processors' => [PsrLogMessageProcessor::class], ], 'stdout_debug' => [ @@ -144,11 +150,14 @@ return [ 'syslog' => [ 'driver' => 'syslog', 'level' => env('LOG_LEVEL', 'debug'), + 'facility' => LOG_USER, + 'replace_placeholders' => true, ], 'errorlog' => [ 'driver' => 'errorlog', 'level' => env('LOG_LEVEL', 'debug'), + 'replace_placeholders' => true, ], 'null' => [ diff --git a/config/mail.php b/config/mail.php index 361fb80eea..57cfdfbe01 100644 --- a/config/mail.php +++ b/config/mail.php @@ -36,7 +36,7 @@ return [ | sending an e-mail. You will specify which one you are using for your | mailers below. You are free to add additional mailers as required. | - | Supported: "smtp", "sendmail", "mailgun", "ses", + | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2", | "postmark", "log", "array", "failover" | */ @@ -59,10 +59,16 @@ return [ 'mailgun' => [ 'transport' => 'mailgun', + // 'client' => [ + // 'timeout' => 5, + // ], ], 'postmark' => [ 'transport' => 'postmark', + // 'client' => [ + // 'timeout' => 5, + // ], ], 'sendmail' => [ diff --git a/config/services.php b/config/services.php index 46c3a7356d..0ace530e8d 100644 --- a/config/services.php +++ b/config/services.php @@ -3,16 +3,16 @@ return [ /* - |-------------------------------------------------------------------------- - | Third Party Services - |-------------------------------------------------------------------------- - | - | This file is for storing the credentials for third party services such - | as Mailgun, Postmark, AWS and more. This file provides the de facto - | location for this type of information, allowing packages to have - | a conventional file to locate the various service credentials. - | - */ + |-------------------------------------------------------------------------- + | Third Party Services + |-------------------------------------------------------------------------- + | + | This file is for storing the credentials for third party services such + | as Mailgun, Postmark, AWS and more. This file provides the de facto + | location for this type of information, allowing packages to have + | a conventional file to locate the various service credentials. + | + */ 'mailgun' => [ 'domain' => env('MAILGUN_DOMAIN'), diff --git a/database/factories/AlertScheduleFactory.php b/database/factories/AlertScheduleFactory.php index cc39710d84..459baa473d 100644 --- a/database/factories/AlertScheduleFactory.php +++ b/database/factories/AlertScheduleFactory.php @@ -13,7 +13,7 @@ class AlertScheduleFactory extends Factory * * @return array */ - public function definition() + public function definition(): array { return [ 'title' => $this->faker->name(), diff --git a/database/factories/BgpPeerFactory.php b/database/factories/BgpPeerFactory.php index 4ad1742617..b49097d983 100644 --- a/database/factories/BgpPeerFactory.php +++ b/database/factories/BgpPeerFactory.php @@ -13,7 +13,7 @@ class BgpPeerFactory extends Factory * * @return array */ - public function definition() + public function definition(): array { return [ 'bgpPeerIdentifier' => $this->faker->ipv4(), diff --git a/database/factories/BillFactory.php b/database/factories/BillFactory.php index b591ffdc2e..7af0b91a29 100644 --- a/database/factories/BillFactory.php +++ b/database/factories/BillFactory.php @@ -13,7 +13,7 @@ class BillFactory extends Factory * * @return array */ - public function definition() + public function definition(): array { return [ 'bill_name' => $this->faker->text(), diff --git a/database/factories/ComponentFactory.php b/database/factories/ComponentFactory.php index 3b547963c0..67c9dbb90e 100644 --- a/database/factories/ComponentFactory.php +++ b/database/factories/ComponentFactory.php @@ -13,7 +13,7 @@ class ComponentFactory extends Factory * * @return array */ - public function definition() + public function definition(): array { return [ 'device_id' => $this->faker->randomDigit(), diff --git a/database/factories/DeviceFactory.php b/database/factories/DeviceFactory.php index 721a1cc4bc..b7ade36df9 100644 --- a/database/factories/DeviceFactory.php +++ b/database/factories/DeviceFactory.php @@ -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(), diff --git a/database/factories/DeviceGroupFactory.php b/database/factories/DeviceGroupFactory.php index 58dbd1b72b..1cf2be9c93 100644 --- a/database/factories/DeviceGroupFactory.php +++ b/database/factories/DeviceGroupFactory.php @@ -13,7 +13,7 @@ class DeviceGroupFactory extends Factory * * @return array */ - public function definition() + public function definition(): array { return [ 'name' => $this->faker->domainWord(), diff --git a/database/factories/Ipv4AddressFactory.php b/database/factories/Ipv4AddressFactory.php index 68ce90d39c..cb53fa8dc7 100644 --- a/database/factories/Ipv4AddressFactory.php +++ b/database/factories/Ipv4AddressFactory.php @@ -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); diff --git a/database/factories/Ipv4NetworkFactory.php b/database/factories/Ipv4NetworkFactory.php index 1f18e381c8..2a185b06d1 100644 --- a/database/factories/Ipv4NetworkFactory.php +++ b/database/factories/Ipv4NetworkFactory.php @@ -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), diff --git a/database/factories/LocationFactory.php b/database/factories/LocationFactory.php index 3ac9302579..0177e9f844 100644 --- a/database/factories/LocationFactory.php +++ b/database/factories/LocationFactory.php @@ -13,7 +13,7 @@ class LocationFactory extends Factory * * @return array */ - public function definition() + public function definition(): array { return [ 'location' => $this->faker->randomElement([ diff --git a/database/factories/OspfNbrFactory.php b/database/factories/OspfNbrFactory.php index 5694d377ab..68dbb422c8 100644 --- a/database/factories/OspfNbrFactory.php +++ b/database/factories/OspfNbrFactory.php @@ -13,7 +13,7 @@ class OspfNbrFactory extends Factory * * @return array */ - public function definition() + public function definition(): array { return [ 'id' => $this->faker->randomDigit(), diff --git a/database/factories/OspfPortFactory.php b/database/factories/OspfPortFactory.php index 33260a3f9a..528c47c933 100644 --- a/database/factories/OspfPortFactory.php +++ b/database/factories/OspfPortFactory.php @@ -13,7 +13,7 @@ class OspfPortFactory extends Factory * * @return array */ - public function definition() + public function definition(): array { return [ 'id' => $this->faker->randomDigit(), diff --git a/database/factories/PortFactory.php b/database/factories/PortFactory.php index 8d68a2fe4e..0b517fc7c3 100644 --- a/database/factories/PortFactory.php +++ b/database/factories/PortFactory.php @@ -13,7 +13,7 @@ class PortFactory extends Factory * * @return array */ - public function definition() + public function definition(): array { return [ 'ifIndex' => $this->faker->unique()->numberBetween(), diff --git a/database/factories/SensorFactory.php b/database/factories/SensorFactory.php index 4a6d5a7718..60d664c36c 100644 --- a/database/factories/SensorFactory.php +++ b/database/factories/SensorFactory.php @@ -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); diff --git a/database/factories/SyslogFactory.php b/database/factories/SyslogFactory.php index 151305f864..f033633067 100644 --- a/database/factories/SyslogFactory.php +++ b/database/factories/SyslogFactory.php @@ -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; diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index bdc9d98878..423fe706e1 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -13,7 +13,7 @@ class UserFactory extends Factory * * @return array */ - public function definition() + public function definition(): array { return [ 'auth_type' => 'mysql', diff --git a/database/factories/VminfoFactory.php b/database/factories/VminfoFactory.php index 04fc857a14..07c00ffcf6 100644 --- a/database/factories/VminfoFactory.php +++ b/database/factories/VminfoFactory.php @@ -14,7 +14,7 @@ class VminfoFactory extends Factory * * @return array */ - public function definition() + public function definition(): array { return [ 'vm_type' => $this->faker->text(16), diff --git a/database/migrations/2018_07_03_091314_create_access_points_table.php b/database/migrations/2018_07_03_091314_create_access_points_table.php index f4eab2fa15..4b889c314f 100644 --- a/database/migrations/2018_07_03_091314_create_access_points_table.php +++ b/database/migrations/2018_07_03_091314_create_access_points_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('access_points', function (Blueprint $table) { $table->increments('accesspoint_id'); @@ -37,7 +37,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('access_points'); } diff --git a/database/migrations/2018_07_03_091314_create_alert_device_map_table.php b/database/migrations/2018_07_03_091314_create_alert_device_map_table.php index 7ae43e15e6..7870564462 100644 --- a/database/migrations/2018_07_03_091314_create_alert_device_map_table.php +++ b/database/migrations/2018_07_03_091314_create_alert_device_map_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('alert_device_map', function (Blueprint $table) { $table->increments('id'); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('alert_device_map'); } diff --git a/database/migrations/2018_07_03_091314_create_alert_group_map_table.php b/database/migrations/2018_07_03_091314_create_alert_group_map_table.php index a88fad3319..1348a90bf9 100644 --- a/database/migrations/2018_07_03_091314_create_alert_group_map_table.php +++ b/database/migrations/2018_07_03_091314_create_alert_group_map_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('alert_group_map', function (Blueprint $table) { $table->increments('id'); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('alert_group_map'); } diff --git a/database/migrations/2018_07_03_091314_create_alert_log_table.php b/database/migrations/2018_07_03_091314_create_alert_log_table.php index 025a26497d..c327a28405 100644 --- a/database/migrations/2018_07_03_091314_create_alert_log_table.php +++ b/database/migrations/2018_07_03_091314_create_alert_log_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('alert_log', function (Blueprint $table) { $table->increments('id'); @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('alert_log'); } diff --git a/database/migrations/2018_07_03_091314_create_alert_rules_table.php b/database/migrations/2018_07_03_091314_create_alert_rules_table.php index d3491fd1ce..0e8fd3a1b7 100644 --- a/database/migrations/2018_07_03_091314_create_alert_rules_table.php +++ b/database/migrations/2018_07_03_091314_create_alert_rules_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('alert_rules', function (Blueprint $table) { $table->increments('id'); @@ -30,7 +30,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('alert_rules'); } diff --git a/database/migrations/2018_07_03_091314_create_alert_schedulables_table.php b/database/migrations/2018_07_03_091314_create_alert_schedulables_table.php index 14fbb0e2cd..0204450790 100644 --- a/database/migrations/2018_07_03_091314_create_alert_schedulables_table.php +++ b/database/migrations/2018_07_03_091314_create_alert_schedulables_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('alert_schedulables', function (Blueprint $table) { $table->increments('item_id'); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('alert_schedulables'); } diff --git a/database/migrations/2018_07_03_091314_create_alert_schedule_table.php b/database/migrations/2018_07_03_091314_create_alert_schedule_table.php index c3b0a0357e..ce78124ca8 100644 --- a/database/migrations/2018_07_03_091314_create_alert_schedule_table.php +++ b/database/migrations/2018_07_03_091314_create_alert_schedule_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('alert_schedule', function (Blueprint $table) { $table->increments('schedule_id'); @@ -32,7 +32,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('alert_schedule'); } diff --git a/database/migrations/2018_07_03_091314_create_alert_template_map_table.php b/database/migrations/2018_07_03_091314_create_alert_template_map_table.php index 7e577feecd..9beece4f35 100644 --- a/database/migrations/2018_07_03_091314_create_alert_template_map_table.php +++ b/database/migrations/2018_07_03_091314_create_alert_template_map_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('alert_template_map', function (Blueprint $table) { $table->increments('id'); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('alert_template_map'); } diff --git a/database/migrations/2018_07_03_091314_create_alert_templates_table.php b/database/migrations/2018_07_03_091314_create_alert_templates_table.php index 68bc226801..510c83454d 100644 --- a/database/migrations/2018_07_03_091314_create_alert_templates_table.php +++ b/database/migrations/2018_07_03_091314_create_alert_templates_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('alert_templates', function (Blueprint $table) { $table->increments('id'); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('alert_templates'); } diff --git a/database/migrations/2018_07_03_091314_create_alert_transport_groups_table.php b/database/migrations/2018_07_03_091314_create_alert_transport_groups_table.php index 6607e6255d..a4cb4722c3 100644 --- a/database/migrations/2018_07_03_091314_create_alert_transport_groups_table.php +++ b/database/migrations/2018_07_03_091314_create_alert_transport_groups_table.php @@ -33,7 +33,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('alert_transport_groups', function (Blueprint $table) { $table->increments('transport_group_id'); @@ -46,7 +46,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('alert_transport_groups'); } diff --git a/database/migrations/2018_07_03_091314_create_alert_transport_map_table.php b/database/migrations/2018_07_03_091314_create_alert_transport_map_table.php index 1637516ef3..2d0c6ad2c5 100644 --- a/database/migrations/2018_07_03_091314_create_alert_transport_map_table.php +++ b/database/migrations/2018_07_03_091314_create_alert_transport_map_table.php @@ -33,7 +33,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('alert_transport_map', function (Blueprint $table) { $table->increments('id'); @@ -48,7 +48,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('alert_transport_map'); } diff --git a/database/migrations/2018_07_03_091314_create_alert_transports_table.php b/database/migrations/2018_07_03_091314_create_alert_transports_table.php index a7520cb589..7d3f8da943 100644 --- a/database/migrations/2018_07_03_091314_create_alert_transports_table.php +++ b/database/migrations/2018_07_03_091314_create_alert_transports_table.php @@ -33,7 +33,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('alert_transports', function (Blueprint $table) { $table->increments('transport_id'); @@ -49,7 +49,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('alert_transports'); } diff --git a/database/migrations/2018_07_03_091314_create_alerts_table.php b/database/migrations/2018_07_03_091314_create_alerts_table.php index 4b909cdd3c..9ba55dad42 100644 --- a/database/migrations/2018_07_03_091314_create_alerts_table.php +++ b/database/migrations/2018_07_03_091314_create_alerts_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('alerts', function (Blueprint $table) { $table->increments('id'); @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('alerts'); } diff --git a/database/migrations/2018_07_03_091314_create_api_tokens_table.php b/database/migrations/2018_07_03_091314_create_api_tokens_table.php index caed0c513d..22c04b29bc 100644 --- a/database/migrations/2018_07_03_091314_create_api_tokens_table.php +++ b/database/migrations/2018_07_03_091314_create_api_tokens_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('api_tokens', function (Blueprint $table) { $table->increments('id'); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('api_tokens'); } diff --git a/database/migrations/2018_07_03_091314_create_application_metrics_table.php b/database/migrations/2018_07_03_091314_create_application_metrics_table.php index e70d0a3c78..ca2fd9dc77 100644 --- a/database/migrations/2018_07_03_091314_create_application_metrics_table.php +++ b/database/migrations/2018_07_03_091314_create_application_metrics_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('application_metrics', function (Blueprint $table) { $table->unsignedInteger('app_id'); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('application_metrics'); } diff --git a/database/migrations/2018_07_03_091314_create_applications_table.php b/database/migrations/2018_07_03_091314_create_applications_table.php index 2600c1f662..69fa72c9b8 100644 --- a/database/migrations/2018_07_03_091314_create_applications_table.php +++ b/database/migrations/2018_07_03_091314_create_applications_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('applications', function (Blueprint $table) { $table->increments('app_id'); @@ -35,7 +35,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('applications'); } diff --git a/database/migrations/2018_07_03_091314_create_authlog_table.php b/database/migrations/2018_07_03_091314_create_authlog_table.php index 8cc19039c3..40441a2dfd 100644 --- a/database/migrations/2018_07_03_091314_create_authlog_table.php +++ b/database/migrations/2018_07_03_091314_create_authlog_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('authlog', function (Blueprint $table) { $table->increments('id'); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('authlog'); } diff --git a/database/migrations/2018_07_03_091314_create_bgpPeers_cbgp_table.php b/database/migrations/2018_07_03_091314_create_bgpPeers_cbgp_table.php index 2a161e407a..8109085ec9 100644 --- a/database/migrations/2018_07_03_091314_create_bgpPeers_cbgp_table.php +++ b/database/migrations/2018_07_03_091314_create_bgpPeers_cbgp_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('bgpPeers_cbgp', function (Blueprint $table) { $table->unsignedInteger('device_id'); @@ -46,7 +46,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('bgpPeers_cbgp'); } diff --git a/database/migrations/2018_07_03_091314_create_bgpPeers_table.php b/database/migrations/2018_07_03_091314_create_bgpPeers_table.php index 09eb23a2f8..e035d8c12c 100644 --- a/database/migrations/2018_07_03_091314_create_bgpPeers_table.php +++ b/database/migrations/2018_07_03_091314_create_bgpPeers_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('bgpPeers', function (Blueprint $table) { $table->increments('bgpPeer_id'); @@ -39,7 +39,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('bgpPeers'); } diff --git a/database/migrations/2018_07_03_091314_create_bill_data_table.php b/database/migrations/2018_07_03_091314_create_bill_data_table.php index 46f96b5538..136dc620e1 100644 --- a/database/migrations/2018_07_03_091314_create_bill_data_table.php +++ b/database/migrations/2018_07_03_091314_create_bill_data_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('bill_data', function (Blueprint $table) { $table->unsignedInteger('bill_id')->index(); @@ -28,7 +28,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('bill_data'); } diff --git a/database/migrations/2018_07_03_091314_create_bill_history_table.php b/database/migrations/2018_07_03_091314_create_bill_history_table.php index 3a5ccb4f0e..d18093630f 100644 --- a/database/migrations/2018_07_03_091314_create_bill_history_table.php +++ b/database/migrations/2018_07_03_091314_create_bill_history_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('bill_history', function (Blueprint $table) { $table->increments('bill_hist_id'); @@ -47,7 +47,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('bill_history'); } diff --git a/database/migrations/2018_07_03_091314_create_bill_perms_table.php b/database/migrations/2018_07_03_091314_create_bill_perms_table.php index 69144622c4..1648629954 100644 --- a/database/migrations/2018_07_03_091314_create_bill_perms_table.php +++ b/database/migrations/2018_07_03_091314_create_bill_perms_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('bill_perms', function (Blueprint $table) { $table->id(); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('bill_perms'); } diff --git a/database/migrations/2018_07_03_091314_create_bill_port_counters_table.php b/database/migrations/2018_07_03_091314_create_bill_port_counters_table.php index d660ef7342..9d7e903ea5 100644 --- a/database/migrations/2018_07_03_091314_create_bill_port_counters_table.php +++ b/database/migrations/2018_07_03_091314_create_bill_port_counters_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('bill_port_counters', function (Blueprint $table) { $table->unsignedInteger('port_id'); @@ -29,7 +29,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('bill_port_counters'); } diff --git a/database/migrations/2018_07_03_091314_create_bill_ports_table.php b/database/migrations/2018_07_03_091314_create_bill_ports_table.php index 97683bf993..0b6336e1d5 100644 --- a/database/migrations/2018_07_03_091314_create_bill_ports_table.php +++ b/database/migrations/2018_07_03_091314_create_bill_ports_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('bill_ports', function (Blueprint $table) { $table->id(); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('bill_ports'); } diff --git a/database/migrations/2018_07_03_091314_create_bills_table.php b/database/migrations/2018_07_03_091314_create_bills_table.php index 500b8bfff2..767ddce8bb 100644 --- a/database/migrations/2018_07_03_091314_create_bills_table.php +++ b/database/migrations/2018_07_03_091314_create_bills_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('bills', function (Blueprint $table) { $table->increments('bill_id'); @@ -42,7 +42,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('bills'); } diff --git a/database/migrations/2018_07_03_091314_create_callback_table.php b/database/migrations/2018_07_03_091314_create_callback_table.php index 03b0eac627..6ba4c885d4 100644 --- a/database/migrations/2018_07_03_091314_create_callback_table.php +++ b/database/migrations/2018_07_03_091314_create_callback_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('callback', function (Blueprint $table) { $table->increments('callback_id'); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('callback'); } diff --git a/database/migrations/2018_07_03_091314_create_cef_switching_table.php b/database/migrations/2018_07_03_091314_create_cef_switching_table.php index e636321ff8..75b9264fb8 100644 --- a/database/migrations/2018_07_03_091314_create_cef_switching_table.php +++ b/database/migrations/2018_07_03_091314_create_cef_switching_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('cef_switching', function (Blueprint $table) { $table->increments('cef_switching_id'); @@ -36,7 +36,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('cef_switching'); } diff --git a/database/migrations/2018_07_03_091314_create_ciscoASA_table.php b/database/migrations/2018_07_03_091314_create_ciscoASA_table.php index 7bc6004d72..8d2d5572b6 100644 --- a/database/migrations/2018_07_03_091314_create_ciscoASA_table.php +++ b/database/migrations/2018_07_03_091314_create_ciscoASA_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ciscoASA', function (Blueprint $table) { $table->increments('ciscoASA_id'); @@ -28,7 +28,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ciscoASA'); } diff --git a/database/migrations/2018_07_03_091314_create_component_prefs_table.php b/database/migrations/2018_07_03_091314_create_component_prefs_table.php index 1cfb320d14..9faf1e3143 100644 --- a/database/migrations/2018_07_03_091314_create_component_prefs_table.php +++ b/database/migrations/2018_07_03_091314_create_component_prefs_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('component_prefs', function (Blueprint $table) { $table->increments('id')->comment('ID for each entry'); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('component_prefs'); } diff --git a/database/migrations/2018_07_03_091314_create_component_statuslog_table.php b/database/migrations/2018_07_03_091314_create_component_statuslog_table.php index a6f6f3b0f0..24cd16a38c 100644 --- a/database/migrations/2018_07_03_091314_create_component_statuslog_table.php +++ b/database/migrations/2018_07_03_091314_create_component_statuslog_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('component_statuslog', function (Blueprint $table) { $table->increments('id')->comment('ID for each log entry, unique index'); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('component_statuslog'); } diff --git a/database/migrations/2018_07_03_091314_create_component_table.php b/database/migrations/2018_07_03_091314_create_component_table.php index 6b10c3f1aa..3751a95ac6 100644 --- a/database/migrations/2018_07_03_091314_create_component_table.php +++ b/database/migrations/2018_07_03_091314_create_component_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('component', function (Blueprint $table) { $table->increments('id')->comment('ID for each component, unique index'); @@ -29,7 +29,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('component'); } diff --git a/database/migrations/2018_07_03_091314_create_config_table.php b/database/migrations/2018_07_03_091314_create_config_table.php index a1373795ef..903c248815 100644 --- a/database/migrations/2018_07_03_091314_create_config_table.php +++ b/database/migrations/2018_07_03_091314_create_config_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('config', function (Blueprint $table) { $table->increments('config_id'); @@ -32,7 +32,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('config'); } diff --git a/database/migrations/2018_07_03_091314_create_customers_table.php b/database/migrations/2018_07_03_091314_create_customers_table.php index f2537ca3a4..e139776fcb 100644 --- a/database/migrations/2018_07_03_091314_create_customers_table.php +++ b/database/migrations/2018_07_03_091314_create_customers_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('customers', function (Blueprint $table) { $table->increments('customer_id'); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('customers'); } diff --git a/database/migrations/2018_07_03_091314_create_dashboards_table.php b/database/migrations/2018_07_03_091314_create_dashboards_table.php index 5d06dc8e29..9a0389f847 100644 --- a/database/migrations/2018_07_03_091314_create_dashboards_table.php +++ b/database/migrations/2018_07_03_091314_create_dashboards_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('dashboards', function (Blueprint $table) { $table->increments('dashboard_id'); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('dashboards'); } diff --git a/database/migrations/2018_07_03_091314_create_dbSchema_table.php b/database/migrations/2018_07_03_091314_create_dbSchema_table.php index 07d3f2be99..3f9528e9e4 100644 --- a/database/migrations/2018_07_03_091314_create_dbSchema_table.php +++ b/database/migrations/2018_07_03_091314_create_dbSchema_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('dbSchema', function (Blueprint $table) { $table->integer('version')->default(0)->primary(); @@ -22,7 +22,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('dbSchema'); } diff --git a/database/migrations/2018_07_03_091314_create_device_graphs_table.php b/database/migrations/2018_07_03_091314_create_device_graphs_table.php index 66118dcb7d..ad9b4ec487 100644 --- a/database/migrations/2018_07_03_091314_create_device_graphs_table.php +++ b/database/migrations/2018_07_03_091314_create_device_graphs_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('device_graphs', function (Blueprint $table) { $table->bigIncrements('id'); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('device_graphs'); } diff --git a/database/migrations/2018_07_03_091314_create_device_group_device_table.php b/database/migrations/2018_07_03_091314_create_device_group_device_table.php index 2061748445..e3e2e1247d 100644 --- a/database/migrations/2018_07_03_091314_create_device_group_device_table.php +++ b/database/migrations/2018_07_03_091314_create_device_group_device_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('device_group_device', function (Blueprint $table) { $table->unsignedInteger('device_group_id')->unsigned()->index(); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('device_group_device'); } diff --git a/database/migrations/2018_07_03_091314_create_device_groups_table.php b/database/migrations/2018_07_03_091314_create_device_groups_table.php index 8a216b4bfc..d312734b47 100644 --- a/database/migrations/2018_07_03_091314_create_device_groups_table.php +++ b/database/migrations/2018_07_03_091314_create_device_groups_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('device_groups', function (Blueprint $table) { $table->increments('id'); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('device_groups'); } diff --git a/database/migrations/2018_07_03_091314_create_device_mibs_table.php b/database/migrations/2018_07_03_091314_create_device_mibs_table.php index 3beb80aa6b..1b37a3a71e 100644 --- a/database/migrations/2018_07_03_091314_create_device_mibs_table.php +++ b/database/migrations/2018_07_03_091314_create_device_mibs_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('device_mibs', function (Blueprint $table) { $table->unsignedInteger('device_id'); @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('device_mibs'); } diff --git a/database/migrations/2018_07_03_091314_create_device_oids_table.php b/database/migrations/2018_07_03_091314_create_device_oids_table.php index b58f8faf3d..a865fe2c49 100644 --- a/database/migrations/2018_07_03_091314_create_device_oids_table.php +++ b/database/migrations/2018_07_03_091314_create_device_oids_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('device_oids', function (Blueprint $table) { $table->unsignedInteger('device_id'); @@ -34,7 +34,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('device_oids'); } diff --git a/database/migrations/2018_07_03_091314_create_device_perf_table.php b/database/migrations/2018_07_03_091314_create_device_perf_table.php index 6af82c0cee..ac776f6212 100644 --- a/database/migrations/2018_07_03_091314_create_device_perf_table.php +++ b/database/migrations/2018_07_03_091314_create_device_perf_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('device_perf', function (Blueprint $table) { $table->increments('id'); @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('device_perf'); } diff --git a/database/migrations/2018_07_03_091314_create_device_relationships_table.php b/database/migrations/2018_07_03_091314_create_device_relationships_table.php index 3d10b147c7..7e8ec03a1a 100644 --- a/database/migrations/2018_07_03_091314_create_device_relationships_table.php +++ b/database/migrations/2018_07_03_091314_create_device_relationships_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('device_relationships', function (Blueprint $table) { $table->unsignedInteger('parent_device_id')->default(0); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('device_relationships'); } diff --git a/database/migrations/2018_07_03_091314_create_devices_attribs_table.php b/database/migrations/2018_07_03_091314_create_devices_attribs_table.php index cf6162276b..a5533f2701 100644 --- a/database/migrations/2018_07_03_091314_create_devices_attribs_table.php +++ b/database/migrations/2018_07_03_091314_create_devices_attribs_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('devices_attribs', function (Blueprint $table) { $table->increments('attrib_id'); @@ -30,7 +30,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('devices_attribs'); } diff --git a/database/migrations/2018_07_03_091314_create_devices_perms_table.php b/database/migrations/2018_07_03_091314_create_devices_perms_table.php index c6fc6be17b..03f56138dd 100644 --- a/database/migrations/2018_07_03_091314_create_devices_perms_table.php +++ b/database/migrations/2018_07_03_091314_create_devices_perms_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('devices_perms', function (Blueprint $table) { $table->id(); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('devices_perms'); } diff --git a/database/migrations/2018_07_03_091314_create_devices_table.php b/database/migrations/2018_07_03_091314_create_devices_table.php index 759824f792..2f46e80dfa 100644 --- a/database/migrations/2018_07_03_091314_create_devices_table.php +++ b/database/migrations/2018_07_03_091314_create_devices_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('devices', function (Blueprint $table) { $table->increments('device_id'); @@ -73,7 +73,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('devices'); } diff --git a/database/migrations/2018_07_03_091314_create_entPhysical_state_table.php b/database/migrations/2018_07_03_091314_create_entPhysical_state_table.php index 5c2c21e64d..1c7193f68f 100644 --- a/database/migrations/2018_07_03_091314_create_entPhysical_state_table.php +++ b/database/migrations/2018_07_03_091314_create_entPhysical_state_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('entPhysical_state', function (Blueprint $table) { $table->id(); @@ -29,7 +29,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('entPhysical_state'); } diff --git a/database/migrations/2018_07_03_091314_create_entPhysical_table.php b/database/migrations/2018_07_03_091314_create_entPhysical_table.php index ad84cecf9b..4bb41a9293 100644 --- a/database/migrations/2018_07_03_091314_create_entPhysical_table.php +++ b/database/migrations/2018_07_03_091314_create_entPhysical_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('entPhysical', function (Blueprint $table) { $table->increments('entPhysical_id'); @@ -40,7 +40,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('entPhysical'); } diff --git a/database/migrations/2018_07_03_091314_create_entityState_table.php b/database/migrations/2018_07_03_091314_create_entityState_table.php index 67d9991828..abc596a8a9 100644 --- a/database/migrations/2018_07_03_091314_create_entityState_table.php +++ b/database/migrations/2018_07_03_091314_create_entityState_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('entityState', function (Blueprint $table) { $table->increments('entity_state_id'); @@ -30,7 +30,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('entityState'); } diff --git a/database/migrations/2018_07_03_091314_create_eventlog_table.php b/database/migrations/2018_07_03_091314_create_eventlog_table.php index 33aa29a4e0..110b9cdfe7 100644 --- a/database/migrations/2018_07_03_091314_create_eventlog_table.php +++ b/database/migrations/2018_07_03_091314_create_eventlog_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('eventlog', function (Blueprint $table) { $table->increments('event_id'); @@ -29,7 +29,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('eventlog'); } diff --git a/database/migrations/2018_07_03_091314_create_graph_types_table.php b/database/migrations/2018_07_03_091314_create_graph_types_table.php index cb3183b257..478b99e740 100644 --- a/database/migrations/2018_07_03_091314_create_graph_types_table.php +++ b/database/migrations/2018_07_03_091314_create_graph_types_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('graph_types', function (Blueprint $table) { $table->string('graph_type', 32)->index(); @@ -27,7 +27,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('graph_types'); } diff --git a/database/migrations/2018_07_03_091314_create_hrDevice_table.php b/database/migrations/2018_07_03_091314_create_hrDevice_table.php index dd4ff5ce49..eab5f2f1a9 100644 --- a/database/migrations/2018_07_03_091314_create_hrDevice_table.php +++ b/database/migrations/2018_07_03_091314_create_hrDevice_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('hrDevice', function (Blueprint $table) { $table->increments('hrDevice_id'); @@ -29,7 +29,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('hrDevice'); } diff --git a/database/migrations/2018_07_03_091314_create_ipsec_tunnels_table.php b/database/migrations/2018_07_03_091314_create_ipsec_tunnels_table.php index 780fcf658c..1d6268b2d8 100644 --- a/database/migrations/2018_07_03_091314_create_ipsec_tunnels_table.php +++ b/database/migrations/2018_07_03_091314_create_ipsec_tunnels_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ipsec_tunnels', function (Blueprint $table) { $table->increments('tunnel_id'); @@ -30,7 +30,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ipsec_tunnels'); } diff --git a/database/migrations/2018_07_03_091314_create_ipv4_addresses_table.php b/database/migrations/2018_07_03_091314_create_ipv4_addresses_table.php index 32a9ac9cd1..edc940e548 100644 --- a/database/migrations/2018_07_03_091314_create_ipv4_addresses_table.php +++ b/database/migrations/2018_07_03_091314_create_ipv4_addresses_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ipv4_addresses', function (Blueprint $table) { $table->increments('ipv4_address_id'); @@ -27,7 +27,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ipv4_addresses'); } diff --git a/database/migrations/2018_07_03_091314_create_ipv4_mac_table.php b/database/migrations/2018_07_03_091314_create_ipv4_mac_table.php index 4aba31c223..477f9e2b5c 100644 --- a/database/migrations/2018_07_03_091314_create_ipv4_mac_table.php +++ b/database/migrations/2018_07_03_091314_create_ipv4_mac_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ipv4_mac', function (Blueprint $table) { $table->id(); @@ -27,7 +27,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ipv4_mac'); } diff --git a/database/migrations/2018_07_03_091314_create_ipv4_networks_table.php b/database/migrations/2018_07_03_091314_create_ipv4_networks_table.php index 8af33ef4af..dff9898ced 100644 --- a/database/migrations/2018_07_03_091314_create_ipv4_networks_table.php +++ b/database/migrations/2018_07_03_091314_create_ipv4_networks_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ipv4_networks', function (Blueprint $table) { $table->increments('ipv4_network_id'); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ipv4_networks'); } diff --git a/database/migrations/2018_07_03_091314_create_ipv6_addresses_table.php b/database/migrations/2018_07_03_091314_create_ipv6_addresses_table.php index 21c49d1f60..4e062d8ea2 100644 --- a/database/migrations/2018_07_03_091314_create_ipv6_addresses_table.php +++ b/database/migrations/2018_07_03_091314_create_ipv6_addresses_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ipv6_addresses', function (Blueprint $table) { $table->increments('ipv6_address_id'); @@ -29,7 +29,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ipv6_addresses'); } diff --git a/database/migrations/2018_07_03_091314_create_ipv6_networks_table.php b/database/migrations/2018_07_03_091314_create_ipv6_networks_table.php index c247b00a5e..9459fa0981 100644 --- a/database/migrations/2018_07_03_091314_create_ipv6_networks_table.php +++ b/database/migrations/2018_07_03_091314_create_ipv6_networks_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ipv6_networks', function (Blueprint $table) { $table->increments('ipv6_network_id'); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ipv6_networks'); } diff --git a/database/migrations/2018_07_03_091314_create_juniAtmVp_table.php b/database/migrations/2018_07_03_091314_create_juniAtmVp_table.php index 670091da15..71d6f99863 100644 --- a/database/migrations/2018_07_03_091314_create_juniAtmVp_table.php +++ b/database/migrations/2018_07_03_091314_create_juniAtmVp_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('juniAtmVp', function (Blueprint $table) { $table->id(); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('juniAtmVp'); } diff --git a/database/migrations/2018_07_03_091314_create_links_table.php b/database/migrations/2018_07_03_091314_create_links_table.php index d105b67fde..28164784e4 100644 --- a/database/migrations/2018_07_03_091314_create_links_table.php +++ b/database/migrations/2018_07_03_091314_create_links_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('links', function (Blueprint $table) { $table->increments('id'); @@ -33,7 +33,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('links'); } diff --git a/database/migrations/2018_07_03_091314_create_loadbalancer_rservers_table.php b/database/migrations/2018_07_03_091314_create_loadbalancer_rservers_table.php index c49c8468f5..bda7c3aa15 100644 --- a/database/migrations/2018_07_03_091314_create_loadbalancer_rservers_table.php +++ b/database/migrations/2018_07_03_091314_create_loadbalancer_rservers_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('loadbalancer_rservers', function (Blueprint $table) { $table->increments('rserver_id'); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('loadbalancer_rservers'); } diff --git a/database/migrations/2018_07_03_091314_create_loadbalancer_vservers_table.php b/database/migrations/2018_07_03_091314_create_loadbalancer_vservers_table.php index 2e6221249d..80e94d5812 100644 --- a/database/migrations/2018_07_03_091314_create_loadbalancer_vservers_table.php +++ b/database/migrations/2018_07_03_091314_create_loadbalancer_vservers_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('loadbalancer_vservers', function (Blueprint $table) { $table->id(); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('loadbalancer_vservers'); } diff --git a/database/migrations/2018_07_03_091314_create_locations_table.php b/database/migrations/2018_07_03_091314_create_locations_table.php index 1623c64f6a..1b66e2cc6f 100644 --- a/database/migrations/2018_07_03_091314_create_locations_table.php +++ b/database/migrations/2018_07_03_091314_create_locations_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('locations', function (Blueprint $table) { $table->increments('id'); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('locations'); } diff --git a/database/migrations/2018_07_03_091314_create_mac_accounting_table.php b/database/migrations/2018_07_03_091314_create_mac_accounting_table.php index e901bbc8fa..9cd041cab9 100644 --- a/database/migrations/2018_07_03_091314_create_mac_accounting_table.php +++ b/database/migrations/2018_07_03_091314_create_mac_accounting_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('mac_accounting', function (Blueprint $table) { $table->increments('ma_id'); @@ -47,7 +47,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('mac_accounting'); } diff --git a/database/migrations/2018_07_03_091314_create_mefinfo_table.php b/database/migrations/2018_07_03_091314_create_mefinfo_table.php index 9075c7c3c5..3f49d68b5c 100644 --- a/database/migrations/2018_07_03_091314_create_mefinfo_table.php +++ b/database/migrations/2018_07_03_091314_create_mefinfo_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('mefinfo', function (Blueprint $table) { $table->increments('id'); @@ -29,7 +29,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('mefinfo'); } diff --git a/database/migrations/2018_07_03_091314_create_mempools_table.php b/database/migrations/2018_07_03_091314_create_mempools_table.php index f7623fba31..4a0e85d095 100644 --- a/database/migrations/2018_07_03_091314_create_mempools_table.php +++ b/database/migrations/2018_07_03_091314_create_mempools_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('mempools', function (Blueprint $table) { $table->increments('mempool_id'); @@ -37,7 +37,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('mempools'); } diff --git a/database/migrations/2018_07_03_091314_create_mibdefs_table.php b/database/migrations/2018_07_03_091314_create_mibdefs_table.php index 9e2f8e1215..1efd3fe630 100644 --- a/database/migrations/2018_07_03_091314_create_mibdefs_table.php +++ b/database/migrations/2018_07_03_091314_create_mibdefs_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('mibdefs', function (Blueprint $table) { $table->string('module'); @@ -36,7 +36,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('mibdefs'); } diff --git a/database/migrations/2018_07_03_091314_create_munin_plugins_ds_table.php b/database/migrations/2018_07_03_091314_create_munin_plugins_ds_table.php index 6d88018e6a..d4565d76bf 100644 --- a/database/migrations/2018_07_03_091314_create_munin_plugins_ds_table.php +++ b/database/migrations/2018_07_03_091314_create_munin_plugins_ds_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('munin_plugins_ds', function (Blueprint $table) { $table->unsignedInteger('mplug_id'); @@ -40,7 +40,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('munin_plugins_ds'); } diff --git a/database/migrations/2018_07_03_091314_create_munin_plugins_table.php b/database/migrations/2018_07_03_091314_create_munin_plugins_table.php index 2ecfa8d25c..1d379579a9 100644 --- a/database/migrations/2018_07_03_091314_create_munin_plugins_table.php +++ b/database/migrations/2018_07_03_091314_create_munin_plugins_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('munin_plugins', function (Blueprint $table) { $table->increments('mplug_id'); @@ -33,7 +33,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('munin_plugins'); } diff --git a/database/migrations/2018_07_03_091314_create_netscaler_vservers_table.php b/database/migrations/2018_07_03_091314_create_netscaler_vservers_table.php index 48eeaa9f88..c88b1bf364 100644 --- a/database/migrations/2018_07_03_091314_create_netscaler_vservers_table.php +++ b/database/migrations/2018_07_03_091314_create_netscaler_vservers_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('netscaler_vservers', function (Blueprint $table) { $table->increments('vsvr_id'); @@ -33,7 +33,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('netscaler_vservers'); } diff --git a/database/migrations/2018_07_03_091314_create_notifications_attribs_table.php b/database/migrations/2018_07_03_091314_create_notifications_attribs_table.php index 857e7f825c..458d3c0754 100644 --- a/database/migrations/2018_07_03_091314_create_notifications_attribs_table.php +++ b/database/migrations/2018_07_03_091314_create_notifications_attribs_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('notifications_attribs', function (Blueprint $table) { $table->increments('attrib_id'); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('notifications_attribs'); } diff --git a/database/migrations/2018_07_03_091314_create_notifications_table.php b/database/migrations/2018_07_03_091314_create_notifications_table.php index e109b43afd..68c09e905a 100644 --- a/database/migrations/2018_07_03_091314_create_notifications_table.php +++ b/database/migrations/2018_07_03_091314_create_notifications_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('notifications', function (Blueprint $table) { $table->increments('notifications_id'); @@ -28,7 +28,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('notifications'); } diff --git a/database/migrations/2018_07_03_091314_create_ospf_areas_table.php b/database/migrations/2018_07_03_091314_create_ospf_areas_table.php index 7fd1106c78..a3e75ee26e 100644 --- a/database/migrations/2018_07_03_091314_create_ospf_areas_table.php +++ b/database/migrations/2018_07_03_091314_create_ospf_areas_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ospf_areas', function (Blueprint $table) { $table->increments('id'); @@ -35,7 +35,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ospf_areas'); } diff --git a/database/migrations/2018_07_03_091314_create_ospf_instances_table.php b/database/migrations/2018_07_03_091314_create_ospf_instances_table.php index 836d851f49..a8f80142b0 100644 --- a/database/migrations/2018_07_03_091314_create_ospf_instances_table.php +++ b/database/migrations/2018_07_03_091314_create_ospf_instances_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ospf_instances', function (Blueprint $table) { $table->increments('id'); @@ -40,7 +40,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ospf_instances'); } diff --git a/database/migrations/2018_07_03_091314_create_ospf_nbrs_table.php b/database/migrations/2018_07_03_091314_create_ospf_nbrs_table.php index 8103775b9f..415d3da651 100644 --- a/database/migrations/2018_07_03_091314_create_ospf_nbrs_table.php +++ b/database/migrations/2018_07_03_091314_create_ospf_nbrs_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ospf_nbrs', function (Blueprint $table) { $table->increments('id'); @@ -38,7 +38,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ospf_nbrs'); } diff --git a/database/migrations/2018_07_03_091314_create_ospf_ports_table.php b/database/migrations/2018_07_03_091314_create_ospf_ports_table.php index 1583b29364..ff84b64ab7 100644 --- a/database/migrations/2018_07_03_091314_create_ospf_ports_table.php +++ b/database/migrations/2018_07_03_091314_create_ospf_ports_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ospf_ports', function (Blueprint $table) { $table->increments('id'); @@ -47,7 +47,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ospf_ports'); } diff --git a/database/migrations/2018_07_03_091314_create_packages_table.php b/database/migrations/2018_07_03_091314_create_packages_table.php index 2c9bff0d80..ae11d2ba27 100644 --- a/database/migrations/2018_07_03_091314_create_packages_table.php +++ b/database/migrations/2018_07_03_091314_create_packages_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('packages', function (Blueprint $table) { $table->increments('pkg_id'); @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('packages'); } diff --git a/database/migrations/2018_07_03_091314_create_pdb_ix_peers_table.php b/database/migrations/2018_07_03_091314_create_pdb_ix_peers_table.php index 06f532ed25..a500b2fb6a 100644 --- a/database/migrations/2018_07_03_091314_create_pdb_ix_peers_table.php +++ b/database/migrations/2018_07_03_091314_create_pdb_ix_peers_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('pdb_ix_peers', function (Blueprint $table) { $table->increments('pdb_ix_peers_id'); @@ -29,7 +29,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('pdb_ix_peers'); } diff --git a/database/migrations/2018_07_03_091314_create_pdb_ix_table.php b/database/migrations/2018_07_03_091314_create_pdb_ix_table.php index 060586b4bd..19d353608f 100644 --- a/database/migrations/2018_07_03_091314_create_pdb_ix_table.php +++ b/database/migrations/2018_07_03_091314_create_pdb_ix_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('pdb_ix', function (Blueprint $table) { $table->increments('pdb_ix_id'); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('pdb_ix'); } diff --git a/database/migrations/2018_07_03_091314_create_perf_times_table.php b/database/migrations/2018_07_03_091314_create_perf_times_table.php index 33afa3d291..ac9034ef21 100644 --- a/database/migrations/2018_07_03_091314_create_perf_times_table.php +++ b/database/migrations/2018_07_03_091314_create_perf_times_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('perf_times', function (Blueprint $table) { $table->increments('id'); @@ -28,7 +28,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('perf_times'); } diff --git a/database/migrations/2018_07_03_091314_create_plugins_table.php b/database/migrations/2018_07_03_091314_create_plugins_table.php index 27bee0eeed..1625338fc2 100644 --- a/database/migrations/2018_07_03_091314_create_plugins_table.php +++ b/database/migrations/2018_07_03_091314_create_plugins_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('plugins', function (Blueprint $table) { $table->increments('plugin_id'); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('plugins'); } diff --git a/database/migrations/2018_07_03_091314_create_poller_cluster_stats_table.php b/database/migrations/2018_07_03_091314_create_poller_cluster_stats_table.php index d15f5618d5..b856a68418 100644 --- a/database/migrations/2018_07_03_091314_create_poller_cluster_stats_table.php +++ b/database/migrations/2018_07_03_091314_create_poller_cluster_stats_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('poller_cluster_stats', function (Blueprint $table) { $table->increments('id'); @@ -30,7 +30,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('poller_cluster_stats'); } diff --git a/database/migrations/2018_07_03_091314_create_poller_cluster_table.php b/database/migrations/2018_07_03_091314_create_poller_cluster_table.php index bf6d1fb566..237ac7a1b7 100644 --- a/database/migrations/2018_07_03_091314_create_poller_cluster_table.php +++ b/database/migrations/2018_07_03_091314_create_poller_cluster_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('poller_cluster', function (Blueprint $table) { $table->increments('id'); @@ -28,7 +28,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('poller_cluster'); } diff --git a/database/migrations/2018_07_03_091314_create_poller_groups_table.php b/database/migrations/2018_07_03_091314_create_poller_groups_table.php index 62e41fe32d..a312c1615d 100644 --- a/database/migrations/2018_07_03_091314_create_poller_groups_table.php +++ b/database/migrations/2018_07_03_091314_create_poller_groups_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('poller_groups', function (Blueprint $table) { $table->increments('id'); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('poller_groups'); } diff --git a/database/migrations/2018_07_03_091314_create_pollers_table.php b/database/migrations/2018_07_03_091314_create_pollers_table.php index cfee0a3dbc..e57972eb4b 100644 --- a/database/migrations/2018_07_03_091314_create_pollers_table.php +++ b/database/migrations/2018_07_03_091314_create_pollers_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('pollers', function (Blueprint $table) { $table->increments('id'); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('pollers'); } diff --git a/database/migrations/2018_07_03_091314_create_ports_adsl_table.php b/database/migrations/2018_07_03_091314_create_ports_adsl_table.php index ced5be8b8b..3f8b44c64a 100644 --- a/database/migrations/2018_07_03_091314_create_ports_adsl_table.php +++ b/database/migrations/2018_07_03_091314_create_ports_adsl_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ports_adsl', function (Blueprint $table) { $table->unsignedInteger('port_id')->unique(); @@ -40,7 +40,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ports_adsl'); } diff --git a/database/migrations/2018_07_03_091314_create_ports_fdb_table.php b/database/migrations/2018_07_03_091314_create_ports_fdb_table.php index 9d22cea80f..6f07d21d2d 100644 --- a/database/migrations/2018_07_03_091314_create_ports_fdb_table.php +++ b/database/migrations/2018_07_03_091314_create_ports_fdb_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ports_fdb', function (Blueprint $table) { $table->unsignedBigInteger('ports_fdb_id', true); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ports_fdb'); } diff --git a/database/migrations/2018_07_03_091314_create_ports_nac_table.php b/database/migrations/2018_07_03_091314_create_ports_nac_table.php index 84032c2fd1..a0a7a6b3f1 100644 --- a/database/migrations/2018_07_03_091314_create_ports_nac_table.php +++ b/database/migrations/2018_07_03_091314_create_ports_nac_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ports_nac', function (Blueprint $table) { $table->increments('ports_nac_id'); @@ -38,7 +38,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ports_nac'); } diff --git a/database/migrations/2018_07_03_091314_create_ports_perms_table.php b/database/migrations/2018_07_03_091314_create_ports_perms_table.php index 0e61a93498..75303b0e45 100644 --- a/database/migrations/2018_07_03_091314_create_ports_perms_table.php +++ b/database/migrations/2018_07_03_091314_create_ports_perms_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ports_perms', function (Blueprint $table) { $table->id(); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ports_perms'); } diff --git a/database/migrations/2018_07_03_091314_create_ports_stack_table.php b/database/migrations/2018_07_03_091314_create_ports_stack_table.php index 0165ac69a3..f54d258a35 100644 --- a/database/migrations/2018_07_03_091314_create_ports_stack_table.php +++ b/database/migrations/2018_07_03_091314_create_ports_stack_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ports_stack', function (Blueprint $table) { $table->unsignedInteger('device_id'); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ports_stack'); } diff --git a/database/migrations/2018_07_03_091314_create_ports_statistics_table.php b/database/migrations/2018_07_03_091314_create_ports_statistics_table.php index 1092223e05..03f6274adf 100644 --- a/database/migrations/2018_07_03_091314_create_ports_statistics_table.php +++ b/database/migrations/2018_07_03_091314_create_ports_statistics_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ports_statistics', function (Blueprint $table) { $table->unsignedInteger('port_id')->primary(); @@ -58,7 +58,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ports_statistics'); } diff --git a/database/migrations/2018_07_03_091314_create_ports_stp_table.php b/database/migrations/2018_07_03_091314_create_ports_stp_table.php index 43d611c830..c60548d79c 100644 --- a/database/migrations/2018_07_03_091314_create_ports_stp_table.php +++ b/database/migrations/2018_07_03_091314_create_ports_stp_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ports_stp', function (Blueprint $table) { $table->increments('port_stp_id'); @@ -34,7 +34,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ports_stp'); } diff --git a/database/migrations/2018_07_03_091314_create_ports_table.php b/database/migrations/2018_07_03_091314_create_ports_table.php index 591de25bb4..ef7659f109 100644 --- a/database/migrations/2018_07_03_091314_create_ports_table.php +++ b/database/migrations/2018_07_03_091314_create_ports_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ports', function (Blueprint $table) { $table->increments('port_id'); @@ -94,7 +94,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ports'); } diff --git a/database/migrations/2018_07_03_091314_create_ports_vlans_table.php b/database/migrations/2018_07_03_091314_create_ports_vlans_table.php index ebc67d3b1d..e11bd743d6 100644 --- a/database/migrations/2018_07_03_091314_create_ports_vlans_table.php +++ b/database/migrations/2018_07_03_091314_create_ports_vlans_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ports_vlans', function (Blueprint $table) { $table->increments('port_vlan_id'); @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ports_vlans'); } diff --git a/database/migrations/2018_07_03_091314_create_processes_table.php b/database/migrations/2018_07_03_091314_create_processes_table.php index d3fa4efbc7..66c5b7f9be 100644 --- a/database/migrations/2018_07_03_091314_create_processes_table.php +++ b/database/migrations/2018_07_03_091314_create_processes_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('processes', function (Blueprint $table) { $table->id(); @@ -29,7 +29,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('processes'); } diff --git a/database/migrations/2018_07_03_091314_create_processors_table.php b/database/migrations/2018_07_03_091314_create_processors_table.php index 8f5715ea48..441335d008 100644 --- a/database/migrations/2018_07_03_091314_create_processors_table.php +++ b/database/migrations/2018_07_03_091314_create_processors_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('processors', function (Blueprint $table) { $table->increments('processor_id'); @@ -32,7 +32,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('processors'); } diff --git a/database/migrations/2018_07_03_091314_create_proxmox_ports_table.php b/database/migrations/2018_07_03_091314_create_proxmox_ports_table.php index d8022f8aaf..215e09c5a1 100644 --- a/database/migrations/2018_07_03_091314_create_proxmox_ports_table.php +++ b/database/migrations/2018_07_03_091314_create_proxmox_ports_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('proxmox_ports', function (Blueprint $table) { $table->increments('id'); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('proxmox_ports'); } diff --git a/database/migrations/2018_07_03_091314_create_proxmox_table.php b/database/migrations/2018_07_03_091314_create_proxmox_table.php index dc66812646..bc37bf0241 100644 --- a/database/migrations/2018_07_03_091314_create_proxmox_table.php +++ b/database/migrations/2018_07_03_091314_create_proxmox_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('proxmox', function (Blueprint $table) { $table->increments('id'); @@ -28,7 +28,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('proxmox'); } diff --git a/database/migrations/2018_07_03_091314_create_pseudowires_table.php b/database/migrations/2018_07_03_091314_create_pseudowires_table.php index 06c5fb8d28..9e4b4ad877 100644 --- a/database/migrations/2018_07_03_091314_create_pseudowires_table.php +++ b/database/migrations/2018_07_03_091314_create_pseudowires_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('pseudowires', function (Blueprint $table) { $table->increments('pseudowire_id'); @@ -33,7 +33,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('pseudowires'); } diff --git a/database/migrations/2018_07_03_091314_create_route_table.php b/database/migrations/2018_07_03_091314_create_route_table.php index 25602e0ed3..60ec885d90 100644 --- a/database/migrations/2018_07_03_091314_create_route_table.php +++ b/database/migrations/2018_07_03_091314_create_route_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('route', function (Blueprint $table) { $table->unsignedInteger('device_id'); @@ -32,7 +32,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('route'); } diff --git a/database/migrations/2018_07_03_091314_create_sensors_table.php b/database/migrations/2018_07_03_091314_create_sensors_table.php index d5a825524a..381da8eefe 100644 --- a/database/migrations/2018_07_03_091314_create_sensors_table.php +++ b/database/migrations/2018_07_03_091314_create_sensors_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('sensors', function (Blueprint $table) { $table->increments('sensor_id'); @@ -49,7 +49,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('sensors'); } diff --git a/database/migrations/2018_07_03_091314_create_sensors_to_state_indexes_table.php b/database/migrations/2018_07_03_091314_create_sensors_to_state_indexes_table.php index 4b4e3bb728..735e54e249 100644 --- a/database/migrations/2018_07_03_091314_create_sensors_to_state_indexes_table.php +++ b/database/migrations/2018_07_03_091314_create_sensors_to_state_indexes_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('sensors_to_state_indexes', function (Blueprint $table) { $table->increments('sensors_to_state_translations_id'); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('sensors_to_state_indexes'); } diff --git a/database/migrations/2018_07_03_091314_create_services_table.php b/database/migrations/2018_07_03_091314_create_services_table.php index 4c15257140..6c711df58d 100644 --- a/database/migrations/2018_07_03_091314_create_services_table.php +++ b/database/migrations/2018_07_03_091314_create_services_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('services', function (Blueprint $table) { $table->increments('service_id'); @@ -33,7 +33,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('services'); } diff --git a/database/migrations/2018_07_03_091314_create_session_table.php b/database/migrations/2018_07_03_091314_create_session_table.php index 1641a1a270..fb9dec18bb 100644 --- a/database/migrations/2018_07_03_091314_create_session_table.php +++ b/database/migrations/2018_07_03_091314_create_session_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('session', function (Blueprint $table) { $table->increments('session_id'); @@ -27,7 +27,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('session'); } diff --git a/database/migrations/2018_07_03_091314_create_slas_table.php b/database/migrations/2018_07_03_091314_create_slas_table.php index 14de09cfa1..4ca5c8b65b 100644 --- a/database/migrations/2018_07_03_091314_create_slas_table.php +++ b/database/migrations/2018_07_03_091314_create_slas_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('slas', function (Blueprint $table) { $table->increments('sla_id'); @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('slas'); } diff --git a/database/migrations/2018_07_03_091314_create_state_indexes_table.php b/database/migrations/2018_07_03_091314_create_state_indexes_table.php index fa49e728f3..6e7583fd71 100644 --- a/database/migrations/2018_07_03_091314_create_state_indexes_table.php +++ b/database/migrations/2018_07_03_091314_create_state_indexes_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('state_indexes', function (Blueprint $table) { $table->increments('state_index_id'); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('state_indexes'); } diff --git a/database/migrations/2018_07_03_091314_create_state_translations_table.php b/database/migrations/2018_07_03_091314_create_state_translations_table.php index 22cdbeb87b..7eef754f7d 100644 --- a/database/migrations/2018_07_03_091314_create_state_translations_table.php +++ b/database/migrations/2018_07_03_091314_create_state_translations_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('state_translations', function (Blueprint $table) { $table->increments('state_translation_id'); @@ -33,7 +33,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('state_translations'); } diff --git a/database/migrations/2018_07_03_091314_create_storage_table.php b/database/migrations/2018_07_03_091314_create_storage_table.php index 20b5b7c929..fb2979b471 100644 --- a/database/migrations/2018_07_03_091314_create_storage_table.php +++ b/database/migrations/2018_07_03_091314_create_storage_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('storage', function (Blueprint $table) { $table->increments('storage_id'); @@ -35,7 +35,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('storage'); } diff --git a/database/migrations/2018_07_03_091314_create_stp_table.php b/database/migrations/2018_07_03_091314_create_stp_table.php index 1f0dc7b178..d280d380f8 100644 --- a/database/migrations/2018_07_03_091314_create_stp_table.php +++ b/database/migrations/2018_07_03_091314_create_stp_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('stp', function (Blueprint $table) { $table->increments('stp_id'); @@ -39,7 +39,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('stp'); } diff --git a/database/migrations/2018_07_03_091314_create_syslog_table.php b/database/migrations/2018_07_03_091314_create_syslog_table.php index d60a15c4d5..b184073b9b 100644 --- a/database/migrations/2018_07_03_091314_create_syslog_table.php +++ b/database/migrations/2018_07_03_091314_create_syslog_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('syslog', function (Blueprint $table) { $table->unsignedInteger('device_id')->nullable()->index(); @@ -32,7 +32,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('syslog'); } diff --git a/database/migrations/2018_07_03_091314_create_tnmsneinfo_table.php b/database/migrations/2018_07_03_091314_create_tnmsneinfo_table.php index 9bea979244..1c29bab811 100644 --- a/database/migrations/2018_07_03_091314_create_tnmsneinfo_table.php +++ b/database/migrations/2018_07_03_091314_create_tnmsneinfo_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('tnmsneinfo', function (Blueprint $table) { $table->increments('id'); @@ -30,7 +30,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('tnmsneinfo'); } diff --git a/database/migrations/2018_07_03_091314_create_toner_table.php b/database/migrations/2018_07_03_091314_create_toner_table.php index a1c46c833c..ccb9692688 100644 --- a/database/migrations/2018_07_03_091314_create_toner_table.php +++ b/database/migrations/2018_07_03_091314_create_toner_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('toner', function (Blueprint $table) { $table->increments('toner_id'); @@ -30,7 +30,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('toner'); } diff --git a/database/migrations/2018_07_03_091314_create_transport_group_transport_table.php b/database/migrations/2018_07_03_091314_create_transport_group_transport_table.php index 8f1c561d8e..ccfe178caa 100644 --- a/database/migrations/2018_07_03_091314_create_transport_group_transport_table.php +++ b/database/migrations/2018_07_03_091314_create_transport_group_transport_table.php @@ -33,7 +33,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('transport_group_transport', function (Blueprint $table) { $table->id(); @@ -47,7 +47,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('transport_group_transport'); } diff --git a/database/migrations/2018_07_03_091314_create_ucd_diskio_table.php b/database/migrations/2018_07_03_091314_create_ucd_diskio_table.php index 47e8f052b0..2fe1be332f 100644 --- a/database/migrations/2018_07_03_091314_create_ucd_diskio_table.php +++ b/database/migrations/2018_07_03_091314_create_ucd_diskio_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ucd_diskio', function (Blueprint $table) { $table->increments('diskio_id'); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ucd_diskio'); } diff --git a/database/migrations/2018_07_03_091314_create_users_prefs_table.php b/database/migrations/2018_07_03_091314_create_users_prefs_table.php index 3ffe73b33c..9a349c167a 100644 --- a/database/migrations/2018_07_03_091314_create_users_prefs_table.php +++ b/database/migrations/2018_07_03_091314_create_users_prefs_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('users_prefs', function (Blueprint $table) { $table->unsignedInteger('user_id'); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('users_prefs'); } diff --git a/database/migrations/2018_07_03_091314_create_users_table.php b/database/migrations/2018_07_03_091314_create_users_table.php index 1f2af09085..8b03ad0917 100644 --- a/database/migrations/2018_07_03_091314_create_users_table.php +++ b/database/migrations/2018_07_03_091314_create_users_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('users', function (Blueprint $table) { $table->increments('user_id'); @@ -35,7 +35,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('users'); } diff --git a/database/migrations/2018_07_03_091314_create_users_widgets_table.php b/database/migrations/2018_07_03_091314_create_users_widgets_table.php index 51cc6522f6..ec57b6cf5d 100644 --- a/database/migrations/2018_07_03_091314_create_users_widgets_table.php +++ b/database/migrations/2018_07_03_091314_create_users_widgets_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('users_widgets', function (Blueprint $table) { $table->increments('user_widget_id'); @@ -33,7 +33,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('users_widgets'); } diff --git a/database/migrations/2018_07_03_091314_create_vlans_table.php b/database/migrations/2018_07_03_091314_create_vlans_table.php index 0fe4b99814..aaedab05a0 100644 --- a/database/migrations/2018_07_03_091314_create_vlans_table.php +++ b/database/migrations/2018_07_03_091314_create_vlans_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('vlans', function (Blueprint $table) { $table->increments('vlan_id'); @@ -29,7 +29,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('vlans'); } diff --git a/database/migrations/2018_07_03_091314_create_vminfo_table.php b/database/migrations/2018_07_03_091314_create_vminfo_table.php index 2bbf454d4d..df28d23c30 100644 --- a/database/migrations/2018_07_03_091314_create_vminfo_table.php +++ b/database/migrations/2018_07_03_091314_create_vminfo_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('vminfo', function (Blueprint $table) { $table->increments('id'); @@ -30,7 +30,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('vminfo'); } diff --git a/database/migrations/2018_07_03_091314_create_vrf_lite_cisco_table.php b/database/migrations/2018_07_03_091314_create_vrf_lite_cisco_table.php index 1143921cc8..d94261668c 100644 --- a/database/migrations/2018_07_03_091314_create_vrf_lite_cisco_table.php +++ b/database/migrations/2018_07_03_091314_create_vrf_lite_cisco_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('vrf_lite_cisco', function (Blueprint $table) { $table->increments('vrf_lite_cisco_id'); @@ -27,7 +27,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('vrf_lite_cisco'); } diff --git a/database/migrations/2018_07_03_091314_create_vrfs_table.php b/database/migrations/2018_07_03_091314_create_vrfs_table.php index 2ebc571dd3..0802ff96d0 100644 --- a/database/migrations/2018_07_03_091314_create_vrfs_table.php +++ b/database/migrations/2018_07_03_091314_create_vrfs_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('vrfs', function (Blueprint $table) { $table->increments('vrf_id'); @@ -27,7 +27,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('vrfs'); } diff --git a/database/migrations/2018_07_03_091314_create_widgets_table.php b/database/migrations/2018_07_03_091314_create_widgets_table.php index b42770b886..d78471d063 100644 --- a/database/migrations/2018_07_03_091314_create_widgets_table.php +++ b/database/migrations/2018_07_03_091314_create_widgets_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('widgets', function (Blueprint $table) { $table->increments('widget_id'); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('widgets'); } diff --git a/database/migrations/2018_07_03_091314_create_wireless_sensors_table.php b/database/migrations/2018_07_03_091314_create_wireless_sensors_table.php index 6564e42862..8c1d651575 100644 --- a/database/migrations/2018_07_03_091314_create_wireless_sensors_table.php +++ b/database/migrations/2018_07_03_091314_create_wireless_sensors_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('wireless_sensors', function (Blueprint $table) { $table->increments('sensor_id'); @@ -44,7 +44,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('wireless_sensors'); } diff --git a/database/migrations/2018_07_03_091322_add_foreign_keys_to_component_prefs_table.php b/database/migrations/2018_07_03_091322_add_foreign_keys_to_component_prefs_table.php index 11f108aed7..60657e23d3 100644 --- a/database/migrations/2018_07_03_091322_add_foreign_keys_to_component_prefs_table.php +++ b/database/migrations/2018_07_03_091322_add_foreign_keys_to_component_prefs_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('component_prefs', function (Blueprint $table) { $table->foreign('component', 'component_prefs_ibfk_1')->references('id')->on('component')->onUpdate('CASCADE')->onDelete('CASCADE'); @@ -22,7 +22,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { if (\LibreNMS\DB\Eloquent::getDriver() !== 'sqlite') { Schema::table('component_prefs', function (Blueprint $table) { diff --git a/database/migrations/2018_07_03_091322_add_foreign_keys_to_component_statuslog_table.php b/database/migrations/2018_07_03_091322_add_foreign_keys_to_component_statuslog_table.php index 1b69829e7f..7e5a837321 100644 --- a/database/migrations/2018_07_03_091322_add_foreign_keys_to_component_statuslog_table.php +++ b/database/migrations/2018_07_03_091322_add_foreign_keys_to_component_statuslog_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('component_statuslog', function (Blueprint $table) { $table->foreign('component_id', 'component_statuslog_ibfk_1')->references('id')->on('component')->onUpdate('CASCADE')->onDelete('CASCADE'); @@ -22,7 +22,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { if (\LibreNMS\DB\Eloquent::getDriver() !== 'sqlite') { Schema::table('component_statuslog', function (Blueprint $table) { diff --git a/database/migrations/2018_07_03_091322_add_foreign_keys_to_device_group_device_table.php b/database/migrations/2018_07_03_091322_add_foreign_keys_to_device_group_device_table.php index ff78fad37f..676f102b29 100644 --- a/database/migrations/2018_07_03_091322_add_foreign_keys_to_device_group_device_table.php +++ b/database/migrations/2018_07_03_091322_add_foreign_keys_to_device_group_device_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('device_group_device', function (Blueprint $table) { $table->foreign('device_group_id')->references('id')->on('device_groups')->onUpdate('RESTRICT')->onDelete('CASCADE'); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { if (\LibreNMS\DB\Eloquent::getDriver() !== 'sqlite') { Schema::table('device_group_device', function (Blueprint $table) { diff --git a/database/migrations/2018_07_03_091322_add_foreign_keys_to_device_relationships_table.php b/database/migrations/2018_07_03_091322_add_foreign_keys_to_device_relationships_table.php index 6a42e2fc3a..a59f28eafc 100644 --- a/database/migrations/2018_07_03_091322_add_foreign_keys_to_device_relationships_table.php +++ b/database/migrations/2018_07_03_091322_add_foreign_keys_to_device_relationships_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('device_relationships', function (Blueprint $table) { $table->foreign('child_device_id', 'device_relationship_child_device_id_fk')->references('device_id')->on('devices')->onUpdate('RESTRICT')->onDelete('CASCADE'); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { if (\LibreNMS\DB\Eloquent::getDriver() !== 'sqlite') { Schema::table('device_relationships', function (Blueprint $table) { diff --git a/database/migrations/2018_07_03_091322_add_foreign_keys_to_sensors_table.php b/database/migrations/2018_07_03_091322_add_foreign_keys_to_sensors_table.php index e9ca2cf22e..d2f5307866 100644 --- a/database/migrations/2018_07_03_091322_add_foreign_keys_to_sensors_table.php +++ b/database/migrations/2018_07_03_091322_add_foreign_keys_to_sensors_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('sensors', function (Blueprint $table) { $table->foreign('device_id')->references('device_id')->on('devices')->onUpdate('RESTRICT')->onDelete('CASCADE'); @@ -22,7 +22,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { if (\LibreNMS\DB\Eloquent::getDriver() !== 'sqlite') { Schema::table('sensors', function (Blueprint $table) { diff --git a/database/migrations/2018_07_03_091322_add_foreign_keys_to_sensors_to_state_indexes_table.php b/database/migrations/2018_07_03_091322_add_foreign_keys_to_sensors_to_state_indexes_table.php index 9d5a0e6c4d..7b1ed729f8 100644 --- a/database/migrations/2018_07_03_091322_add_foreign_keys_to_sensors_to_state_indexes_table.php +++ b/database/migrations/2018_07_03_091322_add_foreign_keys_to_sensors_to_state_indexes_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('sensors_to_state_indexes', function (Blueprint $table) { $table->foreign('state_index_id', 'sensors_to_state_indexes_ibfk_1')->references('state_index_id')->on('state_indexes')->onUpdate('RESTRICT')->onDelete('RESTRICT'); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { if (\LibreNMS\DB\Eloquent::getDriver() !== 'sqlite') { Schema::table('sensors_to_state_indexes', function (Blueprint $table) { diff --git a/database/migrations/2018_07_03_091322_add_foreign_keys_to_wireless_sensors_table.php b/database/migrations/2018_07_03_091322_add_foreign_keys_to_wireless_sensors_table.php index b73900fa04..92f96b2865 100644 --- a/database/migrations/2018_07_03_091322_add_foreign_keys_to_wireless_sensors_table.php +++ b/database/migrations/2018_07_03_091322_add_foreign_keys_to_wireless_sensors_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('wireless_sensors', function (Blueprint $table) { $table->foreign('device_id')->references('device_id')->on('devices')->onUpdate('RESTRICT')->onDelete('CASCADE'); @@ -22,7 +22,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { if (\LibreNMS\DB\Eloquent::getDriver() !== 'sqlite') { Schema::table('wireless_sensors', function (Blueprint $table) { diff --git a/database/migrations/2019_01_16_132200_add_vlan_and_elapsed_to_nac.php b/database/migrations/2019_01_16_132200_add_vlan_and_elapsed_to_nac.php index f7e39df459..cebb3ca0c0 100644 --- a/database/migrations/2019_01_16_132200_add_vlan_and_elapsed_to_nac.php +++ b/database/migrations/2019_01_16_132200_add_vlan_and_elapsed_to_nac.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('ports_nac', function (Blueprint $table) { $table->unsignedInteger('vlan')->nullable(); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('ports_nac', function (Blueprint $table) { $table->dropColumn(['vlan', 'time_elapsed']); diff --git a/database/migrations/2019_01_16_195644_add_vrf_id_and_bgpLocalAs.php b/database/migrations/2019_01_16_195644_add_vrf_id_and_bgpLocalAs.php index 476fe6d72a..7459028c7d 100644 --- a/database/migrations/2019_01_16_195644_add_vrf_id_and_bgpLocalAs.php +++ b/database/migrations/2019_01_16_195644_add_vrf_id_and_bgpLocalAs.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('bgpPeers', function (Blueprint $table) { $table->unsignedInteger('vrf_id')->nullable()->after('device_id'); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('bgpPeers', function (Blueprint $table) { $table->dropColumn('vrf_id'); diff --git a/database/migrations/2019_02_05_140857_remove_config_definition_from_db.php b/database/migrations/2019_02_05_140857_remove_config_definition_from_db.php index 578a91aa9e..bba612dbcf 100644 --- a/database/migrations/2019_02_05_140857_remove_config_definition_from_db.php +++ b/database/migrations/2019_02_05_140857_remove_config_definition_from_db.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('config', function (Blueprint $table) { $table->dropColumn([ @@ -32,7 +32,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('config', function (Blueprint $table) { $table->string('config_default', 512)->nullable(); diff --git a/database/migrations/2019_02_10_220000_add_dates_to_fdb.php b/database/migrations/2019_02_10_220000_add_dates_to_fdb.php index 4fce5f81d3..91b6e0a77e 100644 --- a/database/migrations/2019_02_10_220000_add_dates_to_fdb.php +++ b/database/migrations/2019_02_10_220000_add_dates_to_fdb.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('ports_fdb', function (Blueprint $table) { $table->timestamps(); @@ -27,7 +27,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('ports_fdb', function (Blueprint $table) { $table->dropColumn(['created_at', 'updated_at']); diff --git a/database/migrations/2019_04_22_220000_update_route_table.php b/database/migrations/2019_04_22_220000_update_route_table.php index b9a54ed28d..969832475c 100644 --- a/database/migrations/2019_04_22_220000_update_route_table.php +++ b/database/migrations/2019_04_22_220000_update_route_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { //Remove the old route table, as it is not used anymore. Schema::drop('route'); @@ -40,7 +40,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('route'); // Create the old route table to reverse this. diff --git a/database/migrations/2019_05_12_202407_create_mpls_lsps_table.php b/database/migrations/2019_05_12_202407_create_mpls_lsps_table.php index dc74a25275..b821063cda 100644 --- a/database/migrations/2019_05_12_202407_create_mpls_lsps_table.php +++ b/database/migrations/2019_05_12_202407_create_mpls_lsps_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('mpls_lsps', function (Blueprint $table) { $table->increments('lsp_id'); @@ -44,7 +44,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('mpls_lsps'); } diff --git a/database/migrations/2019_05_12_202408_create_mpls_lsp_paths_table.php b/database/migrations/2019_05_12_202408_create_mpls_lsp_paths_table.php index a061cbd953..55175ffab7 100644 --- a/database/migrations/2019_05_12_202408_create_mpls_lsp_paths_table.php +++ b/database/migrations/2019_05_12_202408_create_mpls_lsp_paths_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('mpls_lsp_paths', function (Blueprint $table) { $table->increments('lsp_path_id'); @@ -41,7 +41,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('mpls_lsp_paths'); } diff --git a/database/migrations/2019_05_30_225937_device_groups_rewrite.php b/database/migrations/2019_05_30_225937_device_groups_rewrite.php index a3268281f5..2adcdd5afc 100644 --- a/database/migrations/2019_05_30_225937_device_groups_rewrite.php +++ b/database/migrations/2019_05_30_225937_device_groups_rewrite.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('device_groups', function (Blueprint $table) { $table->string('desc')->nullable()->change(); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { if (\LibreNMS\DB\Eloquent::getDriver() !== 'sqlite') { Schema::table('device_groups', function (Blueprint $table) { diff --git a/database/migrations/2019_06_30_190400_create_mpls_sdps_table.php b/database/migrations/2019_06_30_190400_create_mpls_sdps_table.php index a12093ce73..6430de11e4 100644 --- a/database/migrations/2019_06_30_190400_create_mpls_sdps_table.php +++ b/database/migrations/2019_06_30_190400_create_mpls_sdps_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('mpls_sdps', function (Blueprint $table) { $table->increments('sdp_id'); @@ -37,7 +37,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('mpls_sdps'); } diff --git a/database/migrations/2019_06_30_190401_create_mpls_sdp_binds_table.php b/database/migrations/2019_06_30_190401_create_mpls_sdp_binds_table.php index d273cdf705..9acf20029f 100644 --- a/database/migrations/2019_06_30_190401_create_mpls_sdp_binds_table.php +++ b/database/migrations/2019_06_30_190401_create_mpls_sdp_binds_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('mpls_sdp_binds', function (Blueprint $table) { $table->increments('bind_id'); @@ -39,7 +39,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('mpls_sdp_binds'); } diff --git a/database/migrations/2019_06_30_190402_create_mpls_services_table.php b/database/migrations/2019_06_30_190402_create_mpls_services_table.php index dcab6bc735..0f2df272a7 100644 --- a/database/migrations/2019_06_30_190402_create_mpls_services_table.php +++ b/database/migrations/2019_06_30_190402_create_mpls_services_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('mpls_services', function (Blueprint $table) { $table->increments('svc_id'); @@ -42,7 +42,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('mpls_services'); } diff --git a/database/migrations/2019_07_03_132417_create_mpls_saps_table.php b/database/migrations/2019_07_03_132417_create_mpls_saps_table.php index e3598d7fc7..6757ed1c00 100644 --- a/database/migrations/2019_07_03_132417_create_mpls_saps_table.php +++ b/database/migrations/2019_07_03_132417_create_mpls_saps_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('mpls_saps', function (Blueprint $table) { $table->increments('sap_id'); @@ -36,7 +36,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('mpls_saps'); } diff --git a/database/migrations/2019_07_09_150217_update_users_widgets_settings.php b/database/migrations/2019_07_09_150217_update_users_widgets_settings.php index cf2ca35c36..6b93c8e5c2 100644 --- a/database/migrations/2019_07_09_150217_update_users_widgets_settings.php +++ b/database/migrations/2019_07_09_150217_update_users_widgets_settings.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { /** @phpstan-ignore-next-line */ $widgets = UserWidget::where('widget_id', 1)->get(); @@ -30,7 +30,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { /** @phpstan-ignore-next-line */ $widgets = UserWidget::where('widget_id', 1)->get(); diff --git a/database/migrations/2019_08_10_223200_add_enabled_to_users.php b/database/migrations/2019_08_10_223200_add_enabled_to_users.php index 8f6f1e899a..7109bc01b9 100644 --- a/database/migrations/2019_08_10_223200_add_enabled_to_users.php +++ b/database/migrations/2019_08_10_223200_add_enabled_to_users.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->boolean('enabled')->default(1); @@ -22,7 +22,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn('enabled'); diff --git a/database/migrations/2019_08_28_105051_fix-template-linefeeds.php b/database/migrations/2019_08_28_105051_fix-template-linefeeds.php index ceb46e19a1..5a28781131 100644 --- a/database/migrations/2019_08_28_105051_fix-template-linefeeds.php +++ b/database/migrations/2019_08_28_105051_fix-template-linefeeds.php @@ -9,7 +9,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { DB::table('alert_templates')->update(['template' => DB::raw('REPLACE(`template`, \'\\\\r\\\\n\', char(10))')]); DB::table('alert_templates')->update(['template' => DB::raw('REPLACE(`template`, \'\\\\n\', \'\')')]); @@ -20,7 +20,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { } }; diff --git a/database/migrations/2019_09_05_153524_create_notifications_attribs_index.php b/database/migrations/2019_09_05_153524_create_notifications_attribs_index.php index 12e705d9d5..86cd43bc8d 100644 --- a/database/migrations/2019_09_05_153524_create_notifications_attribs_index.php +++ b/database/migrations/2019_09_05_153524_create_notifications_attribs_index.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('notifications_attribs', function (Blueprint $table) { $table->index(['notifications_id', 'user_id']); @@ -22,7 +22,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('notifications_attribs', function (Blueprint $table) { $table->dropIndex(['notifications_id', 'user_id']); diff --git a/database/migrations/2019_09_29_114433_change_default_mempool_perc_warn_in_mempools_table.php b/database/migrations/2019_09_29_114433_change_default_mempool_perc_warn_in_mempools_table.php index 344862bd0a..1a3550d6a1 100644 --- a/database/migrations/2019_09_29_114433_change_default_mempool_perc_warn_in_mempools_table.php +++ b/database/migrations/2019_09_29_114433_change_default_mempool_perc_warn_in_mempools_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('mempools', function (Blueprint $table) { $table->integer('mempool_perc_warn')->default(null)->change(); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('mempools', function (Blueprint $table) { $table->integer('mempool_perc_warn')->default('75')->change(); diff --git a/database/migrations/2019_10_03_211702_serialize_config.php b/database/migrations/2019_10_03_211702_serialize_config.php index 1d13247e12..e5e42a3551 100644 --- a/database/migrations/2019_10_03_211702_serialize_config.php +++ b/database/migrations/2019_10_03_211702_serialize_config.php @@ -9,7 +9,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { DB::table('config')->get()->each(function ($config) { $value = $config->config_value; @@ -33,7 +33,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { DB::table('config')->get()->each(function ($config) { $value = json_decode($config->config_value); diff --git a/database/migrations/2019_10_21_105350_devices_group_perms.php b/database/migrations/2019_10_21_105350_devices_group_perms.php index c5d7f0224c..31808c9b7d 100644 --- a/database/migrations/2019_10_21_105350_devices_group_perms.php +++ b/database/migrations/2019_10_21_105350_devices_group_perms.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('devices_group_perms', function (Blueprint $table) { $table->unsignedInteger('user_id')->index(); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('devices_group_perms'); } diff --git a/database/migrations/2019_11_30_191013_create_mpls_tunnel_ar_hops_table.php b/database/migrations/2019_11_30_191013_create_mpls_tunnel_ar_hops_table.php index 5e9a79b89f..43c9b3f93e 100644 --- a/database/migrations/2019_11_30_191013_create_mpls_tunnel_ar_hops_table.php +++ b/database/migrations/2019_11_30_191013_create_mpls_tunnel_ar_hops_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('mpls_tunnel_ar_hops', function (Blueprint $table) { $table->increments('ar_hop_id'); @@ -37,7 +37,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('mpls_tunnel_ar_hops'); } diff --git a/database/migrations/2019_11_30_191013_create_mpls_tunnel_c_hops_table.php b/database/migrations/2019_11_30_191013_create_mpls_tunnel_c_hops_table.php index 17a098134f..0cb4628b78 100644 --- a/database/migrations/2019_11_30_191013_create_mpls_tunnel_c_hops_table.php +++ b/database/migrations/2019_11_30_191013_create_mpls_tunnel_c_hops_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('mpls_tunnel_c_hops', function (Blueprint $table) { $table->increments('c_hop_id'); @@ -33,7 +33,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('mpls_tunnel_c_hops'); } diff --git a/database/migrations/2019_12_01_165514_add_indexes_to_mpls_lsp_paths_table.php b/database/migrations/2019_12_01_165514_add_indexes_to_mpls_lsp_paths_table.php index 002cf1f3d1..ef9b998621 100644 --- a/database/migrations/2019_12_01_165514_add_indexes_to_mpls_lsp_paths_table.php +++ b/database/migrations/2019_12_01_165514_add_indexes_to_mpls_lsp_paths_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('mpls_lsp_paths', function (Blueprint $table) { /** add @@ -29,7 +29,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('mpls_lsp_paths', function (Blueprint $table) { $table->dropColumn(['mplsLspPathTunnelARHopListIndex', 'mplsLspPathTunnelCHopListIndex']); diff --git a/database/migrations/2019_12_05_164700_alerts_disable_on_update_current_timestamp.php b/database/migrations/2019_12_05_164700_alerts_disable_on_update_current_timestamp.php index e6ca7458ae..3e9f2d2f10 100644 --- a/database/migrations/2019_12_05_164700_alerts_disable_on_update_current_timestamp.php +++ b/database/migrations/2019_12_05_164700_alerts_disable_on_update_current_timestamp.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { if (\LibreNMS\DB\Eloquent::getDriver() == 'mysql') { Schema::table('alerts', function (Blueprint $table) { @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { if (\LibreNMS\DB\Eloquent::getDriver() == 'mysql') { Schema::table('alerts', function (Blueprint $table) { diff --git a/database/migrations/2019_12_16_140000_create_customoids_table.php b/database/migrations/2019_12_16_140000_create_customoids_table.php index 7290c63e6f..5061ac7011 100644 --- a/database/migrations/2019_12_16_140000_create_customoids_table.php +++ b/database/migrations/2019_12_16_140000_create_customoids_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('customoids', function (Blueprint $table) { $table->increments('customoid_id'); @@ -45,7 +45,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('customoids'); } diff --git a/database/migrations/2019_12_17_151314_add_invert_map_to_alert_rules.php b/database/migrations/2019_12_17_151314_add_invert_map_to_alert_rules.php index 9e7cd299a5..afe2192157 100644 --- a/database/migrations/2019_12_17_151314_add_invert_map_to_alert_rules.php +++ b/database/migrations/2019_12_17_151314_add_invert_map_to_alert_rules.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('alert_rules', function (Blueprint $table) { $table->boolean('invert_map')->default(0); @@ -22,7 +22,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('alert_rules', function (Blueprint $table) { $table->dropColumn(['invert_map']); diff --git a/database/migrations/2019_12_28_180000_add_overwrite_ip_to_devices.php b/database/migrations/2019_12_28_180000_add_overwrite_ip_to_devices.php index 5d06136eb6..fc9e654cf4 100644 --- a/database/migrations/2019_12_28_180000_add_overwrite_ip_to_devices.php +++ b/database/migrations/2019_12_28_180000_add_overwrite_ip_to_devices.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('devices', function (Blueprint $table) { $table->string('overwrite_ip', 40)->nullable()->after('ip'); @@ -22,7 +22,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('devices', function (Blueprint $table) { $table->dropColumn('overwrite_ip'); diff --git a/database/migrations/2020_01_09_1300_migrate_devices_attribs_table.php b/database/migrations/2020_01_09_1300_migrate_devices_attribs_table.php index a241d8c998..3d7184fda0 100644 --- a/database/migrations/2020_01_09_1300_migrate_devices_attribs_table.php +++ b/database/migrations/2020_01_09_1300_migrate_devices_attribs_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('devices', function (Blueprint $table) { $table->boolean('disable_notify')->default(0); @@ -27,7 +27,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { // revert migrate disable_notify data into devices table $attribs = DB::table('devices')->where('disable_notify', 1)->pluck('device_id')->map(function ($device_id) { diff --git a/database/migrations/2020_01_10_075852_alter_mpls_lsp_paths_table.php b/database/migrations/2020_01_10_075852_alter_mpls_lsp_paths_table.php index eff44bcd8a..f6de69f21a 100644 --- a/database/migrations/2020_01_10_075852_alter_mpls_lsp_paths_table.php +++ b/database/migrations/2020_01_10_075852_alter_mpls_lsp_paths_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { DB::connection()->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string'); Schema::table('mpls_lsp_paths', function (Blueprint $table) { @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('mpls_lsp_paths', function (Blueprint $table) { $table->unsignedInteger('mplsLspPathOperMetric')->change(); diff --git a/database/migrations/2020_02_05_093457_add_inserted_to_devices.php b/database/migrations/2020_02_05_093457_add_inserted_to_devices.php index 4bc5a598ab..6657adc9c7 100644 --- a/database/migrations/2020_02_05_093457_add_inserted_to_devices.php +++ b/database/migrations/2020_02_05_093457_add_inserted_to_devices.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('devices', function (Blueprint $table) { // add inserted column after device id with a default of current_timestamp @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('devices', function (Blueprint $table) { // revert add inserted column after device id with a default of current_timestamp diff --git a/database/migrations/2020_02_05_224042_device_inserted_null.php b/database/migrations/2020_02_05_224042_device_inserted_null.php index 0ae3180eb2..6effe6ecd2 100644 --- a/database/migrations/2020_02_05_224042_device_inserted_null.php +++ b/database/migrations/2020_02_05_224042_device_inserted_null.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('devices', function (Blueprint $table) { if (\LibreNMS\DB\Eloquent::getDriver() == 'mysql') { @@ -29,7 +29,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { } }; diff --git a/database/migrations/2020_02_10_223323_create_alert_location_map_table.php b/database/migrations/2020_02_10_223323_create_alert_location_map_table.php index 21a7ae8349..3a95a7d5ec 100644 --- a/database/migrations/2020_02_10_223323_create_alert_location_map_table.php +++ b/database/migrations/2020_02_10_223323_create_alert_location_map_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('alert_location_map', function (Blueprint $table) { $table->increments('id'); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('alert_location_map'); } diff --git a/database/migrations/2020_03_24_0844_add_primary_key_to_device_graphs.php b/database/migrations/2020_03_24_0844_add_primary_key_to_device_graphs.php index 22f2981051..29e4963d45 100644 --- a/database/migrations/2020_03_24_0844_add_primary_key_to_device_graphs.php +++ b/database/migrations/2020_03_24_0844_add_primary_key_to_device_graphs.php @@ -17,7 +17,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { if (! Schema::hasColumn('device_graphs', 'id')) { Schema::table('device_graphs', function (Blueprint $table) { @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { } }; diff --git a/database/migrations/2020_03_25_165300_add_column_to_ports.php b/database/migrations/2020_03_25_165300_add_column_to_ports.php index 9c438871b0..23bf822ba4 100644 --- a/database/migrations/2020_03_25_165300_add_column_to_ports.php +++ b/database/migrations/2020_03_25_165300_add_column_to_ports.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('ports', function (Blueprint $table) { $table->bigInteger('ifSpeed_prev')->nullable()->after('ifSpeed'); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('ports', function (Blueprint $table) { $table->dropColumn(['ifSpeed_prev', 'ifHighSpeed_prev']); diff --git a/database/migrations/2020_04_06_001048_the_great_index_rename.php b/database/migrations/2020_04_06_001048_the_great_index_rename.php index 78e682dd8c..f6ec2d1721 100644 --- a/database/migrations/2020_04_06_001048_the_great_index_rename.php +++ b/database/migrations/2020_04_06_001048_the_great_index_rename.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { // try to run index like this to hopefully allow mysql to optimize away the reindex if (\LibreNMS\DB\Eloquent::getDriver() == 'mysql') { @@ -164,7 +164,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { // } diff --git a/database/migrations/2020_04_08_172357_alert_schedule_utc.php b/database/migrations/2020_04_08_172357_alert_schedule_utc.php index 92a5144c40..137d11c1b4 100644 --- a/database/migrations/2020_04_08_172357_alert_schedule_utc.php +++ b/database/migrations/2020_04_08_172357_alert_schedule_utc.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { if (\LibreNMS\DB\Eloquent::getDriver() == 'mysql') { DB::table('alert_schedule')->update([ @@ -30,7 +30,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('alert_schedule', function (Blueprint $table) { $table->date('start_recurring_dt')->nullable(false)->default('1970-01-01')->after('end'); diff --git a/database/migrations/2020_04_13_150500_add_last_error_fields_to_bgp_peers.php b/database/migrations/2020_04_13_150500_add_last_error_fields_to_bgp_peers.php index 96a68f019e..734ef9eb4e 100644 --- a/database/migrations/2020_04_13_150500_add_last_error_fields_to_bgp_peers.php +++ b/database/migrations/2020_04_13_150500_add_last_error_fields_to_bgp_peers.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('bgpPeers', function (Blueprint $table) { $table->integer('bgpPeerLastErrorCode')->nullable()->after('bgpPeerAdminStatus'); @@ -28,7 +28,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('bgpPeers', function (Blueprint $table) { $table->dropColumn(['bgpPeerLastErrorCode', 'bgpPeerLastErrorSubCode', 'bgpPeerLastErrorText']); diff --git a/database/migrations/2020_04_19_010532_eventlog_sensor_reference_cleanup.php b/database/migrations/2020_04_19_010532_eventlog_sensor_reference_cleanup.php index 21bfcb5cf1..0fd09b793e 100644 --- a/database/migrations/2020_04_19_010532_eventlog_sensor_reference_cleanup.php +++ b/database/migrations/2020_04_19_010532_eventlog_sensor_reference_cleanup.php @@ -9,7 +9,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { foreach (\App\Models\Sensor::getTypes() as $type) { DB::table('eventlog')->where('type', ucfirst($type))->update(['type' => $type]); @@ -21,7 +21,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { foreach (\App\Models\Sensor::getTypes() as $type) { DB::table('eventlog')->where('type', $type)->update(['type' => ucfirst($type)]); diff --git a/database/migrations/2020_05_22_020303_alter_metric_column.php b/database/migrations/2020_05_22_020303_alter_metric_column.php index e7e3e18d0e..f78eee8e11 100644 --- a/database/migrations/2020_05_22_020303_alter_metric_column.php +++ b/database/migrations/2020_05_22_020303_alter_metric_column.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('application_metrics', function (Blueprint $table) { $table->string('metric', 64)->change(); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('application_metrics', function (Blueprint $table) { $table->string('metric', 32)->change(); diff --git a/database/migrations/2020_05_24_212054_poller_cluster_settings.php b/database/migrations/2020_05_24_212054_poller_cluster_settings.php index 36828e05d4..a35d77aca0 100644 --- a/database/migrations/2020_05_24_212054_poller_cluster_settings.php +++ b/database/migrations/2020_05_24_212054_poller_cluster_settings.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('poller_cluster', function (Blueprint $table) { $table->boolean('poller_enabled')->nullable(); @@ -44,7 +44,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('poller_cluster', function (Blueprint $table) { $table->dropColumn([ diff --git a/database/migrations/2020_05_30_162638_remove_mib_polling_tables.php b/database/migrations/2020_05_30_162638_remove_mib_polling_tables.php index 84a126e784..a099249923 100644 --- a/database/migrations/2020_05_30_162638_remove_mib_polling_tables.php +++ b/database/migrations/2020_05_30_162638_remove_mib_polling_tables.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::drop('device_mibs'); Schema::drop('device_oids'); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::create('device_mibs', function (Blueprint $table) { $table->unsignedInteger('device_id'); diff --git a/database/migrations/2020_06_06_222222_create_device_outages_table.php b/database/migrations/2020_06_06_222222_create_device_outages_table.php index a2489e5cdd..f8609fdb85 100644 --- a/database/migrations/2020_06_06_222222_create_device_outages_table.php +++ b/database/migrations/2020_06_06_222222_create_device_outages_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('device_outages', function (Blueprint $table) { $table->bigIncrements('id'); @@ -34,7 +34,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('device_outages'); Schema::drop('availability'); diff --git a/database/migrations/2020_06_23_00522_alter_availability_perc_column.php b/database/migrations/2020_06_23_00522_alter_availability_perc_column.php index e4ca676eb7..f384d89a0e 100644 --- a/database/migrations/2020_06_23_00522_alter_availability_perc_column.php +++ b/database/migrations/2020_06_23_00522_alter_availability_perc_column.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('availability', function (Blueprint $table) { $table->decimal('availability_perc', 9, 6)->default(0)->change(); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('availability', function (Blueprint $table) { $table->float('availability_perc', 6, 6)->default(0)->change(); diff --git a/database/migrations/2020_06_24_155119_drop_ports_if_high_speed.php b/database/migrations/2020_06_24_155119_drop_ports_if_high_speed.php index f8890cf769..14775ba36f 100644 --- a/database/migrations/2020_06_24_155119_drop_ports_if_high_speed.php +++ b/database/migrations/2020_06_24_155119_drop_ports_if_high_speed.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('ports', function (Blueprint $table) { $table->dropColumn(['ifHighSpeed', 'ifHighSpeed_prev']); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('ports', function (Blueprint $table) { $table->integer('ifHighSpeed')->nullable()->after('ifPromiscuousMode'); diff --git a/database/migrations/2020_07_27_00522_alter_devices_snmp_algo_columns.php b/database/migrations/2020_07_27_00522_alter_devices_snmp_algo_columns.php index 24a7122f87..d0ef16a955 100644 --- a/database/migrations/2020_07_27_00522_alter_devices_snmp_algo_columns.php +++ b/database/migrations/2020_07_27_00522_alter_devices_snmp_algo_columns.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('devices', function (Blueprint $table) { $table->string('authalgo', 10)->nullable()->change(); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { } }; diff --git a/database/migrations/2020_07_29_143221_add_device_perf_index.php b/database/migrations/2020_07_29_143221_add_device_perf_index.php index b5408548f6..0d9575ac0a 100644 --- a/database/migrations/2020_07_29_143221_add_device_perf_index.php +++ b/database/migrations/2020_07_29_143221_add_device_perf_index.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('device_perf', function (Blueprint $table) { $table->index(['device_id', 'timestamp']); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('device_perf', function (Blueprint $table) { $table->dropIndex(['device_id', 'timestamp']); diff --git a/database/migrations/2020_08_28_212054_drop_uptime_column_outages.php b/database/migrations/2020_08_28_212054_drop_uptime_column_outages.php index 0c4f4302af..aaef035773 100644 --- a/database/migrations/2020_08_28_212054_drop_uptime_column_outages.php +++ b/database/migrations/2020_08_28_212054_drop_uptime_column_outages.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('device_outages', function (Blueprint $table) { $table->dropColumn([ @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('device_outages', function (Blueprint $table) { $table->bigInteger('uptime')->nullable(); diff --git a/database/migrations/2020_09_18_223431_create_cache_table.php b/database/migrations/2020_09_18_223431_create_cache_table.php index 2b7be4f32d..1b9ea3e4f1 100644 --- a/database/migrations/2020_09_18_223431_create_cache_table.php +++ b/database/migrations/2020_09_18_223431_create_cache_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('cache', function ($table) { $table->string('key')->unique(); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('cache'); } diff --git a/database/migrations/2020_09_18_230114_create_service_templates_device_group_table.php b/database/migrations/2020_09_18_230114_create_service_templates_device_group_table.php index 617ca21c4d..77eca9789c 100644 --- a/database/migrations/2020_09_18_230114_create_service_templates_device_group_table.php +++ b/database/migrations/2020_09_18_230114_create_service_templates_device_group_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('service_templates_device_group', function (Blueprint $table) { $table->unsignedInteger('service_template_id')->unsigned()->index(); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('service_templates_device_group'); } diff --git a/database/migrations/2020_09_18_230114_create_service_templates_device_table.php b/database/migrations/2020_09_18_230114_create_service_templates_device_table.php index bc3af9e12f..87ecc38ef6 100644 --- a/database/migrations/2020_09_18_230114_create_service_templates_device_table.php +++ b/database/migrations/2020_09_18_230114_create_service_templates_device_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('service_templates_device', function (Blueprint $table) { $table->unsignedInteger('service_template_id')->unsigned()->index(); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('service_templates_device'); } diff --git a/database/migrations/2020_09_18_230114_create_service_templates_table.php b/database/migrations/2020_09_18_230114_create_service_templates_table.php index cac51bf3ac..518e8fa68e 100644 --- a/database/migrations/2020_09_18_230114_create_service_templates_table.php +++ b/database/migrations/2020_09_18_230114_create_service_templates_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('service_templates', function (Blueprint $table) { $table->increments('id'); @@ -40,7 +40,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('service_templates'); } diff --git a/database/migrations/2020_09_18_230114_extend_services_table_for_service_templates_table.php b/database/migrations/2020_09_18_230114_extend_services_table_for_service_templates_table.php index 0d46527c46..b1ea114d3d 100644 --- a/database/migrations/2020_09_18_230114_extend_services_table_for_service_templates_table.php +++ b/database/migrations/2020_09_18_230114_extend_services_table_for_service_templates_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('services', function (Blueprint $table) { $table->unsignedInteger('service_template_id')->default(0); @@ -29,7 +29,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('services', function (Blueprint $table) { $table->dropColumn([ diff --git a/database/migrations/2020_09_19_230114_add_foreign_keys_to_service_templates_device_group_table.php b/database/migrations/2020_09_19_230114_add_foreign_keys_to_service_templates_device_group_table.php index d1e1c9bab5..42a8f6fd67 100644 --- a/database/migrations/2020_09_19_230114_add_foreign_keys_to_service_templates_device_group_table.php +++ b/database/migrations/2020_09_19_230114_add_foreign_keys_to_service_templates_device_group_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('service_templates_device_group', function (Blueprint $table) { $table->foreign('service_template_id')->references('id')->on('service_templates')->onUpdate('RESTRICT')->onDelete('CASCADE'); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { if (\LibreNMS\DB\Eloquent::getDriver() !== 'sqlite') { Schema::table('service_templates_device_group', function (Blueprint $table) { diff --git a/database/migrations/2020_09_19_230114_add_foreign_keys_to_service_templates_device_table.php b/database/migrations/2020_09_19_230114_add_foreign_keys_to_service_templates_device_table.php index 1ce94aaea1..6b90fba378 100644 --- a/database/migrations/2020_09_19_230114_add_foreign_keys_to_service_templates_device_table.php +++ b/database/migrations/2020_09_19_230114_add_foreign_keys_to_service_templates_device_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('service_templates_device', function (Blueprint $table) { $table->foreign('service_template_id')->references('id')->on('service_templates')->onUpdate('RESTRICT')->onDelete('CASCADE'); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { if (\LibreNMS\DB\Eloquent::getDriver() !== 'sqlite') { Schema::table('service_templates_device', function (Blueprint $table) { diff --git a/database/migrations/2020_09_22_172321_add_alert_log_index.php b/database/migrations/2020_09_22_172321_add_alert_log_index.php index 08a460f559..9907adec8b 100644 --- a/database/migrations/2020_09_22_172321_add_alert_log_index.php +++ b/database/migrations/2020_09_22_172321_add_alert_log_index.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('alert_log', function (Blueprint $table) { $table->index(['rule_id', 'device_id']); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('alert_log', function (Blueprint $table) { $table->dropIndex(['rule_id', 'device_id']); diff --git a/database/migrations/2020_09_24_000500_create_cache_locks_table.php b/database/migrations/2020_09_24_000500_create_cache_locks_table.php index 2e9ffafa8b..9b7eeded52 100644 --- a/database/migrations/2020_09_24_000500_create_cache_locks_table.php +++ b/database/migrations/2020_09_24_000500_create_cache_locks_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('cache_locks', function ($table) { $table->string('key')->primary(); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('cache_locks'); } diff --git a/database/migrations/2020_10_03_1000_add_primary_key_bill_perms.php b/database/migrations/2020_10_03_1000_add_primary_key_bill_perms.php index 4320c3c936..bad5a08dc4 100644 --- a/database/migrations/2020_10_03_1000_add_primary_key_bill_perms.php +++ b/database/migrations/2020_10_03_1000_add_primary_key_bill_perms.php @@ -17,7 +17,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { if (! Schema::hasColumn('bill_perms', 'id')) { Schema::table('bill_perms', function (Blueprint $table) { @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { } }; diff --git a/database/migrations/2020_10_03_1000_add_primary_key_bill_ports.php b/database/migrations/2020_10_03_1000_add_primary_key_bill_ports.php index e637ad1e14..71b4c27632 100644 --- a/database/migrations/2020_10_03_1000_add_primary_key_bill_ports.php +++ b/database/migrations/2020_10_03_1000_add_primary_key_bill_ports.php @@ -17,7 +17,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { if (! Schema::hasColumn('bill_ports', 'id')) { Schema::table('bill_ports', function (Blueprint $table) { @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { } }; diff --git a/database/migrations/2020_10_03_1000_add_primary_key_devices_perms.php b/database/migrations/2020_10_03_1000_add_primary_key_devices_perms.php index 1442be7718..909a25abf9 100644 --- a/database/migrations/2020_10_03_1000_add_primary_key_devices_perms.php +++ b/database/migrations/2020_10_03_1000_add_primary_key_devices_perms.php @@ -17,7 +17,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { if (! Schema::hasColumn('devices_perms', 'id')) { Schema::table('devices_perms', function (Blueprint $table) { @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { } }; diff --git a/database/migrations/2020_10_03_1000_add_primary_key_entPhysical_state.php b/database/migrations/2020_10_03_1000_add_primary_key_entPhysical_state.php index 19a2ec6fb8..ffb86d22f3 100644 --- a/database/migrations/2020_10_03_1000_add_primary_key_entPhysical_state.php +++ b/database/migrations/2020_10_03_1000_add_primary_key_entPhysical_state.php @@ -17,7 +17,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { if (! Schema::hasColumn('entPhysical_state', 'id')) { Schema::table('entPhysical_state', function (Blueprint $table) { @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { } }; diff --git a/database/migrations/2020_10_03_1000_add_primary_key_ipv4_mac.php b/database/migrations/2020_10_03_1000_add_primary_key_ipv4_mac.php index 2297416059..0a06228dc3 100644 --- a/database/migrations/2020_10_03_1000_add_primary_key_ipv4_mac.php +++ b/database/migrations/2020_10_03_1000_add_primary_key_ipv4_mac.php @@ -17,7 +17,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { if (! Schema::hasColumn('ipv4_mac', 'id')) { Schema::table('ipv4_mac', function (Blueprint $table) { @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { } }; diff --git a/database/migrations/2020_10_03_1000_add_primary_key_juniAtmVp.php b/database/migrations/2020_10_03_1000_add_primary_key_juniAtmVp.php index f9f22c61b3..2b1942c181 100644 --- a/database/migrations/2020_10_03_1000_add_primary_key_juniAtmVp.php +++ b/database/migrations/2020_10_03_1000_add_primary_key_juniAtmVp.php @@ -17,7 +17,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { if (! Schema::hasColumn('juniAtmVp', 'id')) { Schema::table('juniAtmVp', function (Blueprint $table) { @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { } }; diff --git a/database/migrations/2020_10_03_1000_add_primary_key_loadbalancer_vservers.php b/database/migrations/2020_10_03_1000_add_primary_key_loadbalancer_vservers.php index 31ff2b3db2..9442f94fd8 100644 --- a/database/migrations/2020_10_03_1000_add_primary_key_loadbalancer_vservers.php +++ b/database/migrations/2020_10_03_1000_add_primary_key_loadbalancer_vservers.php @@ -17,7 +17,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { if (! Schema::hasColumn('loadbalancer_vservers', 'id')) { Schema::table('loadbalancer_vservers', function (Blueprint $table) { @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { } }; diff --git a/database/migrations/2020_10_03_1000_add_primary_key_ports_perms.php b/database/migrations/2020_10_03_1000_add_primary_key_ports_perms.php index 9107cf4927..2d90b77443 100644 --- a/database/migrations/2020_10_03_1000_add_primary_key_ports_perms.php +++ b/database/migrations/2020_10_03_1000_add_primary_key_ports_perms.php @@ -17,7 +17,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { if (! Schema::hasColumn('ports_perms', 'id')) { Schema::table('ports_perms', function (Blueprint $table) { @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { } }; diff --git a/database/migrations/2020_10_03_1000_add_primary_key_processes.php b/database/migrations/2020_10_03_1000_add_primary_key_processes.php index 91ef5f5366..3687f8cf75 100644 --- a/database/migrations/2020_10_03_1000_add_primary_key_processes.php +++ b/database/migrations/2020_10_03_1000_add_primary_key_processes.php @@ -17,7 +17,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { if (! Schema::hasColumn('processes', 'id')) { Schema::table('processes', function (Blueprint $table) { @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { } }; diff --git a/database/migrations/2020_10_03_1000_add_primary_key_transport_group_transport.php b/database/migrations/2020_10_03_1000_add_primary_key_transport_group_transport.php index 26c2332e9c..1ad2a4c28f 100644 --- a/database/migrations/2020_10_03_1000_add_primary_key_transport_group_transport.php +++ b/database/migrations/2020_10_03_1000_add_primary_key_transport_group_transport.php @@ -17,7 +17,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { if (! Schema::hasColumn('transport_group_transport', 'id')) { Schema::table('transport_group_transport', function (Blueprint $table) { @@ -31,7 +31,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { } }; diff --git a/database/migrations/2020_10_12_095504_mempools_add_oids.php b/database/migrations/2020_10_12_095504_mempools_add_oids.php index d8db53be64..55e5e9f5e9 100644 --- a/database/migrations/2020_10_12_095504_mempools_add_oids.php +++ b/database/migrations/2020_10_12_095504_mempools_add_oids.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('mempools', function (Blueprint $table) { $table->dropColumn('hrDeviceIndex'); @@ -34,7 +34,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('mempools', function (Blueprint $table) { $table->string('mempool_descr', 64)->change(); diff --git a/database/migrations/2020_10_21_124101_allow_nullable_ospf_columns.php b/database/migrations/2020_10_21_124101_allow_nullable_ospf_columns.php index 4e7c2e518f..4c5d8236d2 100644 --- a/database/migrations/2020_10_21_124101_allow_nullable_ospf_columns.php +++ b/database/migrations/2020_10_21_124101_allow_nullable_ospf_columns.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('ospf_areas', function (Blueprint $table) { $table->string('ospfAuthType', 64)->nullable()->change(); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('ospf_areas', function (Blueprint $table) { $table->string('ospfAuthType', 64)->nullable(false)->change(); diff --git a/database/migrations/2020_10_30_093601_add_tos_to_ospf_ports.php b/database/migrations/2020_10_30_093601_add_tos_to_ospf_ports.php index 759480a495..01cec0699f 100644 --- a/database/migrations/2020_10_30_093601_add_tos_to_ospf_ports.php +++ b/database/migrations/2020_10_30_093601_add_tos_to_ospf_ports.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('ospf_ports', function (Blueprint $table) { $table->string('ospfIfMetricIpAddress', 32)->nullable()->after('ospfIfAuthType'); @@ -27,7 +27,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('ospf_ports', function (Blueprint $table) { $table->dropColumn(['ospfIfMetricIpAddress', 'ospfIfMetricAddressLessIf', 'ospfIfMetricTOS', 'ospfIfMetricValue', 'ospfIfMetricStatus']); diff --git a/database/migrations/2020_11_02_164331_add_powerstate_enum_to_vminfo.php b/database/migrations/2020_11_02_164331_add_powerstate_enum_to_vminfo.php index e2179de4e2..de261d675e 100644 --- a/database/migrations/2020_11_02_164331_add_powerstate_enum_to_vminfo.php +++ b/database/migrations/2020_11_02_164331_add_powerstate_enum_to_vminfo.php @@ -13,7 +13,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Vminfo::select('id', 'vmwVmState')->chunk(100, function ($vms) { foreach ($vms as $vm) { @@ -36,7 +36,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('vminfo', function (Blueprint $table) { $table->string('vmwVmState', 128)->change(); diff --git a/database/migrations/2020_12_14_091314_create_port_group_port_table.php b/database/migrations/2020_12_14_091314_create_port_group_port_table.php index 3560c7e24b..d4c20d50a9 100644 --- a/database/migrations/2020_12_14_091314_create_port_group_port_table.php +++ b/database/migrations/2020_12_14_091314_create_port_group_port_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { if (! Schema::hasTable('port_group_port')) { Schema::create('port_group_port', function (Blueprint $table) { @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('port_group_port'); } diff --git a/database/migrations/2020_12_14_091314_create_port_groups_table.php b/database/migrations/2020_12_14_091314_create_port_groups_table.php index 08dfc06d92..960bf4d203 100644 --- a/database/migrations/2020_12_14_091314_create_port_groups_table.php +++ b/database/migrations/2020_12_14_091314_create_port_groups_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { // migration can fail when creating index if the user's SQL server isn't new enough. if (Schema::hasTable('port_groups')) { @@ -37,7 +37,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('port_groups'); } diff --git a/database/migrations/2021_02_08_224355_fix_invalid_dates.php b/database/migrations/2021_02_08_224355_fix_invalid_dates.php index 0637147f26..d9be83394e 100644 --- a/database/migrations/2021_02_08_224355_fix_invalid_dates.php +++ b/database/migrations/2021_02_08_224355_fix_invalid_dates.php @@ -9,7 +9,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { if (\LibreNMS\DB\Eloquent::getDriver() != 'mysql') { return; @@ -39,7 +39,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { // } diff --git a/database/migrations/2021_02_09_084318_remove_perf_times.php b/database/migrations/2021_02_09_084318_remove_perf_times.php index cea0fcaa02..54b34833be 100644 --- a/database/migrations/2021_02_09_084318_remove_perf_times.php +++ b/database/migrations/2021_02_09_084318_remove_perf_times.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::drop('perf_times'); } @@ -21,7 +21,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::create('perf_times', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2021_02_09_122930_migrate_to_utf8mb4.php b/database/migrations/2021_02_09_122930_migrate_to_utf8mb4.php index da1d1bc5c7..43881a0ef6 100644 --- a/database/migrations/2021_02_09_122930_migrate_to_utf8mb4.php +++ b/database/migrations/2021_02_09_122930_migrate_to_utf8mb4.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { $this->migrateCharsetTo('utf8mb4', 'utf8mb4_unicode_ci'); } @@ -20,7 +20,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { $this->migrateCharsetTo('utf8', 'utf8_unicode_ci'); } diff --git a/database/migrations/2021_02_21_203415_location_add_fixed_coordinates_flag.php b/database/migrations/2021_02_21_203415_location_add_fixed_coordinates_flag.php index 7bb12d5885..6d25875f56 100644 --- a/database/migrations/2021_02_21_203415_location_add_fixed_coordinates_flag.php +++ b/database/migrations/2021_02_21_203415_location_add_fixed_coordinates_flag.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('locations', function (Blueprint $table) { $table->boolean('fixed_coordinates')->default(0); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('locations', function (Blueprint $table) { $table->dropColumn('fixed_coordinates'); diff --git a/database/migrations/2021_03_11_003540_rename_toner_table.php b/database/migrations/2021_03_11_003540_rename_toner_table.php index e1a489054a..4dcf3e4139 100644 --- a/database/migrations/2021_03_11_003540_rename_toner_table.php +++ b/database/migrations/2021_03_11_003540_rename_toner_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::rename('toner', 'printer_supplies'); } @@ -20,7 +20,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::rename('printer_supplies', 'toner'); } diff --git a/database/migrations/2021_03_11_003713_rename_printer_columns.php b/database/migrations/2021_03_11_003713_rename_printer_columns.php index 05296fd885..6c5508946c 100644 --- a/database/migrations/2021_03_11_003713_rename_printer_columns.php +++ b/database/migrations/2021_03_11_003713_rename_printer_columns.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('printer_supplies', function (Blueprint $table) { $table->renameColumn('toner_id', 'supply_id'); @@ -55,7 +55,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('printer_supplies', function (Blueprint $table) { $table->renameColumn('supply_id', 'toner_id'); diff --git a/database/migrations/2021_03_17_160729_service_templates_cleanup.php b/database/migrations/2021_03_17_160729_service_templates_cleanup.php index bc7892d19f..d225ef8ac4 100644 --- a/database/migrations/2021_03_17_160729_service_templates_cleanup.php +++ b/database/migrations/2021_03_17_160729_service_templates_cleanup.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('service_templates', function (Blueprint $table) { $table->renameColumn('type', 'check'); @@ -34,7 +34,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('service_templates', function (Blueprint $table) { $table->renameColumn('type', 'dtype'); diff --git a/database/migrations/2021_03_26_014054_change_cache_to_mediumtext.php b/database/migrations/2021_03_26_014054_change_cache_to_mediumtext.php index 865472c2e5..190ac3a681 100644 --- a/database/migrations/2021_03_26_014054_change_cache_to_mediumtext.php +++ b/database/migrations/2021_03_26_014054_change_cache_to_mediumtext.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('cache', function (Blueprint $table) { $table->mediumText('value')->change(); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('cache', function (Blueprint $table) { $table->text('value')->change(); diff --git a/database/migrations/2021_04_08_151101_add_foreign_keys_to_port_group_port_table.php b/database/migrations/2021_04_08_151101_add_foreign_keys_to_port_group_port_table.php index 1f6efabb0e..847303ca03 100644 --- a/database/migrations/2021_04_08_151101_add_foreign_keys_to_port_group_port_table.php +++ b/database/migrations/2021_04_08_151101_add_foreign_keys_to_port_group_port_table.php @@ -12,7 +12,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('port_group_port', function (Blueprint $table) { // check existing foreign key constraints because initially was in one migration @@ -36,7 +36,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { if (\LibreNMS\DB\Eloquent::getDriver() !== 'sqlite') { Schema::table('port_group_port', function (Blueprint $table) { diff --git a/database/migrations/2021_06_07_123600_create_sessions_table.php b/database/migrations/2021_06_07_123600_create_sessions_table.php index fb1274c2ce..d26a87af87 100644 --- a/database/migrations/2021_06_07_123600_create_sessions_table.php +++ b/database/migrations/2021_06_07_123600_create_sessions_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('sessions', function (Blueprint $table) { $table->string('id')->primary(); @@ -27,7 +27,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('sessions'); } diff --git a/database/migrations/2021_06_11_084830_slas_add_rtt_field.php b/database/migrations/2021_06_11_084830_slas_add_rtt_field.php index 21eceb5c15..9d5503addd 100644 --- a/database/migrations/2021_06_11_084830_slas_add_rtt_field.php +++ b/database/migrations/2021_06_11_084830_slas_add_rtt_field.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('slas', function (Blueprint $table) { $table->unsignedInteger('sla_nr')->change(); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('slas', function (Blueprint $table) { $table->integer('sla_nr')->change(); diff --git a/database/migrations/2021_07_06_1845_alter_bill_history_max_min.php b/database/migrations/2021_07_06_1845_alter_bill_history_max_min.php index 7c92fb3e5f..ab3544fab3 100644 --- a/database/migrations/2021_07_06_1845_alter_bill_history_max_min.php +++ b/database/migrations/2021_07_06_1845_alter_bill_history_max_min.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('bill_history', function (Blueprint $table) { $table->bigInteger('bill_peak_out')->nullable()->after('traf_total'); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('bill_history', function (Blueprint $table) { $table->dropColumn(['bill_peak_in', 'bill_peak_out']); diff --git a/database/migrations/2021_07_28_102443_plugins_add_version_and_settings.php b/database/migrations/2021_07_28_102443_plugins_add_version_and_settings.php index a1dc767c4a..ee51531065 100644 --- a/database/migrations/2021_07_28_102443_plugins_add_version_and_settings.php +++ b/database/migrations/2021_07_28_102443_plugins_add_version_and_settings.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('plugins', function (Blueprint $table) { $table->integer('version')->default(1); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('plugins', function (Blueprint $table) { $table->dropColumn(['version', 'settings']); diff --git a/database/migrations/2021_08_04_102914_add_syslog_indexes.php b/database/migrations/2021_08_04_102914_add_syslog_indexes.php index a5fde3bad2..3e3b6e13d4 100644 --- a/database/migrations/2021_08_04_102914_add_syslog_indexes.php +++ b/database/migrations/2021_08_04_102914_add_syslog_indexes.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('syslog', function (Blueprint $table) { $table->index(['device_id', 'program']); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('syslog', function (Blueprint $table) { $table->dropIndex(['device_id', 'program']); diff --git a/database/migrations/2021_08_26_093522_config_value_to_medium_text.php b/database/migrations/2021_08_26_093522_config_value_to_medium_text.php index 660380e3c2..b06ea391b8 100644 --- a/database/migrations/2021_08_26_093522_config_value_to_medium_text.php +++ b/database/migrations/2021_08_26_093522_config_value_to_medium_text.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('config', function (Blueprint $table) { $table->mediumText('config_value')->change(); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('config', function (Blueprint $table) { $table->string('config_value', 512)->change(); diff --git a/database/migrations/2021_09_07_094310_create_push_subscriptions_table.php b/database/migrations/2021_09_07_094310_create_push_subscriptions_table.php index 638aa613b8..83b23d16d7 100644 --- a/database/migrations/2021_09_07_094310_create_push_subscriptions_table.php +++ b/database/migrations/2021_09_07_094310_create_push_subscriptions_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('push_subscriptions', function (Blueprint $table) { $table->bigIncrements('id'); @@ -30,7 +30,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('push_subscriptions'); } diff --git a/database/migrations/2021_09_26_164200_create_hrsystem_table.php b/database/migrations/2021_09_26_164200_create_hrsystem_table.php index d0bcead864..e67c285cab 100644 --- a/database/migrations/2021_09_26_164200_create_hrsystem_table.php +++ b/database/migrations/2021_09_26_164200_create_hrsystem_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('hrSystem', function (Blueprint $table) { $table->increments('hrSystem_id'); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('hrSystem'); } diff --git a/database/migrations/2021_10_02_190310_add_device_outages_index.php b/database/migrations/2021_10_02_190310_add_device_outages_index.php index 4be79e7ad4..2a185cb4ab 100644 --- a/database/migrations/2021_10_02_190310_add_device_outages_index.php +++ b/database/migrations/2021_10_02_190310_add_device_outages_index.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { if (! Schema::hasColumn('device_outages', 'id')) { Schema::table('device_outages', function (Blueprint $table) { @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { } }; diff --git a/database/migrations/2021_10_03_164200_update_hrsystem_table.php b/database/migrations/2021_10_03_164200_update_hrsystem_table.php index 7d38c32398..833c5c737a 100644 --- a/database/migrations/2021_10_03_164200_update_hrsystem_table.php +++ b/database/migrations/2021_10_03_164200_update_hrsystem_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('hrSystem', function (Blueprint $table) { $table->integer('hrSystemNumUsers')->nullable()->default(null)->change(); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('hrSystem', function (Blueprint $table) { $table->integer('hrSystemNumUsers')->default(0)->change(); diff --git a/database/migrations/2021_10_20_072929_disable_example_plugin.php b/database/migrations/2021_10_20_072929_disable_example_plugin.php index 29edb9d6ca..e91ebedf1b 100644 --- a/database/migrations/2021_10_20_072929_disable_example_plugin.php +++ b/database/migrations/2021_10_20_072929_disable_example_plugin.php @@ -9,7 +9,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { // disable ExamplePlugin that was accidentally enabled for everyone DB::table('plugins') @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { // } diff --git a/database/migrations/2021_10_20_224207_increase_length_of_attrib_type_column.php b/database/migrations/2021_10_20_224207_increase_length_of_attrib_type_column.php index 009ebca6ea..ad80e8a122 100644 --- a/database/migrations/2021_10_20_224207_increase_length_of_attrib_type_column.php +++ b/database/migrations/2021_10_20_224207_increase_length_of_attrib_type_column.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('devices_attribs', function (Blueprint $table) { $table->string('attrib_type', 64)->change(); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('devices_attribs', function (Blueprint $table) { $table->string('attrib_type', 32)->change(); diff --git a/database/migrations/2021_11_12_123037_change_cpwVcID_to_unsignedInteger.php b/database/migrations/2021_11_12_123037_change_cpwVcID_to_unsignedInteger.php index 17d1aec1c2..a98e95cf9a 100644 --- a/database/migrations/2021_11_12_123037_change_cpwVcID_to_unsignedInteger.php +++ b/database/migrations/2021_11_12_123037_change_cpwVcID_to_unsignedInteger.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('pseudowires', function (Blueprint $table) { $table->unsignedInteger('cpwVcID')->change(); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('pseudowires', function (Blueprint $table) { $table->integer('cpwVcID')->change(); diff --git a/database/migrations/2021_11_17_105321_device_add_display_field.php b/database/migrations/2021_11_17_105321_device_add_display_field.php index 045121188d..7620de12e4 100644 --- a/database/migrations/2021_11_17_105321_device_add_display_field.php +++ b/database/migrations/2021_11_17_105321_device_add_display_field.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('devices', function (Blueprint $table) { $table->string('display', 128)->nullable()->after('sysName'); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('devices', function (Blueprint $table) { $table->dropColumn(['display']); diff --git a/database/migrations/2021_11_29_160744_change_ports_text_fields_to_varchar.php b/database/migrations/2021_11_29_160744_change_ports_text_fields_to_varchar.php index 10ac1e0a62..ec5ec036a4 100644 --- a/database/migrations/2021_11_29_160744_change_ports_text_fields_to_varchar.php +++ b/database/migrations/2021_11_29_160744_change_ports_text_fields_to_varchar.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('ports', function (Blueprint $table) { $table->string('ifAlias')->change(); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('ports', function (Blueprint $table) { $table->text('ifAlias')->change(); diff --git a/database/migrations/2021_11_29_165046_improve_devices_search_index.php b/database/migrations/2021_11_29_165046_improve_devices_search_index.php index 01ecd82d45..d06e20ddc5 100644 --- a/database/migrations/2021_11_29_165046_improve_devices_search_index.php +++ b/database/migrations/2021_11_29_165046_improve_devices_search_index.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('devices', function (Blueprint $table) { $table->index(['hostname', 'sysName', 'display']); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('devices', function (Blueprint $table) { $table->index('hostname'); diff --git a/database/migrations/2021_11_29_165436_improve_ports_search_index.php b/database/migrations/2021_11_29_165436_improve_ports_search_index.php index 075bbd06c7..026e616b90 100644 --- a/database/migrations/2021_11_29_165436_improve_ports_search_index.php +++ b/database/migrations/2021_11_29_165436_improve_ports_search_index.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('ports', function (Blueprint $table) { $table->index(['ifAlias', 'port_descr_descr', 'portName']); @@ -25,7 +25,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('ports', function (Blueprint $table) { $table->index('ifDescr'); diff --git a/database/migrations/2021_12_02_100709_remove_ports_stp_unique_index.php b/database/migrations/2021_12_02_100709_remove_ports_stp_unique_index.php index 01ad53a83f..1ad421e08b 100644 --- a/database/migrations/2021_12_02_100709_remove_ports_stp_unique_index.php +++ b/database/migrations/2021_12_02_100709_remove_ports_stp_unique_index.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('ports_stp', function (Blueprint $table) { $table->dropIndex('ports_stp_device_id_port_id_unique'); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('ports_stp', function (Blueprint $table) { $table->unique(['device_id', 'port_id']); diff --git a/database/migrations/2021_12_02_101739_add_vlan_field_to_stp_table.php b/database/migrations/2021_12_02_101739_add_vlan_field_to_stp_table.php index 83fe8e12b7..7497ec3d8f 100644 --- a/database/migrations/2021_12_02_101739_add_vlan_field_to_stp_table.php +++ b/database/migrations/2021_12_02_101739_add_vlan_field_to_stp_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('stp', function (Blueprint $table) { $table->unsignedInteger('vlan')->nullable()->after('device_id'); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('stp', function (Blueprint $table) { $table->dropColumn('vlan'); diff --git a/database/migrations/2021_12_02_101810_add_vlan_and_port_index_fields_to_ports_stp_table.php b/database/migrations/2021_12_02_101810_add_vlan_and_port_index_fields_to_ports_stp_table.php index ae02a27dc5..86f992e751 100644 --- a/database/migrations/2021_12_02_101810_add_vlan_and_port_index_fields_to_ports_stp_table.php +++ b/database/migrations/2021_12_02_101810_add_vlan_and_port_index_fields_to_ports_stp_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('ports_stp', function (Blueprint $table) { $table->unsignedInteger('vlan')->nullable()->after('device_id'); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('ports_stp', function (Blueprint $table) { $table->dropColumn(['vlan', 'port_index']); diff --git a/database/migrations/2021_12_02_110154_update_ports_stp_unique_index.php b/database/migrations/2021_12_02_110154_update_ports_stp_unique_index.php index 57224af455..a8522e1d00 100644 --- a/database/migrations/2021_12_02_110154_update_ports_stp_unique_index.php +++ b/database/migrations/2021_12_02_110154_update_ports_stp_unique_index.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('ports_stp', function (Blueprint $table) { $table->unique(['device_id', 'vlan', 'port_index']); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('ports_stp', function (Blueprint $table) { $table->dropIndex('ports_stp_device_id_vlan_port_index_unique'); diff --git a/database/migrations/2021_12_02_113537_ports_stp_designated_cost_change_to_int.php b/database/migrations/2021_12_02_113537_ports_stp_designated_cost_change_to_int.php index 09e100c601..cad0750b70 100644 --- a/database/migrations/2021_12_02_113537_ports_stp_designated_cost_change_to_int.php +++ b/database/migrations/2021_12_02_113537_ports_stp_designated_cost_change_to_int.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('ports_stp', function (Blueprint $table) { $table->unsignedInteger('designatedCost')->change(); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('ports_stp', function (Blueprint $table) { $table->smallInteger('designatedCost')->unsigned()->change(); diff --git a/database/migrations/2021_25_01_0127_create_isis_adjacencies_table.php b/database/migrations/2021_25_01_0127_create_isis_adjacencies_table.php index d8a7723fa7..e56448843b 100644 --- a/database/migrations/2021_25_01_0127_create_isis_adjacencies_table.php +++ b/database/migrations/2021_25_01_0127_create_isis_adjacencies_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('isis_adjacencies', function (Blueprint $table) { $table->increments('id'); @@ -33,7 +33,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::dropIfExists('isis_adjacencies'); } diff --git a/database/migrations/2021_25_01_0128_isis_adjacencies_add_admin_status.php b/database/migrations/2021_25_01_0128_isis_adjacencies_add_admin_status.php index 5d4d034314..25e6f4838d 100644 --- a/database/migrations/2021_25_01_0128_isis_adjacencies_add_admin_status.php +++ b/database/migrations/2021_25_01_0128_isis_adjacencies_add_admin_status.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('isis_adjacencies', function (Blueprint $table) { $table->string('isisCircAdminState', 16)->default('off'); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::dropColumns('isis_adjacencies', 'isisCircAdminState'); } diff --git a/database/migrations/2021_25_01_0129_isis_adjacencies_nullable.php b/database/migrations/2021_25_01_0129_isis_adjacencies_nullable.php index 06b8018663..6d19837c09 100644 --- a/database/migrations/2021_25_01_0129_isis_adjacencies_nullable.php +++ b/database/migrations/2021_25_01_0129_isis_adjacencies_nullable.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('isis_adjacencies', function (Blueprint $table) { $table->integer('port_id')->nullable()->change(); @@ -30,7 +30,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('isis_adjacencies', function (Blueprint $table) { $table->integer('port_id')->change(); diff --git a/database/migrations/2022_02_03_164059_increase_auth_id_length.php b/database/migrations/2022_02_03_164059_increase_auth_id_length.php index 29b12fbc51..23c30cb1f1 100644 --- a/database/migrations/2022_02_03_164059_increase_auth_id_length.php +++ b/database/migrations/2022_02_03_164059_increase_auth_id_length.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->string('auth_id')->nullable()->change(); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('users', function (Blueprint $table) { $table->integer('auth_id')->nullable()->change(); diff --git a/database/migrations/2022_02_21_073500_add_iface_field_to_bgp_peers.php b/database/migrations/2022_02_21_073500_add_iface_field_to_bgp_peers.php index 8709ff1e66..69ac3472d7 100644 --- a/database/migrations/2022_02_21_073500_add_iface_field_to_bgp_peers.php +++ b/database/migrations/2022_02_21_073500_add_iface_field_to_bgp_peers.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('bgpPeers', function (Blueprint $table) { $table->unsignedInteger('bgpPeerIface')->nullable()->after('bgpPeerLastErrorText'); @@ -26,7 +26,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('bgpPeers', function (Blueprint $table) { $table->dropColumn(['bgpPeerIface']); diff --git a/database/migrations/2022_04_08_085504_isis_adjacencies_table_add_index.php b/database/migrations/2022_04_08_085504_isis_adjacencies_table_add_index.php index 2494b40a47..0668b172ae 100644 --- a/database/migrations/2022_04_08_085504_isis_adjacencies_table_add_index.php +++ b/database/migrations/2022_04_08_085504_isis_adjacencies_table_add_index.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('isis_adjacencies', function (Blueprint $table) { $table->string('index', 16)->nullable()->after('device_id'); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::dropColumns('isis_adjacencies', 'index'); } diff --git a/database/migrations/2022_05_25_084506_add_widgets_column_to_users_widgets_table.php b/database/migrations/2022_05_25_084506_add_widgets_column_to_users_widgets_table.php index a2eff1423d..5266468015 100644 --- a/database/migrations/2022_05_25_084506_add_widgets_column_to_users_widgets_table.php +++ b/database/migrations/2022_05_25_084506_add_widgets_column_to_users_widgets_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('users_widgets', function (Blueprint $table) { $table->string('widget', 32)->default('')->after('user_id'); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('users_widgets', function (Blueprint $table) { $table->dropColumn('widget'); diff --git a/database/migrations/2022_05_25_084617_migrate_widget_ids.php b/database/migrations/2022_05_25_084617_migrate_widget_ids.php index bb56bcc158..4a1b82bd24 100644 --- a/database/migrations/2022_05_25_084617_migrate_widget_ids.php +++ b/database/migrations/2022_05_25_084617_migrate_widget_ids.php @@ -15,7 +15,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { $this->map = DB::table('widgets')->pluck('widget', 'widget_id'); @@ -36,7 +36,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('users_widgets', function (Blueprint $table) { $table->string('widget', 32)->default('')->change(); diff --git a/database/migrations/2022_05_25_085715_remove_user_widgets_id.php b/database/migrations/2022_05_25_085715_remove_user_widgets_id.php index 720e51abe0..1220b5d3e1 100644 --- a/database/migrations/2022_05_25_085715_remove_user_widgets_id.php +++ b/database/migrations/2022_05_25_085715_remove_user_widgets_id.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('users_widgets', function (Blueprint $table) { $table->dropColumn('widget_id'); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('users_widgets', function (Blueprint $table) { $table->unsignedInteger('widget_id')->after('widget'); diff --git a/database/migrations/2022_05_25_090027_drop_widgets_table.php b/database/migrations/2022_05_25_090027_drop_widgets_table.php index 9478ef0a41..54d1f6db27 100644 --- a/database/migrations/2022_05_25_090027_drop_widgets_table.php +++ b/database/migrations/2022_05_25_090027_drop_widgets_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::dropIfExists('widgets'); } @@ -21,7 +21,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::create('widgets', function (Blueprint $table) { $table->increments('widget_id'); diff --git a/database/migrations/2022_05_30_084932_update-app-status-length.php b/database/migrations/2022_05_30_084932_update-app-status-length.php index a64bd1a6d7..8cbf796a43 100644 --- a/database/migrations/2022_05_30_084932_update-app-status-length.php +++ b/database/migrations/2022_05_30_084932_update-app-status-length.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('applications', function (Blueprint $table) { $table->string('app_status', 1024)->change(); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('applications', function (Blueprint $table) { $table->string('app_status', 8)->change(); diff --git a/database/migrations/2022_07_03_1947_add_app_data.php b/database/migrations/2022_07_03_1947_add_app_data.php index bd29109d68..2c8b148516 100644 --- a/database/migrations/2022_07_03_1947_add_app_data.php +++ b/database/migrations/2022_07_03_1947_add_app_data.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('applications', function (Blueprint $table) { $table->longText('data')->after('app_instance')->nullable(); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('applications', function (Blueprint $table) { $table->dropColumn('data'); diff --git a/database/migrations/2022_07_19_081224_plugins_unique_index.php b/database/migrations/2022_07_19_081224_plugins_unique_index.php index db83acd1b2..d091841b4e 100644 --- a/database/migrations/2022_07_19_081224_plugins_unique_index.php +++ b/database/migrations/2022_07_19_081224_plugins_unique_index.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { // cleanup duplicates $plugins = DB::table('plugins')->groupBy(['version', 'plugin_name'])->select(['version', 'plugin_name'])->get(); @@ -36,7 +36,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('plugins', function (Blueprint $table) { $table->dropUnique('plugins_version_plugin_name_unique'); diff --git a/database/migrations/2022_08_15_084506_add_rrd_type_to_sensors_table.php b/database/migrations/2022_08_15_084506_add_rrd_type_to_sensors_table.php index 59c55af6ae..e4e70c112a 100644 --- a/database/migrations/2022_08_15_084506_add_rrd_type_to_sensors_table.php +++ b/database/migrations/2022_08_15_084506_add_rrd_type_to_sensors_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('sensors', function (Blueprint $table) { $table->enum('rrd_type', ['GAUGE', 'COUNTER', 'DERIVE', 'DCOUNTER', 'DDERIVE', 'ABSOLUTE'])->after('user_func')->default('GAUGE'); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('sensors', function (Blueprint $table) { $table->dropColumn('rrd_type'); diff --git a/database/migrations/2022_08_15_084507_add_rrd_type_to_wireless_sensors_table.php b/database/migrations/2022_08_15_084507_add_rrd_type_to_wireless_sensors_table.php index d82ed7d715..e55735255b 100644 --- a/database/migrations/2022_08_15_084507_add_rrd_type_to_wireless_sensors_table.php +++ b/database/migrations/2022_08_15_084507_add_rrd_type_to_wireless_sensors_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('wireless_sensors', function (Blueprint $table) { $table->enum('rrd_type', ['GAUGE', 'COUNTER', 'DERIVE', 'DCOUNTER', 'DDERIVE', 'ABSOLUTE'])->after('access_point_id')->default('GAUGE'); @@ -23,7 +23,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('wireless_sensors', function (Blueprint $table) { $table->dropColumn('rrd_type'); diff --git a/database/migrations/2022_08_15_091314_create_ports_vdsl_table.php b/database/migrations/2022_08_15_091314_create_ports_vdsl_table.php index fba327800c..f6077cbade 100644 --- a/database/migrations/2022_08_15_091314_create_ports_vdsl_table.php +++ b/database/migrations/2022_08_15_091314_create_ports_vdsl_table.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::create('ports_vdsl', function (Blueprint $table) { $table->unsignedInteger('port_id')->unique(); @@ -29,7 +29,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::drop('ports_vdsl'); } diff --git a/database/migrations/2022_09_03_091314_update_ports_adsl_table_with_defaults.php b/database/migrations/2022_09_03_091314_update_ports_adsl_table_with_defaults.php index 30eb2bcf4b..b01caa0b1b 100644 --- a/database/migrations/2022_09_03_091314_update_ports_adsl_table_with_defaults.php +++ b/database/migrations/2022_09_03_091314_update_ports_adsl_table_with_defaults.php @@ -10,7 +10,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('ports_adsl', function (Blueprint $table) { $table->string('adslLineCoding', 8)->default('')->change(); @@ -38,7 +38,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('ports_adsl', function (Blueprint $table) { $table->string('adslLineCoding', 8)->change(); diff --git a/database/migrations/2023_03_14_130653_migrate_empty_user_funcs_to_null.php b/database/migrations/2023_03_14_130653_migrate_empty_user_funcs_to_null.php index f14e4d71d5..eaeae22d7c 100644 --- a/database/migrations/2023_03_14_130653_migrate_empty_user_funcs_to_null.php +++ b/database/migrations/2023_03_14_130653_migrate_empty_user_funcs_to_null.php @@ -9,7 +9,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { \App\Models\Sensor::where('user_func', '')->update(['user_func' => null]); } @@ -19,7 +19,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { } }; diff --git a/database/migrations/2023_04_12_174529_modify_ports_table.php b/database/migrations/2023_04_12_174529_modify_ports_table.php index d104361a07..4479d0ae0c 100644 --- a/database/migrations/2023_04_12_174529_modify_ports_table.php +++ b/database/migrations/2023_04_12_174529_modify_ports_table.php @@ -11,7 +11,7 @@ return new class extends Migration * * @return void */ - public function up() + public function up(): void { Schema::table('ports', function (Blueprint $table) { $table->string('ifVlan', 8)->nullable()->default(null)->change(); @@ -24,7 +24,7 @@ return new class extends Migration * * @return void */ - public function down() + public function down(): void { Schema::table('ports', function (Blueprint $table) { $table->string('ifVlan', 8)->default('')->change(); diff --git a/database/migrations/2023_04_27_164904_update_slas_opstatus_tinyint.php b/database/migrations/2023_04_27_164904_update_slas_opstatus_tinyint.php new file mode 100644 index 0000000000..9f28d6a158 --- /dev/null +++ b/database/migrations/2023_04_27_164904_update_slas_opstatus_tinyint.php @@ -0,0 +1,43 @@ +renameColumn('opstatus', 'opstatus_old'); + }); + + Schema::table('slas', function (Blueprint $table) { + $table->unsignedTinyInteger('opstatus')->default(0)->after('opstatus_old'); + }); + + /** @phpstan-ignore-next-line */ + foreach (\App\Models\Sla::where('opstatus_old', '>', 0)->select(['sla_id', 'opstatus_old'])->lazy() as $sla) { + /** @phpstan-ignore-next-line */ + $sla->opstatus = $sla->opstatus_old; + $sla->save(); + } + + Schema::table('slas', function (Blueprint $table) { + $table->dropColumn('opstatus_old'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('slas', function (Blueprint $table) { + $table->boolean('opstatus')->default(0)->change(); + }); + } +}; diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 380fb0827e..19058eea07 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -11,7 +11,7 @@ class DatabaseSeeder extends Seeder * * @return void */ - public function run() + public function run(): void { $this->call(DefaultAlertTemplateSeeder::class); $this->call(DefaultLegacySchemaSeeder::class); diff --git a/database/seeders/DefaultAlertTemplateSeeder.php b/database/seeders/DefaultAlertTemplateSeeder.php index 88871d4eb2..9ee562c79b 100644 --- a/database/seeders/DefaultAlertTemplateSeeder.php +++ b/database/seeders/DefaultAlertTemplateSeeder.php @@ -12,7 +12,7 @@ class DefaultAlertTemplateSeeder extends Seeder * * @return void */ - public function run() + public function run(): void { $templates = [ [ diff --git a/database/seeders/DefaultLegacySchemaSeeder.php b/database/seeders/DefaultLegacySchemaSeeder.php index bf32170290..bd6d3767f6 100644 --- a/database/seeders/DefaultLegacySchemaSeeder.php +++ b/database/seeders/DefaultLegacySchemaSeeder.php @@ -35,7 +35,7 @@ class DefaultLegacySchemaSeeder extends Seeder * * @return void */ - public function run() + public function run(): void { // insert version 1000 to prevent legacy schema code from running. // additionally prevents seeder from being run again by includes/sql-schema/update.php. diff --git a/includes/dbFacile.php b/includes/dbFacile.php index 95057c844a..9bc747e951 100644 --- a/includes/dbFacile.php +++ b/includes/dbFacile.php @@ -44,7 +44,7 @@ function dbQuery($sql, $parameters = []) return Eloquent::DB()->statement($sql, (array) $parameters); } catch (PDOException $pdoe) { - dbHandleException(new QueryException($sql, $parameters, $pdoe)); + dbHandleException(new QueryException('dbFacile', $sql, $parameters, $pdoe)); return false; } @@ -65,7 +65,7 @@ function dbInsert($data, $table) try { $result = Eloquent::DB()->insert($sql, (array) $data); } catch (PDOException $pdoe) { - dbHandleException(new QueryException($sql, $data, $pdoe)); + dbHandleException(new QueryException('dbFacile', $sql, $data, $pdoe)); } if ($result) { @@ -111,7 +111,7 @@ function dbBulkInsert($data, $table) return $result; } catch (PDOException $pdoe) { // FIXME query? - dbHandleException(new QueryException("Bulk insert $table", $data_chunk, $pdoe)); + dbHandleException(new QueryException('dbFacile', "Bulk insert $table", $data_chunk, $pdoe)); } } @@ -162,7 +162,7 @@ function dbUpdate($data, $table, $where = null, $parameters = []) return $result; } catch (PDOException $pdoe) { - dbHandleException(new QueryException($sql, $data, $pdoe)); + dbHandleException(new QueryException('dbFacile', $sql, $data, $pdoe)); } return false; @@ -182,7 +182,7 @@ function dbDelete($table, $where = null, $parameters = []) try { $result = Eloquent::DB()->delete($sql, (array) $parameters); } catch (PDOException $pdoe) { - dbHandleException(new QueryException($sql, $parameters, $pdoe)); + dbHandleException(new QueryException('dbFacile', $sql, $parameters, $pdoe)); } return $result; @@ -231,7 +231,7 @@ function dbDeleteOrphans($target_table, $parents) try { $result = Eloquent::DB()->delete($query); } catch (PDOException $pdoe) { - dbHandleException(new QueryException($query, [], $pdoe)); + dbHandleException(new QueryException('dbFacile', $query, [], $pdoe)); } return $result; @@ -254,7 +254,7 @@ function dbFetchRows($sql, $parameters = []) return $rows; } catch (PDOException $pdoe) { - dbHandleException(new QueryException($sql, $parameters, $pdoe)); + dbHandleException(new QueryException('dbFacile', $sql, $parameters, $pdoe)); } finally { $PDO_FETCH_ASSOC = false; } @@ -301,7 +301,7 @@ function dbFetchRow($sql = null, $parameters = []) return $row; } catch (PDOException $pdoe) { - dbHandleException(new QueryException($sql, $parameters, $pdoe)); + dbHandleException(new QueryException('dbFacile', $sql, $parameters, $pdoe)); } finally { $PDO_FETCH_ASSOC = false; } @@ -327,7 +327,7 @@ function dbFetchCell($sql, $parameters = []) // shift first field off first row } } catch (PDOException $pdoe) { - dbHandleException(new QueryException($sql, $parameters, $pdoe)); + dbHandleException(new QueryException('dbFacile', $sql, $parameters, $pdoe)); } finally { $PDO_FETCH_ASSOC = false; } @@ -357,7 +357,7 @@ function dbFetchColumn($sql, $parameters = []) return $cells; } catch (PDOException $pdoe) { - dbHandleException(new QueryException($sql, $parameters, $pdoe)); + dbHandleException(new QueryException('dbFacile', $sql, $parameters, $pdoe)); } finally { $PDO_FETCH_ASSOC = false; } diff --git a/includes/html/print-alert-templates.php b/includes/html/print-alert-templates.php index d4dd897036..c879e91d02 100644 --- a/includes/html/print-alert-templates.php +++ b/includes/html/print-alert-templates.php @@ -23,7 +23,7 @@ require_once 'includes/html/modal/delete_alert_template.inc.php'; get(); - +$templates = []; foreach ($full_query as $template) { $single_template = ['name' => $template->name, 'template' => $template->template, diff --git a/lang/en/validation.php b/lang/en/validation.php index 9e5da170c2..d5707d8438 100644 --- a/lang/en/validation.php +++ b/lang/en/validation.php @@ -13,102 +13,110 @@ return [ | */ - 'accepted' => 'The :attribute must be accepted.', - 'accepted_if' => 'The :attribute must be accepted when :other is :value.', - 'active_url' => 'The :attribute is not a valid URL.', - 'after' => 'The :attribute must be a date after :date.', - 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', - 'alpha' => 'The :attribute must only contain letters.', - 'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.', - 'alpha_num' => 'The :attribute must only contain letters and numbers.', - 'array' => 'The :attribute must be an array.', - 'before' => 'The :attribute must be a date before :date.', - 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', + 'accepted' => 'The :attribute field must be accepted.', + 'accepted_if' => 'The :attribute field must be accepted when :other is :value.', + 'active_url' => 'The :attribute field must be a valid URL.', + 'after' => 'The :attribute field must be a date after :date.', + 'after_or_equal' => 'The :attribute field must be a date after or equal to :date.', + 'alpha' => 'The :attribute field must only contain letters.', + 'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.', + 'alpha_num' => 'The :attribute field must only contain letters and numbers.', + 'array' => 'The :attribute field must be an array.', + 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.', + 'before' => 'The :attribute field must be a date before :date.', + 'before_or_equal' => 'The :attribute field must be a date before or equal to :date.', 'between' => [ - 'array' => 'The :attribute must have between :min and :max items.', - 'file' => 'The :attribute must be between :min and :max kilobytes.', - 'numeric' => 'The :attribute must be between :min and :max.', - 'string' => 'The :attribute must be between :min and :max characters.', + 'array' => 'The :attribute field must have between :min and :max items.', + 'file' => 'The :attribute field must be between :min and :max kilobytes.', + 'numeric' => 'The :attribute field must be between :min and :max.', + 'string' => 'The :attribute field must be between :min and :max characters.', ], 'boolean' => 'The :attribute field must be true or false.', - 'confirmed' => 'The :attribute confirmation does not match.', + 'confirmed' => 'The :attribute field confirmation does not match.', 'current_password' => 'The password is incorrect.', - 'date' => 'The :attribute is not a valid date.', - 'date_equals' => 'The :attribute must be a date equal to :date.', - 'date_format' => 'The :attribute does not match the format :format.', - 'declined' => 'The :attribute must be declined.', - 'declined_if' => 'The :attribute must be declined when :other is :value.', - 'different' => 'The :attribute and :other must be different.', - 'digits' => 'The :attribute must be :digits digits.', - 'digits_between' => 'The :attribute must be between :min and :max digits.', - 'dimensions' => 'The :attribute has invalid image dimensions.', + 'date' => 'The :attribute field must be a valid date.', + 'date_equals' => 'The :attribute field must be a date equal to :date.', + 'date_format' => 'The :attribute field must match the format :format.', + 'decimal' => 'The :attribute field must have :decimal decimal places.', + 'declined' => 'The :attribute field must be declined.', + 'declined_if' => 'The :attribute field must be declined when :other is :value.', + 'different' => 'The :attribute field and :other must be different.', + 'digits' => 'The :attribute field must be :digits digits.', + 'digits_between' => 'The :attribute field must be between :min and :max digits.', + 'dimensions' => 'The :attribute field has invalid image dimensions.', 'distinct' => 'The :attribute field has a duplicate value.', - 'doesnt_end_with' => 'The :attribute may not end with one of the following: :values.', - 'doesnt_start_with' => 'The :attribute may not start with one of the following: :values.', - 'email' => 'The :attribute must be a valid email address.', - 'ends_with' => 'The :attribute must end with one of the following: :values.', + 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.', + 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.', + 'email' => 'The :attribute field must be a valid email address.', + 'ends_with' => 'The :attribute field must end with one of the following: :values.', 'enum' => 'The selected :attribute is invalid.', 'exists' => 'The selected :attribute is invalid.', - 'file' => 'The :attribute must be a file.', + 'file' => 'The :attribute field must be a file.', 'filled' => 'The :attribute field must have a value.', 'gt' => [ - 'array' => 'The :attribute must have more than :value items.', - 'file' => 'The :attribute must be greater than :value kilobytes.', - 'numeric' => 'The :attribute must be greater than :value.', - 'string' => 'The :attribute must be greater than :value characters.', + 'array' => 'The :attribute field must have more than :value items.', + 'file' => 'The :attribute field must be greater than :value kilobytes.', + 'numeric' => 'The :attribute field must be greater than :value.', + 'string' => 'The :attribute field must be greater than :value characters.', ], 'gte' => [ - 'array' => 'The :attribute must have :value items or more.', - 'file' => 'The :attribute must be greater than or equal to :value kilobytes.', - 'numeric' => 'The :attribute must be greater than or equal to :value.', - 'string' => 'The :attribute must be greater than or equal to :value characters.', + 'array' => 'The :attribute field must have :value items or more.', + 'file' => 'The :attribute field must be greater than or equal to :value kilobytes.', + 'numeric' => 'The :attribute field must be greater than or equal to :value.', + 'string' => 'The :attribute field must be greater than or equal to :value characters.', ], - 'image' => 'The :attribute must be an image.', + 'image' => 'The :attribute field must be an image.', 'in' => 'The selected :attribute is invalid.', - 'in_array' => 'The :attribute field does not exist in :other.', - 'integer' => 'The :attribute must be an integer.', - 'ip' => 'The :attribute must be a valid IP address.', - 'ipv4' => 'The :attribute must be a valid IPv4 address.', - 'ipv6' => 'The :attribute must be a valid IPv6 address.', - 'json' => 'The :attribute must be a valid JSON string.', + 'in_array' => 'The :attribute field must exist in :other.', + 'integer' => 'The :attribute field must be an integer.', + 'ip' => 'The :attribute field must be a valid IP address.', + 'ipv4' => 'The :attribute field must be a valid IPv4 address.', + 'ipv6' => 'The :attribute field must be a valid IPv6 address.', + 'json' => 'The :attribute field must be a valid JSON string.', + 'lowercase' => 'The :attribute field must be lowercase.', 'lt' => [ - 'array' => 'The :attribute must have less than :value items.', - 'file' => 'The :attribute must be less than :value kilobytes.', - 'numeric' => 'The :attribute must be less than :value.', - 'string' => 'The :attribute must be less than :value characters.', + 'array' => 'The :attribute field must have less than :value items.', + 'file' => 'The :attribute field must be less than :value kilobytes.', + 'numeric' => 'The :attribute field must be less than :value.', + 'string' => 'The :attribute field must be less than :value characters.', ], 'lte' => [ - 'array' => 'The :attribute must not have more than :value items.', - 'file' => 'The :attribute must be less than or equal to :value kilobytes.', - 'numeric' => 'The :attribute must be less than or equal to :value.', - 'string' => 'The :attribute must be less than or equal to :value characters.', + 'array' => 'The :attribute field must not have more than :value items.', + 'file' => 'The :attribute field must be less than or equal to :value kilobytes.', + 'numeric' => 'The :attribute field must be less than or equal to :value.', + 'string' => 'The :attribute field must be less than or equal to :value characters.', ], - 'mac_address' => 'The :attribute must be a valid MAC address.', + 'mac_address' => 'The :attribute field must be a valid MAC address.', 'max' => [ - 'array' => 'The :attribute must not have more than :max items.', - 'file' => 'The :attribute must not be greater than :max kilobytes.', - 'numeric' => 'The :attribute must not be greater than :max.', - 'string' => 'The :attribute must not be greater than :max characters.', + 'array' => 'The :attribute field must not have more than :max items.', + 'file' => 'The :attribute field must not be greater than :max kilobytes.', + 'numeric' => 'The :attribute field must not be greater than :max.', + 'string' => 'The :attribute field must not be greater than :max characters.', ], - 'max_digits' => 'The :attribute must not have more than :max digits.', - 'mimes' => 'The :attribute must be a file of type: :values.', - 'mimetypes' => 'The :attribute must be a file of type: :values.', + 'max_digits' => 'The :attribute field must not have more than :max digits.', + 'mimes' => 'The :attribute field must be a file of type: :values.', + 'mimetypes' => 'The :attribute field must be a file of type: :values.', 'min' => [ - 'array' => 'The :attribute must have at least :min items.', - 'file' => 'The :attribute must be at least :min kilobytes.', - 'numeric' => 'The :attribute must be at least :min.', - 'string' => 'The :attribute must be at least :min characters.', + 'array' => 'The :attribute field must have at least :min items.', + 'file' => 'The :attribute field must be at least :min kilobytes.', + 'numeric' => 'The :attribute field must be at least :min.', + 'string' => 'The :attribute field must be at least :min characters.', ], - 'min_digits' => 'The :attribute must have at least :min digits.', - 'multiple_of' => 'The :attribute must be a multiple of :value.', + 'min_digits' => 'The :attribute field must have at least :min digits.', + 'missing' => 'The :attribute field must be missing.', + 'missing_if' => 'The :attribute field must be missing when :other is :value.', + 'missing_unless' => 'The :attribute field must be missing unless :other is :value.', + 'missing_with' => 'The :attribute field must be missing when :values is present.', + 'missing_with_all' => 'The :attribute field must be missing when :values are present.', + 'multiple_of' => 'The :attribute field must be a multiple of :value.', 'not_in' => 'The selected :attribute is invalid.', - 'not_regex' => 'The :attribute format is invalid.', - 'numeric' => 'The :attribute must be a number.', + 'not_regex' => 'The :attribute field format is invalid.', + 'numeric' => 'The :attribute field must be a number.', 'password' => [ - 'letters' => 'The :attribute must contain at least one letter.', - 'mixed' => 'The :attribute must contain at least one uppercase and one lowercase letter.', - 'numbers' => 'The :attribute must contain at least one number.', - 'symbols' => 'The :attribute must contain at least one symbol.', + 'letters' => 'The :attribute field must contain at least one letter.', + 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.', + 'numbers' => 'The :attribute field must contain at least one number.', + 'symbols' => 'The :attribute field must contain at least one symbol.', 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', ], 'present' => 'The :attribute field must be present.', @@ -116,7 +124,7 @@ return [ 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', 'prohibits' => 'The :attribute field prohibits :other from being present.', - 'regex' => 'The :attribute format is invalid.', + 'regex' => 'The :attribute field format is invalid.', 'required' => 'The :attribute field is required.', 'required_array_keys' => 'The :attribute field must contain entries for: :values.', 'required_if' => 'The :attribute field is required when :other is :value.', @@ -126,20 +134,22 @@ return [ 'required_with_all' => 'The :attribute field is required when :values are present.', 'required_without' => 'The :attribute field is required when :values is not present.', 'required_without_all' => 'The :attribute field is required when none of :values are present.', - 'same' => 'The :attribute and :other must match.', + 'same' => 'The :attribute field must match :other.', 'size' => [ - 'array' => 'The :attribute must contain :size items.', - 'file' => 'The :attribute must be :size kilobytes.', - 'numeric' => 'The :attribute must be :size.', - 'string' => 'The :attribute must be :size characters.', + 'array' => 'The :attribute field must contain :size items.', + 'file' => 'The :attribute field must be :size kilobytes.', + 'numeric' => 'The :attribute field must be :size.', + 'string' => 'The :attribute field must be :size characters.', ], - 'starts_with' => 'The :attribute must start with one of the following: :values.', - 'string' => 'The :attribute must be a string.', - 'timezone' => 'The :attribute must be a valid timezone.', + 'starts_with' => 'The :attribute field must start with one of the following: :values.', + 'string' => 'The :attribute field must be a string.', + 'timezone' => 'The :attribute field must be a valid timezone.', 'unique' => 'The :attribute has already been taken.', 'uploaded' => 'The :attribute failed to upload.', - 'url' => 'The :attribute must be a valid URL.', - 'uuid' => 'The :attribute must be a valid UUID.', + 'uppercase' => 'The :attribute field must be uppercase.', + 'url' => 'The :attribute field must be a valid URL.', + 'ulid' => 'The :attribute field must be a valid ULID.', + 'uuid' => 'The :attribute field must be a valid UUID.', // Librenms specific 'alpha_space' => 'The :attribute may only contain letters, numbers, underscores and spaces.', diff --git a/misc/db_schema.yaml b/misc/db_schema.yaml index b90218aa9e..d0c7752c16 100644 --- a/misc/db_schema.yaml +++ b/misc/db_schema.yaml @@ -1928,7 +1928,7 @@ slas: - { Field: rtt_type, Type: varchar(16), 'Null': false, Extra: '' } - { Field: rtt, Type: 'double(8,2) unsigned', 'Null': true, Extra: '' } - { Field: status, Type: tinyint, 'Null': false, Extra: '' } - - { Field: opstatus, Type: tinyint, 'Null': false, Extra: '', Default: '0' } + - { Field: opstatus, Type: tinyint unsigned, 'Null': false, Extra: '', Default: '0' } - { Field: deleted, Type: tinyint, 'Null': false, Extra: '', Default: '0' } Indexes: PRIMARY: { Name: PRIMARY, Columns: [sla_id], Unique: true, Type: BTREE } diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index d68e0877c6..e557e1a1e3 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -260,36 +260,6 @@ parameters: 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 diff --git a/routes/web.php b/routes/web.php index dfb451d71f..9925383e4a 100644 --- a/routes/web.php +++ b/routes/web.php @@ -6,6 +6,7 @@ use App\Http\Controllers\AlertTransportController; use App\Http\Controllers\Auth\SocialiteController; use App\Http\Controllers\PushNotificationController; use App\Http\Controllers\ValidateController; +use App\Http\Controllers\Widgets; use App\Http\Middleware\AuthenticateGraph; use Illuminate\Support\Facades\Route; diff --git a/tests/AuthHTTPTest.php b/tests/AuthHTTPTest.php index b5dfb45ec9..f13f7ae3ce 100644 --- a/tests/AuthHTTPTest.php +++ b/tests/AuthHTTPTest.php @@ -53,7 +53,7 @@ class AuthHTTPTest extends TestCase } // Document the modules current behaviour, so that changes trigger test failures - public function testCapabilityFunctions() + public function testCapabilityFunctions(): void { $a = LegacyAuth::reset(); @@ -63,7 +63,7 @@ class AuthHTTPTest extends TestCase $this->assertTrue($a->authIsExternal()); } - public function testOldBehaviourAgainstCurrent() + public function testOldBehaviourAgainstCurrent(): void { $old_username = null; $new_username = null; diff --git a/tests/AuthSSOTest.php b/tests/AuthSSOTest.php index 64d62f9e28..e96860d017 100644 --- a/tests/AuthSSOTest.php +++ b/tests/AuthSSOTest.php @@ -104,7 +104,7 @@ class AuthSSOTest extends DBTestCase } // Excercise general auth flow - public function testValidAuthNoCreateUpdate() + public function testValidAuthNoCreateUpdate(): void { $this->basicConfig(); $a = LegacyAuth::reset(); @@ -123,7 +123,7 @@ class AuthSSOTest extends DBTestCase } // Excercise general auth flow with creation enabled - public function testValidAuthCreateOnly() + public function testValidAuthCreateOnly(): void { $this->basicConfig(); /** @var \LibreNMS\Authentication\SSOAuthorizer */ @@ -157,7 +157,7 @@ class AuthSSOTest extends DBTestCase } // Excercise general auth flow with updates enabled - public function testValidAuthUpdate() + public function testValidAuthUpdate(): void { $this->basicConfig(); /** @var \LibreNMS\Authentication\SSOAuthorizer */ @@ -182,7 +182,7 @@ class AuthSSOTest extends DBTestCase } // Check some invalid authentication modes - public function testBadAuth() + public function testBadAuth(): void { $this->basicConfig(); /** @var \LibreNMS\Authentication\SSOAuthorizer */ @@ -202,7 +202,7 @@ class AuthSSOTest extends DBTestCase } // Test some missing attributes - public function testNoAttribute() + public function testNoAttribute(): void { $this->basicConfig(); /** @var \LibreNMS\Authentication\SSOAuthorizer */ @@ -222,7 +222,7 @@ class AuthSSOTest extends DBTestCase } // Document the modules current behaviour, so that changes trigger test failures - public function testCapabilityFunctions() + public function testCapabilityFunctions(): void { $a = LegacyAuth::reset(); @@ -234,7 +234,7 @@ class AuthSSOTest extends DBTestCase /* Everything from here comprises of targeted tests to excercise single methods */ - public function testGetExternalUserName() + public function testGetExternalUserName(): void { $this->basicConfig(); /** @var \LibreNMS\Authentication\SSOAuthorizer */ @@ -269,7 +269,7 @@ class AuthSSOTest extends DBTestCase $this->assertNull($a->getExternalUsername()); } - public function testGetAttr() + public function testGetAttr(): void { /** @var \LibreNMS\Authentication\SSOAuthorizer */ $a = LegacyAuth::reset(); @@ -292,7 +292,7 @@ class AuthSSOTest extends DBTestCase $this->assertIsString($a->authSSOGetAttr('VALID-ATTR')); } - public function testTrustedProxies() + public function testTrustedProxies(): void { /** @var \LibreNMS\Authentication\SSOAuthorizer */ $a = LegacyAuth::reset(); @@ -345,7 +345,7 @@ class AuthSSOTest extends DBTestCase $this->assertFalse($a->authSSOProxyTrusted()); } - public function testLevelCaulculationFromAttr() + public function testLevelCaulculationFromAttr(): void { /** @var \LibreNMS\Authentication\SSOAuthorizer */ $a = LegacyAuth::reset(); @@ -388,7 +388,7 @@ class AuthSSOTest extends DBTestCase $a->authSSOCalculateLevel(); } - public function testGroupParsing() + public function testGroupParsing(): void { $this->basicConfig(); /** @var \LibreNMS\Authentication\SSOAuthorizer */ diff --git a/tests/BasicApiTest.php b/tests/BasicApiTest.php index 28def60b7e..8bed2387b0 100644 --- a/tests/BasicApiTest.php +++ b/tests/BasicApiTest.php @@ -34,7 +34,7 @@ class BasicApiTest extends DBTestCase { use DatabaseTransactions; - public function testListDevices() + public function testListDevices(): void { $user = User::factory()->admin()->create(); $token = ApiToken::generateToken($user); diff --git a/tests/Browser/LoginTest.php b/tests/Browser/LoginTest.php index 48c14c2ff1..7d6830474d 100644 --- a/tests/Browser/LoginTest.php +++ b/tests/Browser/LoginTest.php @@ -27,7 +27,7 @@ class LoginTest extends DuskTestCase /** * @throws \Throwable */ - public function testUserCanLogin() + public function testUserCanLogin(): void { $this->browse(function (Browser $browser) { $password = 'some_password'; @@ -52,7 +52,7 @@ class LoginTest extends DuskTestCase /** * @throws \Throwable */ - public function test2faLogin() + public function test2faLogin(): void { $this->browse(function (Browser $browser) { $password = 'another_password'; diff --git a/tests/CommonFunctionsTest.php b/tests/CommonFunctionsTest.php index c483420ae4..a27c1c4986 100644 --- a/tests/CommonFunctionsTest.php +++ b/tests/CommonFunctionsTest.php @@ -33,7 +33,7 @@ use LibreNMS\Util\Validate; class CommonFunctionsTest extends TestCase { - public function testStrContains() + public function testStrContains(): void { $data = 'This is a test. Just Testing.'; @@ -50,7 +50,7 @@ class CommonFunctionsTest extends TestCase $this->assertFalse(str_i_contains($data, ['not', 'anything'])); } - public function testStartsWith() + public function testStartsWith(): void { $data = 'This is a test. Just Testing that.'; @@ -61,7 +61,7 @@ class CommonFunctionsTest extends TestCase $this->assertFalse(Str::startsWith($data, ['this', 'Test'])); } - public function testEndsWith() + public function testEndsWith(): void { $data = 'This is a test. Just Testing'; @@ -72,13 +72,13 @@ class CommonFunctionsTest extends TestCase $this->assertFalse(Str::endsWith($data, ['this', 'Test'])); } - public function testRrdDescriptions() + public function testRrdDescriptions(): void { $data = 'Toner, S/N:CR_UM-16021314488.'; $this->assertEquals('Toner, S/N CR_UM-16021314488.', \LibreNMS\Data\Store\Rrd::safeDescr($data)); } - public function testSetNull() + public function testSetNull(): void { $this->assertNull(set_null('BAD-DATA')); $this->assertEquals(0, set_null(0)); @@ -89,7 +89,7 @@ class CommonFunctionsTest extends TestCase $this->assertEquals(2, set_null(2, 0, 2)); } - public function testDisplay() + public function testDisplay(): void { $this->assertEquals('<html>string</html>', Clean::html('string', [])); $this->assertEquals('<script>alert("test")</script>', Clean::html('', [])); @@ -104,7 +104,7 @@ class CommonFunctionsTest extends TestCase $this->assertEquals('', Clean::html('', $tmp_config)); } - public function testStringToClass() + public function testStringToClass(): void { $this->assertSame('LibreNMS\OS\Os', str_to_class('OS', 'LibreNMS\\OS\\')); $this->assertSame('SpacesName', str_to_class('spaces name')); @@ -113,7 +113,7 @@ class CommonFunctionsTest extends TestCase $this->assertSame('LibreNMS\\AllOfThemName', str_to_class('all OF-thEm_NaMe', 'LibreNMS\\')); } - public function testIsValidHostname() + public function testIsValidHostname(): void { $this->assertTrue(Validate::hostname('a'), 'a'); $this->assertTrue(Validate::hostname('a.'), 'a.'); @@ -142,7 +142,7 @@ class CommonFunctionsTest extends TestCase $this->assertFalse(Validate::hostname(''), 'Empty string'); } - public function testResolveGlues() + public function testResolveGlues(): void { $this->dbSetUp(); @@ -167,7 +167,7 @@ class CommonFunctionsTest extends TestCase $this->dbTearDown(); } - public function testFormatHostname() + public function testFormatHostname(): void { $device_dns = [ 'hostname' => 'test.librenms.org', @@ -224,7 +224,7 @@ class CommonFunctionsTest extends TestCase $this->assertEquals('IP: 3.3.3.3', format_hostname($custom_ip)); } - public function testPortAssociation() + public function testPortAssociation(): void { $modes = [ 1 => 'ifIndex', diff --git a/tests/ConfigTest.php b/tests/ConfigTest.php index cc9c9009d1..6dd39f4622 100644 --- a/tests/ConfigTest.php +++ b/tests/ConfigTest.php @@ -38,19 +38,19 @@ class ConfigTest extends TestCase $this->config->setAccessible(true); } - public function testGetBasic() + public function testGetBasic(): void { $dir = realpath(__DIR__ . '/..'); $this->assertEquals($dir, Config::get('install_dir')); } - public function testSetBasic() + public function testSetBasic(): void { Config::set('basics', 'first'); $this->assertEquals('first', $this->config->getValue()['basics']); } - public function testGet() + public function testGet(): void { $this->setConfig(function (&$config) { $config['one']['two']['three'] = 'easy'; @@ -59,7 +59,7 @@ class ConfigTest extends TestCase $this->assertEquals('easy', Config::get('one.two.three')); } - public function testGetDeviceSetting() + public function testGetDeviceSetting(): void { $device = ['set' => true, 'null' => null]; $this->setConfig(function (&$config) { @@ -87,7 +87,7 @@ class ConfigTest extends TestCase ); } - public function testGetOsSetting() + public function testGetOsSetting(): void { $this->setConfig(function (&$config) { $config['os']['nullos']['fancy'] = true; @@ -135,14 +135,14 @@ class ConfigTest extends TestCase $this->assertSame(['a' => 'prefix_same', 'b' => 'different', 'c' => 'still same'], Config::getCombined('nullos', 'assoc', 'withprefix.')); } - public function testSet() + public function testSet(): void { Config::set('you.and.me', "I'll be there"); $this->assertEquals("I'll be there", $this->config->getValue()['you']['and']['me']); } - public function testSetPersist() + public function testSetPersist(): void { $this->dbSetUp(); @@ -160,7 +160,7 @@ class ConfigTest extends TestCase $this->dbTearDown(); } - public function testHas() + public function testHas(): void { Config::set('long.key.setting', 'no one cares'); Config::set('null', null); @@ -174,18 +174,18 @@ class ConfigTest extends TestCase $this->assertFalse(Config::has('off.the'), 'Config:has() should not modify the config'); } - public function testGetNonExistent() + public function testGetNonExistent(): void { $this->assertNull(Config::get('There.is.no.way.this.is.a.key')); $this->assertFalse(Config::has('There.is.no')); // should not add kes when getting } - public function testGetNonExistentNested() + public function testGetNonExistentNested(): void { $this->assertNull(Config::get('cheese.and.bologna')); } - public function testGetSubtree() + public function testGetSubtree(): void { Config::set('words.top', 'August'); Config::set('words.mid', 'And Everything'); @@ -211,7 +211,7 @@ class ConfigTest extends TestCase $this->config->setValue($config); } - public function testForget() + public function testForget(): void { Config::set('forget.me', 'now'); $this->assertTrue(Config::has('forget.me')); @@ -220,7 +220,7 @@ class ConfigTest extends TestCase $this->assertFalse(Config::has('forget.me')); } - public function testForgetSubtree() + public function testForgetSubtree(): void { Config::set('forget.me.sub', 'yep'); $this->assertTrue(Config::has('forget.me.sub')); diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php index 79a7a72157..038dcfdf5b 100644 --- a/tests/CreatesApplication.php +++ b/tests/CreatesApplication.php @@ -3,6 +3,7 @@ namespace LibreNMS\Tests; use Illuminate\Contracts\Console\Kernel; +use Illuminate\Foundation\Application; trait CreatesApplication { @@ -11,7 +12,7 @@ trait CreatesApplication * * @return \Illuminate\Foundation\Application */ - public function createApplication() + public function createApplication(): Application { $app = require __DIR__ . '/../bootstrap/app.php'; diff --git a/tests/DBSetupTest.php b/tests/DBSetupTest.php index 717db369e7..856fb7f6c6 100644 --- a/tests/DBSetupTest.php +++ b/tests/DBSetupTest.php @@ -26,7 +26,7 @@ namespace LibreNMS\Tests; use Artisan; -use DB; +use Illuminate\Support\Facades\DB; use LibreNMS\DB\Schema; class DBSetupTest extends DBTestCase @@ -40,7 +40,7 @@ class DBSetupTest extends DBTestCase $this->db_name = DB::connection($this->connection)->getDatabaseName(); } - public function testSetupDB() + public function testSetupDB(): void { $result = Artisan::call('migrate:fresh', [ '--seed' => true, @@ -51,13 +51,13 @@ class DBSetupTest extends DBTestCase $this->assertSame(0, $result, 'Errors loading DB Schema: ' . Artisan::output()); } - public function testSchemaFiles() + public function testSchemaFiles(): void { $files = glob(base_path('/sql-schema/*.sql')); $this->assertCount(282, $files, 'You should not create new legacy schema files.'); } - public function testSchema() + public function testSchema(): void { $files = array_map(function ($migration_file) { return basename($migration_file, '.php'); @@ -74,9 +74,9 @@ class DBSetupTest extends DBTestCase $this->assertEquals(1000, $schema, 'Seed not run, after seed legacy dbSchema should be 1000'); } - public function testCheckDBCollation() + public function testCheckDBCollation(): void { - $collation = DB::connection($this->connection)->select(DB::raw("SELECT DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA S WHERE schema_name = '$this->db_name' AND ( DEFAULT_CHARACTER_SET_NAME != 'utf8mb4' OR DEFAULT_COLLATION_NAME != 'utf8mb4_unicode_ci')")); + $collation = DB::connection($this->connection)->select(DB::raw("SELECT DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA S WHERE schema_name = '$this->db_name' AND ( DEFAULT_CHARACTER_SET_NAME != 'utf8mb4' OR DEFAULT_COLLATION_NAME != 'utf8mb4_unicode_ci')")->getValue(DB::connection($this->connection)->getQueryGrammar())); if (isset($collation[0])) { $error = implode(' ', (array) $collation[0]); } else { @@ -85,9 +85,9 @@ class DBSetupTest extends DBTestCase $this->assertEmpty($collation, 'Wrong Database Collation or Character set: ' . $error); } - public function testCheckTableCollation() + public function testCheckTableCollation(): void { - $collation = DB::connection($this->connection)->select(DB::raw("SELECT T.TABLE_NAME, C.CHARACTER_SET_NAME, C.COLLATION_NAME FROM information_schema.TABLES AS T, information_schema.COLLATION_CHARACTER_SET_APPLICABILITY AS C WHERE C.collation_name = T.table_collation AND T.table_schema = '$this->db_name' AND ( C.CHARACTER_SET_NAME != 'utf8mb4' OR C.COLLATION_NAME != 'utf8mb4_unicode_ci' );")); + $collation = DB::connection($this->connection)->select(DB::raw("SELECT T.TABLE_NAME, C.CHARACTER_SET_NAME, C.COLLATION_NAME FROM information_schema.TABLES AS T, information_schema.COLLATION_CHARACTER_SET_APPLICABILITY AS C WHERE C.collation_name = T.table_collation AND T.table_schema = '$this->db_name' AND ( C.CHARACTER_SET_NAME != 'utf8mb4' OR C.COLLATION_NAME != 'utf8mb4_unicode_ci' );")->getValue(DB::connection($this->connection)->getQueryGrammar())); $error = ''; foreach ($collation as $data) { $error .= implode(' ', (array) $data) . PHP_EOL; @@ -95,9 +95,9 @@ class DBSetupTest extends DBTestCase $this->assertEmpty($collation, 'Wrong Table Collation or Character set: ' . $error); } - public function testCheckColumnCollation() + public function testCheckColumnCollation(): void { - $collation = DB::connection($this->connection)->select(DB::raw("SELECT TABLE_NAME, COLUMN_NAME, CHARACTER_SET_NAME, COLLATION_NAME FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = '$this->db_name' AND ( CHARACTER_SET_NAME != 'utf8mb4' OR COLLATION_NAME != 'utf8mb4_unicode_ci' );")); + $collation = DB::connection($this->connection)->select(DB::raw("SELECT TABLE_NAME, COLUMN_NAME, CHARACTER_SET_NAME, COLLATION_NAME FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = '$this->db_name' AND ( CHARACTER_SET_NAME != 'utf8mb4' OR COLLATION_NAME != 'utf8mb4_unicode_ci' );")->getValue(DB::connection($this->connection)->getQueryGrammar())); $error = ''; foreach ($collation as $data) { $error .= implode(' ', (array) $data) . PHP_EOL; @@ -105,9 +105,9 @@ class DBSetupTest extends DBTestCase $this->assertEmpty($collation, 'Wrong Column Collation or Character set: ' . $error); } - public function testSqlMode() + public function testSqlMode(): void { - $result = DB::connection($this->connection)->selectOne(DB::raw('SELECT @@version AS version, @@sql_mode AS mode')); + $result = DB::connection($this->connection)->selectOne(DB::raw('SELECT @@version AS version, @@sql_mode AS mode')->getValue(DB::connection($this->connection)->getQueryGrammar())); preg_match('/([0-9.]+)(?:-(\w+))?/', $result->version, $matches); $version = $matches[1] ?? null; $vendor = $matches[2] ?? null; @@ -123,7 +123,7 @@ class DBSetupTest extends DBTestCase $this->assertEquals($expected, $mode); } - public function testValidateSchema() + public function testValidateSchema(): void { if (is_file('misc/db_schema.yaml')) { DB::connection($this->connection)->statement('SET time_zone = "+00:00";'); diff --git a/tests/DocsTest.php b/tests/DocsTest.php index 9f36369700..64eb6d8e9b 100644 --- a/tests/DocsTest.php +++ b/tests/DocsTest.php @@ -43,7 +43,7 @@ class DocsTest extends TestCase /** * @group docs */ - public function testDocExist() + public function testDocExist(): void { $mkdocs = Yaml::parse(file_get_contents(__DIR__ . '/../mkdocs.yml')); $dir = __DIR__ . '/../doc/'; diff --git a/tests/Feature/TestScheduledMaintenance.php b/tests/Feature/TestScheduledMaintenance.php index 41d30c78a7..2708abc202 100644 --- a/tests/Feature/TestScheduledMaintenance.php +++ b/tests/Feature/TestScheduledMaintenance.php @@ -12,7 +12,7 @@ class TestScheduledMaintenance extends DBTestCase { private $timezone; - public function testNormal() + public function testNormal(): void { $now = CarbonImmutable::now(); @@ -35,7 +35,7 @@ class TestScheduledMaintenance extends DBTestCase $this->assertScheduleSet($now->subHours(2), $schedule); } - public function testRecurringNormal() + public function testRecurringNormal(): void { $this->setTimezone('America/New_York'); $schedule = AlertSchedule::factory()->recurring()->make(); diff --git a/tests/FpingTest.php b/tests/FpingTest.php index 8a30fac04b..edbbcee73e 100644 --- a/tests/FpingTest.php +++ b/tests/FpingTest.php @@ -30,7 +30,7 @@ use Symfony\Component\Process\Process; class FpingTest extends TestCase { - public function testUpPing() + public function testUpPing(): void { $output = "192.168.1.3 : xmt/rcv/%loss = 3/3/0%, min/avg/max = 0.62/0.71/0.93\n"; $this->mockFpingProcess($output, 0); @@ -59,7 +59,7 @@ class FpingTest extends TestCase $this->assertEquals(0, $actual->exit_code); } - public function testPartialDownPing() + public function testPartialDownPing(): void { $output = "192.168.1.7 : xmt/rcv/%loss = 5/3/40%, min/avg/max = 0.13/0.23/0.32\n"; $this->mockFpingProcess($output, 0); @@ -77,7 +77,7 @@ class FpingTest extends TestCase $this->assertEquals(0, $actual->exit_code); } - public function testDownPing() + public function testDownPing(): void { $output = "192.168.53.1 : xmt/rcv/%loss = 3/0/100%\n"; $this->mockFpingProcess($output, 1); @@ -95,7 +95,7 @@ class FpingTest extends TestCase $this->assertEquals(1, $actual->exit_code); } - public function testDuplicatePing() + public function testDuplicatePing(): void { $output = <<<'OUT' 192.168.1.2 : duplicate for [0], 84 bytes, 0.91 ms diff --git a/tests/FunctionsTest.php b/tests/FunctionsTest.php index 9f0b44fd07..560fb986d3 100644 --- a/tests/FunctionsTest.php +++ b/tests/FunctionsTest.php @@ -32,23 +32,23 @@ use LibreNMS\Util\Time; class FunctionsTest extends TestCase { - public function testMacCleanToReadable() + public function testMacCleanToReadable(): void { $this->assertEquals('de:ad:be:ef:a0:c3', Rewrite::readableMac('deadbeefa0c3')); } - public function testHex2Str() + public function testHex2Str(): void { $this->assertEquals('Big 10 UP', hex2str('426967203130205550')); } - public function testSnmpHexstring() + public function testSnmpHexstring(): void { $input = '4c 61 72 70 69 6e 67 20 34 20 55 00 0a'; $this->assertEquals("Larping 4 U\n", snmp_hexstring($input)); } - public function testIsHexString() + public function testIsHexString(): void { $this->assertTrue(isHexString('af 28 02')); $this->assertTrue(isHexString('aF 28 02 CE')); @@ -56,7 +56,7 @@ class FunctionsTest extends TestCase $this->assertFalse(isHexString('a5fe53')); } - public function testDynamicDiscoveryGetValue() + public function testDynamicDiscoveryGetValue(): void { $pre_cache = [ 'firstdata' => [ @@ -102,7 +102,7 @@ class FunctionsTest extends TestCase $this->assertSame('BBQ', YamlDiscovery::getValueFromData('doubletable', 13, $data, $pre_cache)); } - public function testParseAtTime() + public function testParseAtTime(): void { $this->assertEquals(time(), Time::parseAt('now'), 'now did not match'); $this->assertEquals(time() + 180, Time::parseAt('+3m'), '+3m did not match'); diff --git a/tests/GitIgnoreTest.php b/tests/GitIgnoreTest.php index cbd5a9bf88..61c9c3d9df 100644 --- a/tests/GitIgnoreTest.php +++ b/tests/GitIgnoreTest.php @@ -44,21 +44,21 @@ class GitIgnoreTest extends TestCase 'storage/logs/.gitignore', ]; - public function testGitIgnoresExist() + public function testGitIgnoresExist(): void { foreach ($this->gitIgnoreFiles as $file) { $this->assertFileExists($file); } } - public function testGitIgnoresMode() + public function testGitIgnoresMode(): void { foreach ($this->gitIgnoreFiles as $file) { $this->assertFalse(is_executable($file), "$file should not be executable"); } } - public function testGitIgnoresNotEmpty() + public function testGitIgnoresNotEmpty(): void { foreach ($this->gitIgnoreFiles as $file) { $this->assertGreaterThan(4, filesize($file), "$file is empty, it should not be"); diff --git a/tests/IpTest.php b/tests/IpTest.php index 0882b5ff04..35935192fe 100644 --- a/tests/IpTest.php +++ b/tests/IpTest.php @@ -31,7 +31,7 @@ use LibreNMS\Util\IPv6; class IpTest extends TestCase { - public function testIsValid() + public function testIsValid(): void { $this->assertTrue(IP::isValid('192.168.0.1')); $this->assertTrue(IP::isValid('192.168.0.1')); @@ -64,7 +64,7 @@ class IpTest extends TestCase $this->assertFalse(IPv6::isValid('2001:db8:85a3::8a2e:370:7334', true)); } - public function testIpParse() + public function testIpParse(): void { $this->assertEquals('192.168.0.1', IP::parse('192.168.0.1')); $this->assertEquals('127.0.0.1', IP::parse('127.0.0.1')); @@ -86,7 +86,7 @@ class IpTest extends TestCase new IPv4('::1'); } - public function testHexToIp() + public function testHexToIp(): void { $this->assertEquals('192.168.1.254', IP::fromHexString('c0 a8 01 fe')); $this->assertEquals('192.168.1.254', IP::fromHexString('c0a801fe')); @@ -110,7 +110,7 @@ class IpTest extends TestCase IP::fromHexString('20 01 0d b8 00 00 00 00 00 00 00 00 00 02 00 00 00 01'); } - public function testNetmask2Cidr() + public function testNetmask2Cidr(): void { $this->assertSame(32, IPv4::netmask2cidr('255.255.255.255')); $this->assertSame(30, IPv4::netmask2cidr('255.255.255.252')); @@ -118,7 +118,7 @@ class IpTest extends TestCase $this->assertSame(16, IPv4::netmask2cidr('255.255.0.0')); } - public function testIpInNetwork() + public function testIpInNetwork(): void { $this->assertTrue(IP::parse('192.168.1.0')->inNetwork('192.168.1.0/24')); $this->assertTrue(IP::parse('192.168.1.32')->inNetwork('192.168.1.0/24')); @@ -144,7 +144,7 @@ class IpTest extends TestCase IP::parse('192.168.1.0')->inNetwork('192.168.1.0'); } - public function testIpv6Compress() + public function testIpv6Compress(): void { $this->assertEquals('::1', IP::parse('0:0:0:0:0:0:0:1')); $this->assertSame('::1', IP::parse('0:0:0:0:0:0:0:1')->compressed()); @@ -153,7 +153,7 @@ class IpTest extends TestCase $this->assertSame('2001:db8:85a3::8a2e:370:7334', IP::parse('2001:0db8:85a3:0000:0000:8a2e:0370:7334')->compressed()); } - public function testIpv6Uncompress() + public function testIpv6Uncompress(): void { $this->assertSame('0000:0000:0000:0000:0000:0000:0000:0001', IP::parse('::1')->uncompressed()); $this->assertSame('0000:0000:0000:0000:0000:0000:0000:0000', IP::parse('::')->uncompressed()); @@ -161,7 +161,7 @@ class IpTest extends TestCase $this->assertSame('2001:0db8:85a3:0001:0001:8a2e:0370:7334', IP::parse('2001:db8:85a3:1:1:8a2e:370:7334')->uncompressed()); } - public function testNetworkFromIp() + public function testNetworkFromIp(): void { $this->assertSame('192.168.1.0/24', IP::parse('192.168.1.34')->getNetwork(24)); $this->assertSame('192.168.1.0/24', IP::parse('192.168.1.0/24')->getNetwork()); @@ -176,7 +176,7 @@ class IpTest extends TestCase $this->assertSame('2001:db8:85a3:341a::370:7334', IP::parse('2001:db8:85a3:341a::370:7334/128')->getNetworkAddress()); } - public function testToSnmpIndex() + public function testToSnmpIndex(): void { $this->assertSame('192.168.1.5', IP::parse('192.168.1.5')->toSnmpIndex()); $this->assertSame('32.1.8.120.224.0.130.226.134.161.0.0.0.0.0.0', IP::parse('2001:878:e000:82e2:86a1:0000:0000:0000')->toSnmpIndex()); diff --git a/tests/MibTest.php b/tests/MibTest.php index 77c090a463..3528f55012 100644 --- a/tests/MibTest.php +++ b/tests/MibTest.php @@ -46,7 +46,7 @@ class MibTest extends TestCase * * @param string $dir */ - public function testMibDirectory($dir) + public function testMibDirectory($dir): void { $output = shell_exec('snmptranslate -M +' . Config::get('mib_dir') . ":$dir -m +ALL SNMPv2-MIB::system 2>&1"); $errors = str_replace("SNMPv2-MIB::system\n", '', $output); @@ -65,7 +65,7 @@ class MibTest extends TestCase * @param string $file * @param string $mib_name */ - public function testDuplicateMibs($path, $file, $mib_name) + public function testDuplicateMibs($path, $file, $mib_name): void { global $console_color; @@ -97,7 +97,7 @@ class MibTest extends TestCase * @param string $file * @param string $mib_name */ - public function testMibNameMatches($path, $file, $mib_name) + public function testMibNameMatches($path, $file, $mib_name): void { global $console_color; @@ -117,7 +117,7 @@ class MibTest extends TestCase * @param string $file * @param string $mib_name */ - public function testMibContents($path, $file, $mib_name) + public function testMibContents($path, $file, $mib_name): void { global $console_color; $file_path = "$path/$file"; diff --git a/tests/OSDiscoveryTest.php b/tests/OSDiscoveryTest.php index aa56116c66..87e7f211af 100644 --- a/tests/OSDiscoveryTest.php +++ b/tests/OSDiscoveryTest.php @@ -54,7 +54,7 @@ class OSDiscoveryTest extends TestCase /** * Populate a list of files to check and make sure it isn't empty */ - public function testHaveFilesToTest() + public function testHaveFilesToTest(): void { $this->assertNotEmpty(self::$unchecked_files); } @@ -68,7 +68,7 @@ class OSDiscoveryTest extends TestCase * * @param string $os_name */ - public function testOSDetection($os_name) + public function testOSDetection($os_name): void { if (! getenv('SNMPSIM')) { $this->app->bind(NetSnmpQuery::class, SnmpQueryMock::class); @@ -101,7 +101,7 @@ class OSDiscoveryTest extends TestCase * * @depends testOSDetection */ - public function testAllFilesTested() + public function testAllFilesTested(): void { $this->assertEmpty( self::$unchecked_files, diff --git a/tests/OSModulesTest.php b/tests/OSModulesTest.php index d69b4bfab2..35743dddfe 100644 --- a/tests/OSModulesTest.php +++ b/tests/OSModulesTest.php @@ -70,7 +70,7 @@ class OSModulesTest extends DBTestCase * * @dataProvider dumpedDataProvider */ - public function testDataIsValid($os, $variant, $modules) + public function testDataIsValid($os, $variant, $modules): void { // special case if data provider throws exception if ($os === false) { @@ -91,7 +91,7 @@ class OSModulesTest extends DBTestCase * @param string $variant optional variant * @param array $modules modules to test for this os */ - public function testOS($os, $variant, $modules) + public function testOS($os, $variant, $modules): void { // Lock testing time $this->travelTo(new \DateTime('2022-01-01 00:00:00')); diff --git a/tests/QueryBuilderTest.php b/tests/QueryBuilderTest.php index d265cf1e71..736525a335 100644 --- a/tests/QueryBuilderTest.php +++ b/tests/QueryBuilderTest.php @@ -33,7 +33,7 @@ class QueryBuilderTest extends TestCase { private $data_file = 'tests/data/misc/querybuilder.json'; - public function testHasQueryData() + public function testHasQueryData(): void { $this->assertNotEmpty( $this->loadQueryData(), @@ -49,7 +49,7 @@ class QueryBuilderTest extends TestCase * @param string $display * @param string $sql */ - public function testQueryConversion($legacy, $builder, $display, $sql, $query) + public function testQueryConversion($legacy, $builder, $display, $sql, $query): void { if (! empty($legacy)) { // some rules don't have a legacy representation diff --git a/tests/RrdDefinitionTest.php b/tests/RrdDefinitionTest.php index 1c8764411f..0281cef4ad 100644 --- a/tests/RrdDefinitionTest.php +++ b/tests/RrdDefinitionTest.php @@ -30,12 +30,12 @@ use LibreNMS\RRD\RrdDefinition; class RrdDefinitionTest extends TestCase { - public function testEmpty() + public function testEmpty(): void { $this->assertEmpty((string) new RrdDefinition()); } - public function testWrongType() + public function testWrongType(): void { $this->expectException(\LibreNMS\Exceptions\InvalidRrdTypeException::class); Config::set('rrd.step', 300); @@ -44,7 +44,7 @@ class RrdDefinitionTest extends TestCase $def->addDataset('badtype', 'Something unexpected'); } - public function testNameEscaping() + public function testNameEscaping(): void { Config::set('rrd.step', 300); Config::set('rrd.heartbeat', 600); @@ -54,7 +54,7 @@ class RrdDefinitionTest extends TestCase $this->assertEquals($expected, (string) $def); } - public function testCreation() + public function testCreation(): void { Config::set('rrd.step', 300); Config::set('rrd.heartbeat', 600); diff --git a/tests/RrdtoolTest.php b/tests/RrdtoolTest.php index 0c4a7add42..f2fa5deeab 100644 --- a/tests/RrdtoolTest.php +++ b/tests/RrdtoolTest.php @@ -30,7 +30,7 @@ use LibreNMS\Data\Store\Rrd; class RrdtoolTest extends TestCase { - public function testBuildCommandLocal() + public function testBuildCommandLocal(): void { Config::set('rrdcached', ''); Config::set('rrdtool_version', '1.4'); @@ -58,7 +58,7 @@ class RrdtoolTest extends TestCase $this->assertEquals('update /opt/librenms/rrd/f o', $cmd); } - public function testBuildCommandRemote() + public function testBuildCommandRemote(): void { Config::set('rrdcached', 'server:42217'); Config::set('rrdtool_version', '1.4'); @@ -86,7 +86,7 @@ class RrdtoolTest extends TestCase $this->assertEquals('update f o --daemon server:42217', $cmd); } - public function testBuildCommandException() + public function testBuildCommandException(): void { Config::set('rrdcached', ''); Config::set('rrdtool_version', '1.4'); diff --git a/tests/SVGTest.php b/tests/SVGTest.php index 03bd1d3274..db2f96241c 100644 --- a/tests/SVGTest.php +++ b/tests/SVGTest.php @@ -38,7 +38,7 @@ use RegexIterator; */ class SVGTest extends TestCase { - public function testSVGContainsPNG() + public function testSVGContainsPNG(): void { foreach ($this->getSvgFiles() as $file => $_unused) { $svg = file_get_contents($file); @@ -50,7 +50,7 @@ class SVGTest extends TestCase } } - public function testSVGHasLengthWidth() + public function testSVGHasLengthWidth(): void { foreach ($this->getSvgFiles() as $file => $_unused) { if ($file == 'html/images/safari-pinned-tab.svg') { @@ -67,7 +67,7 @@ class SVGTest extends TestCase } } - public function testSVGHasViewBox() + public function testSVGHasViewBox(): void { foreach ($this->getSvgFiles() as $file => $_unused) { $svg = file_get_contents($file); diff --git a/tests/SchemaTest.php b/tests/SchemaTest.php index 850b618b9b..5fdf37d984 100644 --- a/tests/SchemaTest.php +++ b/tests/SchemaTest.php @@ -123,7 +123,7 @@ class SchemaTest extends TestCase return $schema; } - public function testTableRelationships() + public function testTableRelationships(): void { // mock getSchema $schema = $this->getSchemaMock(); @@ -143,7 +143,7 @@ class SchemaTest extends TestCase $this->assertEquals($expected, $schema->getTableRelationships()); } - public function testFindRelationshipPath() + public function testFindRelationshipPath(): void { $schema = $this->getSchemaMock(); diff --git a/tests/SmokepingCliTest.php b/tests/SmokepingCliTest.php index 62c94dccfb..3d064bb836 100644 --- a/tests/SmokepingCliTest.php +++ b/tests/SmokepingCliTest.php @@ -92,7 +92,7 @@ class SmokepingCliTest extends DBTestCase parent::setUp(); } - public function testNonsense() + public function testNonsense(): void { $this->assertNotEquals(0, \Artisan::call('smokeping:generate --probes --targets --no-header')); $this->assertNotEquals(0, \Artisan::call('smokeping:generate --probes --targets --single-process')); @@ -105,7 +105,7 @@ class SmokepingCliTest extends DBTestCase \Artisan::call('smokeping:generate --foobar'); } - public function testBuildHeader() + public function testBuildHeader(): void { $warnings = ['rpPvjwdI0M0hlg6ZgZA', '2aUjOMql6ZWN7H0DthWDOyCvkXs0kVShhnASnc', 'HYMWbDplSW9PLNK9o9tySeJF4Ac61uTRHUUxxBXHiCl']; @@ -125,7 +125,7 @@ class SmokepingCliTest extends DBTestCase $this->assertEquals($this->instance->buildHeader(true, false), []); } - public function testAssembleProbes() + public function testAssembleProbes(): void { $tests = [0, -1]; @@ -134,7 +134,7 @@ class SmokepingCliTest extends DBTestCase } } - public function testBuildProbe() + public function testBuildProbe(): void { $saved = ['+ Pl0JnP2vfE', ' binary = /usr/bin/G28F3fFeew', @@ -151,7 +151,7 @@ class SmokepingCliTest extends DBTestCase $this->assertEquals(implode(PHP_EOL, $saved), implode(PHP_EOL, $output)); } - public function testBuildTargets() + public function testBuildTargets(): void { $saved = [ '+ Le23HKVMvN', @@ -245,7 +245,7 @@ class SmokepingCliTest extends DBTestCase $this->assertEquals(implode(PHP_EOL, $saved), implode(PHP_EOL, $output)); } - public function testSingleProccess() + public function testSingleProccess(): void { $saved = [ '+ Le23HKVMvN', @@ -327,7 +327,7 @@ class SmokepingCliTest extends DBTestCase $this->assertEquals(implode(PHP_EOL, $saved), implode(PHP_EOL, $output)); } - public function testCompareLegacy() + public function testCompareLegacy(): void { $data = []; diff --git a/tests/SyslogTest.php b/tests/SyslogTest.php index e29fe0505a..869fdfa0be 100644 --- a/tests/SyslogTest.php +++ b/tests/SyslogTest.php @@ -63,7 +63,7 @@ class SyslogTest extends TestCase $this->assertEquals($data['result'], $res); } - public function testCiscoSyslog() + public function testCiscoSyslog(): void { // populate fake $dev_cache global $dev_cache; @@ -143,7 +143,7 @@ class SyslogTest extends TestCase ); } - public function testLinuxSyslog() + public function testLinuxSyslog(): void { // populate fake $dev_cache global $dev_cache; @@ -194,7 +194,7 @@ class SyslogTest extends TestCase ); } - public function testProcurveSyslog() + public function testProcurveSyslog(): void { // populate fake $dev_cache global $dev_cache; @@ -229,7 +229,7 @@ class SyslogTest extends TestCase ); } - public function testZywallSyslog() + public function testZywallSyslog(): void { // populate fake $dev_cache global $dev_cache; diff --git a/tests/Unit/CiHelperTest.php b/tests/Unit/CiHelperTest.php index 166c141faf..064981454e 100644 --- a/tests/Unit/CiHelperTest.php +++ b/tests/Unit/CiHelperTest.php @@ -30,7 +30,7 @@ use LibreNMS\Util\CiHelper; class CiHelperTest extends TestCase { - public function testSetFlags() + public function testSetFlags(): void { $helper = new CiHelper(); $allFalse = array_map(function ($flag) { @@ -55,13 +55,13 @@ class CiHelperTest extends TestCase $this->assertEquals($testOne, $helper->getFlags()); } - public function testDefaults() + public function testDefaults(): void { $helper = new CiHelper(); $this->assertEquals($this->getDefaultFlags(), $helper->getFlags()); } - public function testNoFiles() + public function testNoFiles(): void { putenv('FILES=none'); $helper = new CiHelper(); @@ -78,7 +78,7 @@ class CiHelperTest extends TestCase ]); } - public function testSetOs() + public function testSetOs(): void { $helper = new CiHelper(); $helper->setOS(['netonix', 'e3meter']); @@ -116,7 +116,7 @@ class CiHelperTest extends TestCase ]); } - public function testSetModules() + public function testSetModules(): void { $helper = new CiHelper(); $helper->setModules(['sensors', 'processors']); @@ -185,7 +185,7 @@ class CiHelperTest extends TestCase ]); } - public function testFileCategorization() + public function testFileCategorization(): void { putenv('FILES=LibreNMS/Alert/Transport/Sensu.php includes/services.inc.php'); $helper = new CiHelper(); diff --git a/tests/Unit/ComponentTest.php b/tests/Unit/ComponentTest.php index 9ef6a0300a..54ce1336e4 100644 --- a/tests/Unit/ComponentTest.php +++ b/tests/Unit/ComponentTest.php @@ -36,7 +36,7 @@ class ComponentTest extends DBTestCase { use DatabaseTransactions; - public function testDeleteComponent() + public function testDeleteComponent(): void { $target = \App\Models\Component::factory()->create(); /** @var \App\Models\Component $target */ $this->assertTrue(\App\Models\Component::where('id', $target->id)->exists(), 'Failed to create component, this shouldn\'t happen'); @@ -47,12 +47,12 @@ class ComponentTest extends DBTestCase $this->assertFalse(\App\Models\Component::where('id', $target->id)->exists(), 'deleteComponent failed to delete the component.'); } - public function testGetComponentsEmpty() + public function testGetComponentsEmpty(): void { $this->assertEquals([], (new Component())->getComponents(43)); } - public function testGetComponentsOptionsType() + public function testGetComponentsOptionsType(): void { $target = \App\Models\Component::factory()->create(); /** @var \App\Models\Component $target */ $component = new Component(); @@ -64,7 +64,7 @@ class ComponentTest extends DBTestCase $this->assertEquals($this->buildExpected($target), $actual); } - public function testGetComponentsOptionsFilterNotIgnore() + public function testGetComponentsOptionsFilterNotIgnore(): void { \App\Models\Component::factory()->create(['device_id' => 1, 'ignore' => 1]); $target = \App\Models\Component::factory()->times(2)->create(['device_id' => 1, 'ignore' => 0]); /** @var \Illuminate\Support\Collection $target */ @@ -75,7 +75,7 @@ class ComponentTest extends DBTestCase $this->assertEquals($this->buildExpected($target), $actual); } - public function testGetComponentsOptionsComplex() + public function testGetComponentsOptionsComplex(): void { \App\Models\Component::factory()->create(['label' => 'Search Phrase']); \App\Models\Component::factory()->times(2)->create(['label' => 'Something Else']); @@ -93,7 +93,7 @@ class ComponentTest extends DBTestCase $this->assertEquals($this->buildExpected($target->reverse()->values()), $actual); } - public function testGetFirstComponentID() + public function testGetFirstComponentID(): void { $input = [ 1 => [37 => [], 14 => []], @@ -104,7 +104,7 @@ class ComponentTest extends DBTestCase $this->assertEquals(37, $component->getFirstComponentID($input[1])); } - public function testGetComponentCount() + public function testGetComponentCount(): void { \App\Models\Component::factory()->times(2)->create(['device_id' => 1, 'type' => 'three']); \App\Models\Component::factory()->create(['device_id' => 2, 'type' => 'three']); @@ -116,7 +116,7 @@ class ComponentTest extends DBTestCase $this->assertEquals(['three' => 1, 'one' => 1], $component->getComponentCount(2)); } - public function testSetComponentPrefs() + public function testSetComponentPrefs(): void { // Nightmare function, no where near exhaustive $base = \App\Models\Component::factory()->create(); /** @var \App\Models\Component $base */ @@ -152,7 +152,7 @@ class ComponentTest extends DBTestCase $this->assertFalse(ComponentPref::where('component', $base->id)->exists()); } - public function testCreateComponent() + public function testCreateComponent(): void { $device_id = rand(1, 32); $type = Str::random(9); @@ -174,7 +174,7 @@ class ComponentTest extends DBTestCase $this->assertEquals($log->message, 'Component Created'); } - public function testGetComponentStatusLog() + public function testGetComponentStatusLog(): void { // invalid id fails $component = new Component(); diff --git a/tests/Unit/Data/DatastoreTest.php b/tests/Unit/Data/DatastoreTest.php index b724284a2e..66ece39c20 100644 --- a/tests/Unit/Data/DatastoreTest.php +++ b/tests/Unit/Data/DatastoreTest.php @@ -46,7 +46,7 @@ class DatastoreTest extends TestCase ]); } - public function testDefaultInitialization() + public function testDefaultInitialization(): void { $ds = $this->app->make('Datastore'); $stores = $ds->getStores(); @@ -55,7 +55,7 @@ class DatastoreTest extends TestCase $this->assertEquals('LibreNMS\Data\Store\Rrd', get_class($stores[0]), 'The default enabled store should be Rrd'); } - public function testInitialization() + public function testInitialization(): void { Config::set('rrd.enable', false); Config::set('graphite.enable', true); diff --git a/tests/Unit/Data/GraphiteStoreTest.php b/tests/Unit/Data/GraphiteStoreTest.php index 041a98d06a..ad9c3a1da6 100644 --- a/tests/Unit/Data/GraphiteStoreTest.php +++ b/tests/Unit/Data/GraphiteStoreTest.php @@ -52,7 +52,7 @@ class GraphiteStoreTest extends TestCase parent::tearDown(); } - public function testSocketConnectError() + public function testSocketConnectError(): void { $mockFactory = \Mockery::mock(\Socket\Raw\Factory::class); @@ -62,7 +62,7 @@ class GraphiteStoreTest extends TestCase new Graphite($mockFactory); } - public function testSocketWriteError() + public function testSocketWriteError(): void { $mockSocket = \Mockery::mock(\Socket\Raw\Socket::class); $graphite = $this->mockGraphite($mockSocket); @@ -73,7 +73,7 @@ class GraphiteStoreTest extends TestCase $graphite->put(['hostname' => 'test'], 'fake', ['rrd_name' => 'name'], ['one' => 1]); } - public function testSimpleWrite() + public function testSimpleWrite(): void { $mockSocket = \Mockery::mock(\Socket\Raw\Socket::class); $graphite = $this->mockGraphite($mockSocket); diff --git a/tests/Unit/Data/InfluxDBStoreTest.php b/tests/Unit/Data/InfluxDBStoreTest.php index 9ece650b14..8736a36dea 100644 --- a/tests/Unit/Data/InfluxDBStoreTest.php +++ b/tests/Unit/Data/InfluxDBStoreTest.php @@ -34,7 +34,7 @@ use LibreNMS\Tests\TestCase; */ class InfluxDBStoreTest extends TestCase { - public function testBadSettings() + public function testBadSettings(): void { Config::set('influxdb.host', ''); Config::set('influxdb.port', 'abc'); @@ -45,7 +45,7 @@ class InfluxDBStoreTest extends TestCase $influx->put(['hostname' => 'test'], 'fake', [], ['one' => 1]); } - public function testSimpleWrite() + public function testSimpleWrite(): void { // Create a mock of the Random Interface $mock = \Mockery::mock(\InfluxDB\Database::class); diff --git a/tests/Unit/Data/OpenTSDBStoreTest.php b/tests/Unit/Data/OpenTSDBStoreTest.php index 18cacdbd62..a8004287b9 100644 --- a/tests/Unit/Data/OpenTSDBStoreTest.php +++ b/tests/Unit/Data/OpenTSDBStoreTest.php @@ -52,7 +52,7 @@ class OpenTSDBStoreTest extends TestCase parent::tearDown(); } - public function testSocketConnectError() + public function testSocketConnectError(): void { $mockFactory = \Mockery::mock(\Socket\Raw\Factory::class); @@ -62,7 +62,7 @@ class OpenTSDBStoreTest extends TestCase new OpenTSDB($mockFactory); } - public function testSocketWriteError() + public function testSocketWriteError(): void { $mockSocket = \Mockery::mock(\Socket\Raw\Socket::class); $opentsdb = $this->mockOpenTSDB($mockSocket); @@ -73,7 +73,7 @@ class OpenTSDBStoreTest extends TestCase $opentsdb->put(['hostname' => 'test'], 'fake', [], ['one' => 1]); } - public function testSimpleWrite() + public function testSimpleWrite(): void { $mockSocket = \Mockery::mock(\Socket\Raw\Socket::class); $opentsdb = $this->mockOpenTSDB($mockSocket); @@ -90,7 +90,7 @@ class OpenTSDBStoreTest extends TestCase $opentsdb->put($device, $measurement, $tags, $fields); } - public function testPortWrite() + public function testPortWrite(): void { $mockSocket = \Mockery::mock(\Socket\Raw\Socket::class); $opentsdb = $this->mockOpenTSDB($mockSocket); diff --git a/tests/Unit/DeviceTest.php b/tests/Unit/DeviceTest.php index bedeb1951d..617637b910 100644 --- a/tests/Unit/DeviceTest.php +++ b/tests/Unit/DeviceTest.php @@ -35,7 +35,7 @@ class DeviceTest extends DBTestCase { use DatabaseTransactions; - public function testFindByHostname() + public function testFindByHostname(): void { $device = Device::factory()->create(); /** @var Device $device */ $found = Device::findByHostname($device->hostname); @@ -43,25 +43,25 @@ class DeviceTest extends DBTestCase $this->assertEquals($device->device_id, $found->device_id, 'Did not find the correct device'); } - public function testFindByIpFail() + public function testFindByIpFail(): void { $found = Device::findByIp('this is not an ip'); $this->assertNull($found); } - public function testFindByIpv4Fail() + public function testFindByIpv4Fail(): void { $found = Device::findByIp('182.43.219.43'); $this->assertNull($found); } - public function testFindByIpv6Fail() + public function testFindByIpv6Fail(): void { $found = Device::findByIp('341a:234d:3429:9845:909f:fd32:1930:32dc'); $this->assertNull($found); } - public function testFindIpButNoPort() + public function testFindIpButNoPort(): void { $ipv4 = Ipv4Address::factory()->create(); /** @var Ipv4Address $ipv4 */ Port::destroy($ipv4->port_id); @@ -70,7 +70,7 @@ class DeviceTest extends DBTestCase $this->assertNull($found); } - public function testFindByIp() + public function testFindByIp(): void { $device = Device::factory()->create(); /** @var Device $device */ $found = Device::findByIp($device->ip); @@ -78,7 +78,7 @@ class DeviceTest extends DBTestCase $this->assertEquals($device->device_id, $found->device_id, 'Did not find the correct device'); } - public function testFindByIpHostname() + public function testFindByIpHostname(): void { $ip = '192.168.234.32'; $device = Device::factory()->create(['hostname' => $ip]); /** @var Device $device */ @@ -87,7 +87,7 @@ class DeviceTest extends DBTestCase $this->assertEquals($device->device_id, $found->device_id, 'Did not find the correct device'); } - public function testFindByIpThroughPort() + public function testFindByIpThroughPort(): void { $device = Device::factory()->create(); /** @var Device $device */ $port = Port::factory()->make(); /** @var Port $port */ diff --git a/tests/Unit/FileCategorizerTest.php b/tests/Unit/FileCategorizerTest.php index b8319cd89f..7fbfc5cf68 100644 --- a/tests/Unit/FileCategorizerTest.php +++ b/tests/Unit/FileCategorizerTest.php @@ -31,13 +31,13 @@ use LibreNMS\Util\FileCategorizer; class FileCategorizerTest extends TestCase { - public function testEmptyFiles() + public function testEmptyFiles(): void { $cat = new FileCategorizer(); $this->assertEquals($this->getCategorySkeleton(), $cat->categorize()); } - public function testIgnoredFiles() + public function testIgnoredFiles(): void { $this->assertCategorized([], [ 'docs/Nothing.md', @@ -53,7 +53,7 @@ class FileCategorizerTest extends TestCase ]); } - public function testPhpFiles() + public function testPhpFiles(): void { $this->assertCategorized([ 'php' => [ @@ -65,7 +65,7 @@ class FileCategorizerTest extends TestCase ]); } - public function testDocsFiles() + public function testDocsFiles(): void { $this->assertCategorized([ 'docs' => [ @@ -76,7 +76,7 @@ class FileCategorizerTest extends TestCase ]); } - public function testPython() + public function testPython(): void { $this->assertCategorized([ 'python' => [ @@ -86,7 +86,7 @@ class FileCategorizerTest extends TestCase ]); } - public function testBash() + public function testBash(): void { $this->assertCategorized([ 'bash' => [ @@ -96,7 +96,7 @@ class FileCategorizerTest extends TestCase ]); } - public function testSvg() + public function testSvg(): void { $this->assertCategorized([ 'svg' => [ @@ -107,7 +107,7 @@ class FileCategorizerTest extends TestCase ]); } - public function testResources() + public function testResources(): void { $this->assertCategorized([ 'resources' => [ @@ -121,7 +121,7 @@ class FileCategorizerTest extends TestCase ]); } - public function testOsFiles() + public function testOsFiles(): void { $this->assertCategorized([ 'os' => ['ftd', '3com', 'adva_fsp150', 'saf-integra-b'], @@ -180,7 +180,7 @@ class FileCategorizerTest extends TestCase ]); } - public function testFullChecks() + public function testFullChecks(): void { $this->assertCategorized(['full-checks' => ['composer.lock']]); $this->assertCategorized(['full-checks' => ['.github/workflows/test.yml']], ['other', '.github/workflows/test.yml']); diff --git a/tests/Unit/LocationTest.php b/tests/Unit/LocationTest.php index 999eb4e221..2e1f94cc82 100644 --- a/tests/Unit/LocationTest.php +++ b/tests/Unit/LocationTest.php @@ -35,7 +35,7 @@ use Mockery\MockInterface; class LocationTest extends TestCase { - public function testCanSetLocation() + public function testCanSetLocation(): void { $device = Device::factory()->make(); /** @var Device $device */ $device->setLocation('Where'); @@ -48,7 +48,7 @@ class LocationTest extends TestCase $this->assertNull($device->location); } - public function testCanNotSetLocation() + public function testCanNotSetLocation(): void { $device = Device::factory()->make(); /** @var Device $device */ $location = Location::factory()->make(); /** @var Location $location */ @@ -57,7 +57,7 @@ class LocationTest extends TestCase $this->assertNull($device->location); } - public function testCanSetEncodedLocation() + public function testCanSetEncodedLocation(): void { Config::set('geoloc.dns', false); $device = Device::factory()->make(); /** @var Device $device */ @@ -90,7 +90,7 @@ class LocationTest extends TestCase $this->assertNull($device->location->lng); } - public function testCanHandleGivenCoordinates() + public function testCanHandleGivenCoordinates(): void { Config::set('geoloc.dns', false); $device = Device::factory()->make(); /** @var Device $device */ @@ -103,7 +103,7 @@ class LocationTest extends TestCase $this->assertEquals($location->lng, $device->location->lng); } - public function testCanNotSetFixedCoordinates() + public function testCanNotSetFixedCoordinates(): void { $device = Device::factory()->make(); /** @var Device $device */ $locationOne = Location::factory()->withCoordinates()->make(); /** @var Location $locationOne */ @@ -123,7 +123,7 @@ class LocationTest extends TestCase $this->assertEquals($locationTwo->lng, $device->location->lng); } - public function testDnsLookup() + public function testDnsLookup(): void { $example = 'SW1A2AA.find.me.uk'; $expected = ['lat' => 51.50354111111111, 'lng' => -0.12766972222222223]; @@ -133,7 +133,7 @@ class LocationTest extends TestCase $this->assertEquals($expected, $result); } - public function testCanSetDnsCoordinate() + public function testCanSetDnsCoordinate(): void { Config::set('geoloc.dns', true); $device = Device::factory()->make(); /** @var Device $device */ @@ -154,7 +154,7 @@ class LocationTest extends TestCase $this->assertNull($device->location->lng); } - public function testCanSetByApi() + public function testCanSetByApi(): void { $device = Device::factory()->make(); /** @var Device $device */ $location = Location::factory()->withCoordinates()->make(); /** @var Location $location */ @@ -180,7 +180,7 @@ class LocationTest extends TestCase $this->assertEquals($location->lng, $device->location->lng); } - public function testCorrectPrecedence() + public function testCorrectPrecedence(): void { $device = Device::factory()->make(); /** @var Device $device */ $location_encoded = Location::factory()->withCoordinates()->make(); /** @var Location $location_encoded */ diff --git a/tests/Unit/PermissionsTest.php b/tests/Unit/PermissionsTest.php index 6d6b3e9283..7815dd908e 100644 --- a/tests/Unit/PermissionsTest.php +++ b/tests/Unit/PermissionsTest.php @@ -57,7 +57,7 @@ class PermissionsTest extends TestCase return new \Illuminate\Support\Collection($data); } - public function testUserCanAccessDevice() + public function testUserCanAccessDevice(): void { $perms = \Mockery::mock(\LibreNMS\Cache\PermissionsCache::class)->makePartial(); $perms->shouldReceive('getDevicePermissions')->andReturnUsing(function ($user) { @@ -81,7 +81,7 @@ class PermissionsTest extends TestCase $this->assertFalse($perms->canAccessDevice(54)); } - public function testDevicesForUser() + public function testDevicesForUser(): void { $perms = \Mockery::mock(\LibreNMS\Cache\PermissionsCache::class)->makePartial(); $perms->shouldReceive('getDevicePermissions')->andReturnUsing(function ($user) { @@ -114,7 +114,7 @@ class PermissionsTest extends TestCase $this->assertEmpty($perms->usersForDevice(9)); } */ - public function testUserCanAccessPort() + public function testUserCanAccessPort(): void { $perms = \Mockery::mock(\LibreNMS\Cache\PermissionsCache::class)->makePartial(); $perms->shouldReceive('getPortPermissions')->andReturn(collect([ @@ -140,7 +140,7 @@ class PermissionsTest extends TestCase $this->assertFalse($perms->canAccessPort(54)); } - public function testPortsForUser() + public function testPortsForUser(): void { $perms = \Mockery::mock(\LibreNMS\Cache\PermissionsCache::class)->makePartial(); $perms->shouldReceive('getPortPermissions')->andReturn(collect([ @@ -158,7 +158,7 @@ class PermissionsTest extends TestCase $this->assertEquals(collect([5]), $perms->portsForUser()); } - public function testUsersForPort() + public function testUsersForPort(): void { $perms = \Mockery::mock(\LibreNMS\Cache\PermissionsCache::class)->makePartial(); $perms->shouldReceive('getPortPermissions')->andReturn(collect([ @@ -175,7 +175,7 @@ class PermissionsTest extends TestCase $this->assertEmpty($perms->usersForPort(9)); } - public function testUserCanAccessBill() + public function testUserCanAccessBill(): void { $perms = \Mockery::mock(\LibreNMS\Cache\PermissionsCache::class)->makePartial(); $perms->shouldReceive('getBillPermissions')->andReturn(collect([ @@ -201,7 +201,7 @@ class PermissionsTest extends TestCase $this->assertFalse($perms->canAccessBill(54)); } - public function testBillsForUser() + public function testBillsForUser(): void { $perms = \Mockery::mock(\LibreNMS\Cache\PermissionsCache::class)->makePartial(); $perms->shouldReceive('getBillPermissions')->andReturn(collect([ @@ -219,7 +219,7 @@ class PermissionsTest extends TestCase $this->assertEquals(collect([5]), $perms->billsForUser()); } - public function testUsersForBill() + public function testUsersForBill(): void { $perms = \Mockery::mock(\LibreNMS\Cache\PermissionsCache::class)->makePartial(); $perms->shouldReceive('getBillPermissions')->andReturn(collect([ diff --git a/tests/Unit/SqliteTest.php b/tests/Unit/SqliteTest.php index 28af5b1dbc..51bd92eae7 100644 --- a/tests/Unit/SqliteTest.php +++ b/tests/Unit/SqliteTest.php @@ -33,7 +33,7 @@ class SqliteTest extends TestCase { private $connection = 'testing_persistent'; - public function testMigrationsRunWithoutError() + public function testMigrationsRunWithoutError(): void { try { $result = Artisan::call('migrate', ['--database' => $this->connection, '--seed' => true]); diff --git a/tests/Unit/Util/EnvTest.php b/tests/Unit/Util/EnvTest.php index 48a4dcd5af..2ca297c0d6 100644 --- a/tests/Unit/Util/EnvTest.php +++ b/tests/Unit/Util/EnvTest.php @@ -30,7 +30,7 @@ use LibreNMS\Util\EnvHelper; class EnvTest extends TestCase { - public function testParseArray() + public function testParseArray(): void { putenv('PARSETEST=one,two'); $this->assertSame(['one', 'two'], EnvHelper::parseArray('PARSETEST'), 'Could not parse simple array'); @@ -49,7 +49,7 @@ class EnvTest extends TestCase putenv('PARSETEST'); } - public function testSetEnv() + public function testSetEnv(): void { $this->assertEquals("ONE=one\nTWO=2\$\nTHREE=\"space space\"\n", EnvHelper::setEnv("ONE=one\nTWO=\n", [ 'ONE' => 'zero', diff --git a/tests/YamlSchemaTest.php b/tests/YamlSchemaTest.php index 6ff74a6a6c..efa61572f3 100644 --- a/tests/YamlSchemaTest.php +++ b/tests/YamlSchemaTest.php @@ -41,7 +41,7 @@ class YamlSchemaTest extends TestCase '/includes/definitions/ping.yaml', ]; - public function testConfigSchema() + public function testConfigSchema(): void { $this->validateFileAgainstSchema('/misc/config_definitions.json', '/misc/config_schema.json'); } @@ -49,7 +49,7 @@ class YamlSchemaTest extends TestCase /** * @group os */ - public function testOSDefinitionSchema() + public function testOSDefinitionSchema(): void { $this->validateYamlFilesAgainstSchema('/includes/definitions', '/misc/os_schema.json'); } @@ -57,7 +57,7 @@ class YamlSchemaTest extends TestCase /** * @group os */ - public function testOSMatchFilename() + public function testOSMatchFilename(): void { foreach ($this->listFiles('/includes/definitions/*.yaml') as $filename => $file) { $this->assertEquals( @@ -71,7 +71,7 @@ class YamlSchemaTest extends TestCase /** * @group os */ - public function testDiscoveryDefinitionSchema() + public function testDiscoveryDefinitionSchema(): void { $this->validateYamlFilesAgainstSchema('/includes/definitions/discovery', '/misc/discovery_schema.json'); } diff --git a/tests/phpstan/ignore-by-php-version.neon.php b/tests/phpstan/ignore-by-php-version.neon.php index 040dd8538c..830c5bf26b 100644 --- a/tests/phpstan/ignore-by-php-version.neon.php +++ b/tests/phpstan/ignore-by-php-version.neon.php @@ -17,7 +17,7 @@ if (PHP_VERSION_ID < 80100) { } // If we loaded any extra config -if (sizeof($config) > 0) { +if (count($config) > 0) { $config['parameters']['reportUnmatchedIgnoredErrors'] = false; }