mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Laravel 10.x Shift (#14995)
* Apply code style * Remove explicit call to register policies * Shift core files * Shift config files * Default config files In an effort to make upgrading the constantly changing config files easier, Shift defaulted them and merged your true customizations - where ENV variables may not be used. * Bump Laravel dependencies * Add type hints for Laravel 10 * Shift cleanup * wip * wip * sync translation * Sync back config * Public Path Binding * QueryException * monolog * db::raw * monolog * db::raw * fix larastan collections * fix phpstan bug looping forever * larastan errors * larastan: fix column type * styleci * initialize array * fixes * fixes --------- Co-authored-by: Shift <shift@laravelshift.com>
This commit is contained in:
@@ -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
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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));
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user