Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/Auth/LDAP/LDAPProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct(Hasher $hasher, $model)
* Retrieve a user by their unique identifier.
*
* @param mixed $identifier
* @return \Illuminate\Contracts\Auth\Authenticatable|null
* @return Authenticatable|null
*/
public function retrieveById($identifier)
{
Expand All @@ -50,7 +50,7 @@ public function retrieveById($identifier)
*
* @param mixed $identifier
* @param string $token
* @return \Illuminate\Contracts\Auth\Authenticatable|null
* @return Authenticatable|null
*/
public function retrieveByToken($identifier, $token)
{
Expand All @@ -76,7 +76,7 @@ public function rehashPasswordIfRequired(Authenticatable $user, array $credentia
/**
* Retrieve a user by the given credentials.
*
* @return \Illuminate\Contracts\Auth\Authenticatable|null
* @return Authenticatable|null
*/
public function retrieveByCredentials(array $credentials)
{
Expand Down
3 changes: 2 additions & 1 deletion app/Auth/LDAP/LDAPServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Auth\LDAP;

use Illuminate\Log\LogManager;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\ServiceProvider;
Expand Down Expand Up @@ -29,7 +30,7 @@ protected function registerLogging()
return;
}

/** @var \Illuminate\Log\LogManager|null $logger */
/** @var LogManager|null $logger */
if (is_null($logger = Log::getFacadeRoot())) {
return;
}
Expand Down
3 changes: 2 additions & 1 deletion app/Auth/Local/LocalProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
namespace App\Auth\Local;

use Illuminate\Auth\EloquentUserProvider;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Contracts\Auth\UserProvider;

class LocalProvider extends EloquentUserProvider implements UserProvider
{
/**
* Retrieve a user by the given credentials.
*
* @return \Illuminate\Contracts\Auth\Authenticatable|null
* @return Authenticatable|null
*/
public function retrieveByCredentials(array $credentials)
{
Expand Down
2 changes: 1 addition & 1 deletion app/Auth/Shibboleth/ShibbolethSessionMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function __construct(protected ShibbolethProvider $provider) {}
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
* @param Closure(Request): (Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
Expand Down
3 changes: 2 additions & 1 deletion app/Console/Commands/ImportGreenlight2Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException;

use function Laravel\Prompts\confirm;
use function Laravel\Prompts\progress;
Expand Down Expand Up @@ -454,7 +455,7 @@ protected function importPresentations(array $roomMap, string $presentationPath)
$this->importedPresentationFiles[] = $file->path;

$created++;
} catch (\Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException $e) {
} catch (FileNotFoundException $e) {
$failed++;

continue;
Expand Down
3 changes: 2 additions & 1 deletion app/Console/Commands/ImportGreenlight3Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException;

use function Laravel\Prompts\confirm;
use function Laravel\Prompts\progress;
Expand Down Expand Up @@ -372,7 +373,7 @@ protected function importPresentations(array $roomMap, string $presentationPath)
$this->importedPresentationFiles[] = $file->path;

$created++;
} catch (\Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException $e) {
} catch (FileNotFoundException $e) {
$failed++;

continue;
Expand Down
5 changes: 3 additions & 2 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Illuminate\Foundation\ViteException;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Psr\Log\LogLevel;
use Spatie\LaravelIgnition\Exceptions\ViewException;
use Throwable;

Expand All @@ -14,7 +15,7 @@ class Handler extends ExceptionHandler
/**
* A list of exception types with their corresponding custom log levels.
*
* @var array<class-string<\Throwable>, \Psr\Log\LogLevel::*>
* @var array<class-string<Throwable>, LogLevel::*>
*/
protected $levels = [
//
Expand All @@ -23,7 +24,7 @@ class Handler extends ExceptionHandler
/**
* A list of the exception types that are not reported.
*
* @var array<int, class-string<\Throwable>>
* @var array<int, class-string<Throwable>>
*/
protected $dontReport = [
RecordingExtractionFailed::class,
Expand Down
5 changes: 3 additions & 2 deletions app/Http/Controllers/RecordingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace App\Http\Controllers;

use App\Models\Recording;
use Illuminate\Http\Response;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
Expand All @@ -11,12 +12,12 @@

class RecordingController extends Controller
{
public function presentationResource(Recording $recording, string $resource): \Illuminate\Http\Response
public function presentationResource(Recording $recording, string $resource): Response
{
return $this->resource('presentation', $recording, $resource);
}

public function resource(string $formatName, Recording $recording, string $resource = 'index.html'): \Illuminate\Http\Response
public function resource(string $formatName, Recording $recording, string $resource = 'index.html'): Response
{
// Get format with the given name of the recording
$format = $recording->formats()->where('format', $formatName)->firstOrFail();
Expand Down
9 changes: 4 additions & 5 deletions app/Http/Controllers/api/v1/ApplicationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@
namespace App\Http\Controllers\api\v1;

use App\Http\Controllers\Controller;
use App\Http\Resources\Config;
use App\Http\Resources\Settings;
use App\Http\Resources\User as UserResource;
use App\Http\Resources\ConfigResource;
use App\Http\Resources\UserResource;
use Illuminate\Support\Facades\Auth;

class ApplicationController extends Controller
{
/**
* Load basic application data, like settings
*
* @return Config
* @return ConfigResource
*/
public function config()
{
return new Config;
return new ConfigResource;
}

/**
Expand Down
22 changes: 12 additions & 10 deletions app/Http/Controllers/api/v1/MeetingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@

use App\Enums\CustomStatusCodes;
use App\Http\Controllers\Controller;
use App\Http\Resources\Attendee;
use App\Http\Resources\MeetingStat;
use App\Http\Resources\MeetingWithRoomAndServer as MeetingResource;
use App\Http\Resources\AttendeeResource;
use App\Http\Resources\MeetingStatResource;
use App\Http\Resources\MeetingWithRoomAndServerResource as MeetingResource;
use App\Models\Meeting;
use App\Services\MeetingService;
use App\Settings\GeneralSettings;
use App\Settings\RecordingSettings;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
use Illuminate\Support\Facades\Log;

/**
Expand All @@ -27,7 +29,7 @@ public function __construct()
/**
* Display a listing of all currently running meetings
*
* @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection
* @return AnonymousResourceCollection
*/
public function index(Request $request)
{
Expand Down Expand Up @@ -111,9 +113,9 @@ public function endMeetingCallback(Request $request, Meeting $meeting)
/**
* Usage statistics for this meeting (count of participants, voices, videos)
*
* @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection
* @return AnonymousResourceCollection
*
* @throws \Illuminate\Auth\Access\AuthorizationException
* @throws AuthorizationException
*/
public function stats(Meeting $meeting)
{
Expand All @@ -127,15 +129,15 @@ public function stats(Meeting $meeting)
abort(CustomStatusCodes::FEATURE_DISABLED->value, __('app.errors.meeting_statistics_disabled'));
}

return MeetingStat::collection($meeting->stats()->orderBy('created_at')->get());
return MeetingStatResource::collection($meeting->stats()->orderBy('created_at')->get());
}

/**
* Attendance of users and guests during a meeting
*
* @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection
* @return AnonymousResourceCollection
*
* @throws \Illuminate\Auth\Access\AuthorizationException
* @throws AuthorizationException
*/
public function attendance(Meeting $meeting)
{
Expand All @@ -157,6 +159,6 @@ public function attendance(Meeting $meeting)
abort(CustomStatusCodes::MEETING_ATTENDANCE_NOT_ENDED->value, __('app.errors.meeting_attendance_not_ended'));
}

return Attendee::collection($meetingService->attendance());
return AttendeeResource::collection($meetingService->attendance());
}
}
4 changes: 2 additions & 2 deletions app/Http/Controllers/api/v1/RoleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use App\Enums\CustomStatusCodes;
use App\Http\Controllers\Controller;
use App\Http\Requests\RoleRequest;
use App\Http\Resources\Role as RoleResource;
use App\Http\Resources\RoleResource;
use App\Models\Role;
use App\Settings\GeneralSettings;
use Exception;
Expand All @@ -20,7 +20,7 @@ class RoleController extends Controller
public function __construct()
{
$this->authorizeResource(Role::class, 'role');
$this->middleware('check.stale:role,\App\Http\Resources\Role,withPermissions', ['only' => 'update']);
$this->middleware('check.stale:role,\App\Http\Resources\RoleResource,withPermissions', ['only' => 'update']);
}

/**
Expand Down
Loading
Loading