Remove redundant typing from DocBlocks

This commit is contained in:
Shift
2024-02-16 21:13:14 +00:00
parent 3487f52a6b
commit f3a5be79dc
53 changed files with 0 additions and 363 deletions

View File

@@ -66,17 +66,11 @@ class Application extends Model
return $this->icon; return $this->icon;
} }
/**
* @return string
*/
public function iconView(): string public function iconView(): string
{ {
return asset('storage/'.$this->icon); return asset('storage/'.$this->icon);
} }
/**
* @return string
*/
public function defaultColour(): string public function defaultColour(): string
{ {
// check if light or dark // check if light or dark
@@ -87,9 +81,6 @@ class Application extends Model
return '#161b1f'; return '#161b1f';
} }
/**
* @return string
*/
public function class(): string public function class(): string
{ {
$name = $this->name; $name = $this->name;
@@ -100,7 +91,6 @@ class Application extends Model
/** /**
* @param $name * @param $name
* @return string
*/ */
public static function classFromName($name): string public static function classFromName($name): string
{ {
@@ -111,9 +101,6 @@ class Application extends Model
return $class; return $class;
} }
/**
* @return Collection
*/
public static function apps(): Collection public static function apps(): Collection
{ {
$json = json_decode(file_get_contents(storage_path('app/supportedapps.json'))) ?? []; $json = json_decode(file_get_contents(storage_path('app/supportedapps.json'))) ?? [];
@@ -122,9 +109,6 @@ class Application extends Model
return $apps->sortBy('name', SORT_NATURAL | SORT_FLAG_CASE); return $apps->sortBy('name', SORT_NATURAL | SORT_FLAG_CASE);
} }
/**
* @return array
*/
public static function autocomplete(): array public static function autocomplete(): array
{ {
$apps = self::apps(); $apps = self::apps();
@@ -193,9 +177,6 @@ class Application extends Model
return $app; return $app;
} }
/**
* @return array
*/
public static function applist(): array public static function applist(): array
{ {
$list = []; $list = [];

View File

@@ -35,8 +35,6 @@ class RegisterApp extends Command
/** /**
* Execute the console command. * Execute the console command.
*
* @return void
*/ */
public function handle(): void public function handle(): void
{ {
@@ -56,8 +54,6 @@ class RegisterApp extends Command
/** /**
* @param $folder * @param $folder
* @param bool $remove
* @return void
*/ */
public function addApp($folder, bool $remove = false): void public function addApp($folder, bool $remove = false): void
{ {
@@ -96,7 +92,6 @@ class RegisterApp extends Command
/** /**
* @param $appFolder * @param $appFolder
* @param $icon * @param $icon
* @return void
*/ */
private function saveIcon($appFolder, $icon): void private function saveIcon($appFolder, $icon): void
{ {

View File

@@ -9,9 +9,6 @@ class Kernel extends ConsoleKernel
{ {
/** /**
* Define the application's command schedule. * Define the application's command schedule.
*
* @param Schedule $schedule
* @return void
*/ */
protected function schedule(Schedule $schedule): void protected function schedule(Schedule $schedule): void
{ {
@@ -21,8 +18,6 @@ class Kernel extends ConsoleKernel
/** /**
* Register the commands for the application. * Register the commands for the application.
*
* @return void
*/ */
protected function commands(): void protected function commands(): void
{ {

View File

@@ -49,9 +49,6 @@ class LoginController extends Controller
$this->middleware('guest')->except(['logout','autologin']); $this->middleware('guest')->except(['logout','autologin']);
} }
/**
* @return string
*/
public function username(): string public function username(): string
{ {
return 'username'; return 'username';
@@ -60,8 +57,6 @@ class LoginController extends Controller
/** /**
* Handle a login request to the application. * Handle a login request to the application.
* *
* @param Request $request
* @return Response
* *
* @throws ValidationException * @throws ValidationException
*/ */
@@ -97,10 +92,6 @@ class LoginController extends Controller
{ {
} }
/**
* @param User $user
* @return RedirectResponse
*/
public function setUser(User $user): RedirectResponse public function setUser(User $user): RedirectResponse
{ {
Auth::logout(); Auth::logout();
@@ -111,7 +102,6 @@ class LoginController extends Controller
/** /**
* @param $uuid * @param $uuid
* @return RedirectResponse
*/ */
public function autologin($uuid): RedirectResponse public function autologin($uuid): RedirectResponse
{ {
@@ -141,9 +131,7 @@ class LoginController extends Controller
} }
/** /**
* @param Request $request
* @param $user * @param $user
* @return RedirectResponse
*/ */
protected function authenticated(Request $request, $user): RedirectResponse protected function authenticated(Request $request, $user): RedirectResponse
{ {

View File

@@ -41,9 +41,6 @@ class RegisterController extends Controller
/** /**
* Get a validator for an incoming registration request. * Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/ */
protected function validator(array $data): \Illuminate\Contracts\Validation\Validator protected function validator(array $data): \Illuminate\Contracts\Validation\Validator
{ {
@@ -56,9 +53,6 @@ class RegisterController extends Controller
/** /**
* Create a new user instance after a valid registration. * Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/ */
protected function create(array $data): User protected function create(array $data): User
{ {

View File

@@ -12,17 +12,11 @@ use Illuminate\Support\Facades\RateLimiter;
class HealthController extends Controller class HealthController extends Controller
{ {
/**
* @return int
*/
private static function getUsers(): int private static function getUsers(): int
{ {
return User::count(); return User::count();
} }
/**
* @return int
*/
private static function getItems(): int private static function getItems(): int
{ {
return Item::select('id') return Item::select('id')
@@ -34,7 +28,6 @@ class HealthController extends Controller
/** /**
* Handle the incoming request. * Handle the incoming request.
* *
* @param Request $request
* @return JsonResponse|Response * @return JsonResponse|Response
* @throws BindingResolutionException * @throws BindingResolutionException
*/ */

View File

@@ -19,8 +19,6 @@ class HomeController extends Controller
/** /**
* Show the application dashboard. * Show the application dashboard.
*
* @return RedirectResponse
*/ */
public function index(): RedirectResponse public function index(): RedirectResponse
{ {

View File

@@ -20,9 +20,6 @@ class ImportController extends Controller
/** /**
* Handle the incoming request. * Handle the incoming request.
*
* @param Request $request
* @return View
*/ */
public function __invoke(Request $request): View public function __invoke(Request $request): View
{ {

View File

@@ -32,8 +32,6 @@ class ItemController extends Controller
/** /**
* Display a listing of the resource on the dashboard. * Display a listing of the resource on the dashboard.
*
* @return View
*/ */
public function dash(): View public function dash(): View
{ {
@@ -69,7 +67,6 @@ class ItemController extends Controller
* Pin item on the dashboard. * Pin item on the dashboard.
* *
* @param $id * @param $id
* @return RedirectResponse
*/ */
public function pin($id): RedirectResponse public function pin($id): RedirectResponse
{ {
@@ -85,7 +82,6 @@ class ItemController extends Controller
* Unpin item on the dashboard. * Unpin item on the dashboard.
* *
* @param $id * @param $id
* @return RedirectResponse
*/ */
public function unpin($id): RedirectResponse public function unpin($id): RedirectResponse
{ {
@@ -135,9 +131,6 @@ class ItemController extends Controller
/** /**
* Display a listing of the resource. * Display a listing of the resource.
*
* @param Request $request
* @return View
*/ */
public function index(Request $request): View public function index(Request $request): View
{ {
@@ -154,8 +147,6 @@ class ItemController extends Controller
/** /**
* Show the form for creating a new resource. * Show the form for creating a new resource.
*
* @return View
*/ */
public function create(): View public function create(): View
{ {
@@ -169,9 +160,6 @@ class ItemController extends Controller
/** /**
* Show the form for editing the specified resource. * Show the form for editing the specified resource.
*
* @param int $id
* @return View
*/ */
public function edit(int $id): View public function edit(int $id): View
{ {
@@ -194,9 +182,7 @@ class ItemController extends Controller
} }
/** /**
* @param Request $request
* @param null $id * @param null $id
* @return Item
* @throws ValidationException * @throws ValidationException
*/ */
public static function storelogic(Request $request, $id = null): Item public static function storelogic(Request $request, $id = null): Item
@@ -287,9 +273,6 @@ class ItemController extends Controller
/** /**
* Store a newly created resource in storage. * Store a newly created resource in storage.
*
* @param Request $request
* @return RedirectResponse
*/ */
public function store(Request $request): RedirectResponse public function store(Request $request): RedirectResponse
{ {
@@ -303,9 +286,6 @@ class ItemController extends Controller
/** /**
* Display the specified resource. * Display the specified resource.
*
* @param int $id
* @return void
*/ */
public function show(int $id): void public function show(int $id): void
{ {
@@ -314,10 +294,6 @@ class ItemController extends Controller
/** /**
* Update the specified resource in storage. * Update the specified resource in storage.
*
* @param Request $request
* @param int $id
* @return RedirectResponse
*/ */
public function update(Request $request, int $id): RedirectResponse public function update(Request $request, int $id): RedirectResponse
{ {
@@ -330,10 +306,6 @@ class ItemController extends Controller
/** /**
* Remove the specified resource from storage. * Remove the specified resource from storage.
*
* @param Request $request
* @param int $id
* @return RedirectResponse
*/ */
public function destroy(Request $request, int $id): RedirectResponse public function destroy(Request $request, int $id): RedirectResponse
{ {
@@ -355,9 +327,6 @@ class ItemController extends Controller
/** /**
* Restore the specified resource from soft deletion. * Restore the specified resource from soft deletion.
*
* @param int $id
* @return RedirectResponse
*/ */
public function restore(int $id): RedirectResponse public function restore(int $id): RedirectResponse
{ {
@@ -375,8 +344,6 @@ class ItemController extends Controller
/** /**
* Return details for supported apps * Return details for supported apps
* *
* @param Request $request
* @return string|null
* @throws GuzzleException * @throws GuzzleException
*/ */
public function appload(Request $request): ?string public function appload(Request $request): ?string
@@ -419,7 +386,6 @@ class ItemController extends Controller
} }
/** /**
* @param Request $request
* @return void * @return void
*/ */
public function testConfig(Request $request) public function testConfig(Request $request)
@@ -448,9 +414,7 @@ class ItemController extends Controller
/** /**
* @param $url * @param $url
* @param array $attrs
* @param array|bool $overridevars * @param array|bool $overridevars
* @return ResponseInterface|null
* @throws GuzzleException * @throws GuzzleException
*/ */
public function execute($url, array $attrs = [], $overridevars = false): ?ResponseInterface public function execute($url, array $attrs = [], $overridevars = false): ?ResponseInterface
@@ -481,7 +445,6 @@ class ItemController extends Controller
/** /**
* @param $url * @param $url
* @return StreamInterface
* @throws GuzzleException * @throws GuzzleException
*/ */
public function websitelookup($url): StreamInterface public function websitelookup($url): StreamInterface

View File

@@ -17,8 +17,6 @@ class ItemRestController extends Controller
/** /**
* Display a listing of the resource. * Display a listing of the resource.
*
* @return Collection
*/ */
public function index(): Collection public function index(): Collection
{ {
@@ -49,9 +47,6 @@ class ItemRestController extends Controller
/** /**
* Store a newly created resource in storage. * Store a newly created resource in storage.
*
* @param Request $request
* @return object
*/ */
public function store(Request $request): object public function store(Request $request): object
{ {
@@ -66,9 +61,6 @@ class ItemRestController extends Controller
/** /**
* Display the specified resource. * Display the specified resource.
*
* @param Item $item
* @return Response
*/ */
public function show(Item $item): Response public function show(Item $item): Response
{ {
@@ -77,9 +69,6 @@ class ItemRestController extends Controller
/** /**
* Show the form for editing the specified resource. * Show the form for editing the specified resource.
*
* @param Item $item
* @return Response
*/ */
public function edit(Item $item): Response public function edit(Item $item): Response
{ {
@@ -88,10 +77,6 @@ class ItemRestController extends Controller
/** /**
* Update the specified resource in storage. * Update the specified resource in storage.
*
* @param Request $request
* @param Item $item
* @return Response
*/ */
public function update(Request $request, Item $item): Response public function update(Request $request, Item $item): Response
{ {
@@ -100,9 +85,6 @@ class ItemRestController extends Controller
/** /**
* Remove the specified resource from storage. * Remove the specified resource from storage.
*
* @param Item $item
* @return Response
*/ */
public function destroy(Item $item): Response public function destroy(Item $item): Response
{ {

View File

@@ -11,7 +11,6 @@ use Illuminate\Routing\Redirector;
class SearchController extends Controller class SearchController extends Controller
{ {
/** /**
* @param Request $request
* @return Application|RedirectResponse|Redirector|mixed|void * @return Application|RedirectResponse|Redirector|mixed|void
*/ */
public function index(Request $request) public function index(Request $request)

View File

@@ -17,9 +17,6 @@ class SettingsController extends Controller
$this->middleware('allowed'); $this->middleware('allowed');
} }
/**
* @return View
*/
public function index(): View public function index(): View
{ {
$settings = SettingGroup::with([ $settings = SettingGroup::with([
@@ -32,7 +29,6 @@ class SettingsController extends Controller
} }
/** /**
* @param int $id
* *
* @return RedirectResponse|View * @return RedirectResponse|View
*/ */
@@ -59,12 +55,6 @@ class SettingsController extends Controller
} }
} }
/**
* @param Request $request
* @param int $id
*
* @return RedirectResponse
*/
public function update(Request $request, int $id): RedirectResponse public function update(Request $request, int $id): RedirectResponse
{ {
$setting = Setting::find($id); $setting = Setting::find($id);
@@ -114,11 +104,6 @@ class SettingsController extends Controller
} }
} }
/**
* @param int $id
*
* @return RedirectResponse
*/
public function clear(int $id): RedirectResponse public function clear(int $id): RedirectResponse
{ {
$user = $this->user(); $user = $this->user();

View File

@@ -49,9 +49,6 @@ class TagController extends Controller
/** /**
* Store a newly created resource in storage. * Store a newly created resource in storage.
*
* @param Request $request
* @return RedirectResponse
*/ */
public function store(Request $request): RedirectResponse public function store(Request $request): RedirectResponse
{ {
@@ -90,7 +87,6 @@ class TagController extends Controller
* Display the specified resource. * Display the specified resource.
* *
* @param $slug * @param $slug
* @return View
*/ */
public function show($slug): View public function show($slug): View
{ {
@@ -105,9 +101,6 @@ class TagController extends Controller
/** /**
* Show the form for editing the specified resource. * Show the form for editing the specified resource.
*
* @param int $id
* @return View
*/ */
public function edit(int $id): View public function edit(int $id): View
{ {
@@ -121,10 +114,6 @@ class TagController extends Controller
/** /**
* Update the specified resource in storage. * Update the specified resource in storage.
*
* @param Request $request
* @param int $id
* @return RedirectResponse
*/ */
public function update(Request $request, int $id): RedirectResponse public function update(Request $request, int $id): RedirectResponse
{ {
@@ -156,10 +145,6 @@ class TagController extends Controller
/** /**
* Remove the specified resource from storage. * Remove the specified resource from storage.
*
* @param Request $request
* @param int $id
* @return RedirectResponse
*/ */
public function destroy(Request $request, int $id): RedirectResponse public function destroy(Request $request, int $id): RedirectResponse
{ {
@@ -181,9 +166,6 @@ class TagController extends Controller
/** /**
* Restore the specified resource from soft deletion. * Restore the specified resource from soft deletion.
*
* @param int $id
* @return RedirectResponse
*/ */
public function restore(int $id): RedirectResponse public function restore(int $id): RedirectResponse
{ {

View File

@@ -19,8 +19,6 @@ class UserController extends Controller
/** /**
* Display a listing of the resource. * Display a listing of the resource.
*
* @return View
*/ */
public function index(): View public function index(): View
{ {
@@ -31,8 +29,6 @@ class UserController extends Controller
/** /**
* Show the form for creating a new resource. * Show the form for creating a new resource.
*
* @return View
*/ */
public function create(): View public function create(): View
{ {
@@ -51,9 +47,6 @@ class UserController extends Controller
/** /**
* Store a newly created resource in storage. * Store a newly created resource in storage.
*
* @param Request $request
* @return RedirectResponse
*/ */
public function store(Request $request): RedirectResponse public function store(Request $request): RedirectResponse
{ {
@@ -93,9 +86,6 @@ class UserController extends Controller
/** /**
* Display the specified resource. * Display the specified resource.
*
* @param int $id
* @return void
*/ */
public function show(int $id): void public function show(int $id): void
{ {
@@ -104,9 +94,6 @@ class UserController extends Controller
/** /**
* Show the form for editing the specified resource. * Show the form for editing the specified resource.
*
* @param User $user
* @return View
*/ */
public function edit(User $user): View public function edit(User $user): View
{ {
@@ -117,10 +104,6 @@ class UserController extends Controller
/** /**
* Update the specified resource in storage. * Update the specified resource in storage.
*
* @param Request $request
* @param User $user
* @return RedirectResponse
*/ */
public function update(Request $request, User $user): RedirectResponse public function update(Request $request, User $user): RedirectResponse
{ {
@@ -166,7 +149,6 @@ class UserController extends Controller
/** /**
* Remove the specified resource from storage. * Remove the specified resource from storage.
* *
* @param User $user
* @return RedirectResponse | void * @return RedirectResponse | void
*/ */
public function destroy(User $user): RedirectResponse public function destroy(User $user): RedirectResponse

View File

@@ -16,9 +16,6 @@ class CheckAllowed
/** /**
* Handle an incoming request. * Handle an incoming request.
* *
* @param Request $request
* @param Closure $next
* @return mixed
* @throws AuthenticationException * @throws AuthenticationException
*/ */
public function handle(Request $request, Closure $next): Response public function handle(Request $request, Closure $next): Response

View File

@@ -11,11 +11,6 @@ class RedirectIfAuthenticated
{ {
/** /**
* Handle an incoming request. * Handle an incoming request.
*
* @param Request $request
* @param Closure $next
* @param string|null $guard
* @return mixed
*/ */
public function handle(Request $request, Closure $next, string $guard = null): Response public function handle(Request $request, Closure $next, string $guard = null): Response
{ {

View File

@@ -76,9 +76,6 @@ class Item extends Model
use HasFactory; use HasFactory;
/**
* @return void
*/
protected static function boot(): void protected static function boot(): void
{ {
parent::boot(); parent::boot();
@@ -113,9 +110,6 @@ class Item extends Model
/** /**
* Scope a query to only include pinned items. * Scope a query to only include pinned items.
*
* @param Builder $query
* @return Builder
*/ */
public function scopePinned(Builder $query): Builder public function scopePinned(Builder $query): Builder
{ {
@@ -153,9 +147,6 @@ class Item extends Model
return $tagdetails; return $tagdetails;
} }
/**
* @return string
*/
public function getTagClass(): string public function getTagClass(): string
{ {
$tags = $this->tags(); $tags = $this->tags();
@@ -170,17 +161,11 @@ class Item extends Model
return implode(' ', $slugs); return implode(' ', $slugs);
} }
/**
* @return BelongsToMany
*/
public function parents(): BelongsToMany public function parents(): BelongsToMany
{ {
return $this->belongsToMany(Item::class, 'item_tag', 'item_id', 'tag_id'); return $this->belongsToMany(Item::class, 'item_tag', 'item_id', 'tag_id');
} }
/**
* @return BelongsToMany
*/
public function children(): BelongsToMany public function children(): BelongsToMany
{ {
return $this->belongsToMany(Item::class, 'item_tag', 'tag_id', 'item_id'); return $this->belongsToMany(Item::class, 'item_tag', 'tag_id', 'item_id');
@@ -198,9 +183,6 @@ class Item extends Model
} }
} }
/**
* @return string
*/
public function getDroppableAttribute(): string public function getDroppableAttribute(): string
{ {
if ((int) $this->type === 1) { if ((int) $this->type === 1) {
@@ -210,9 +192,6 @@ class Item extends Model
} }
} }
/**
* @return string
*/
public function getLinkTargetAttribute(): string public function getLinkTargetAttribute(): string
{ {
$target = Setting::fetch('window_target'); $target = Setting::fetch('window_target');
@@ -224,9 +203,6 @@ class Item extends Model
} }
} }
/**
* @return string
*/
public function getLinkIconAttribute(): string public function getLinkIconAttribute(): string
{ {
if ((int) $this->type === 1) { if ((int) $this->type === 1) {
@@ -236,9 +212,6 @@ class Item extends Model
} }
} }
/**
* @return string
*/
public function getLinkTypeAttribute(): string public function getLinkTypeAttribute(): string
{ {
if ((int) $this->type === 1) { if ((int) $this->type === 1) {
@@ -279,9 +252,6 @@ class Item extends Model
return $query->where('type', $typeid); return $query->where('type', $typeid);
} }
/**
* @return bool
*/
public function enhanced(): bool public function enhanced(): bool
{ {
/*if(isset($this->class) && !empty($this->class)) { /*if(isset($this->class) && !empty($this->class)) {
@@ -295,7 +265,6 @@ class Item extends Model
/** /**
* @param $class * @param $class
* @return bool
*/ */
public static function isEnhanced($class): bool public static function isEnhanced($class): bool
{ {
@@ -321,9 +290,6 @@ class Item extends Model
return ((bool) ($app instanceof SearchInterface)) ? $app : false; return ((bool) ($app instanceof SearchInterface)) ? $app : false;
} }
/**
* @return bool
*/
public function enabled(): bool public function enabled(): bool
{ {
if ($this->enhanced()) { if ($this->enhanced()) {
@@ -369,7 +335,6 @@ class Item extends Model
/** /**
* @param $class * @param $class
* @return Application|null
*/ */
public static function applicationDetails($class): ?Application public static function applicationDetails($class): ?Application
{ {
@@ -386,7 +351,6 @@ class Item extends Model
/** /**
* @param $class * @param $class
* @return string
*/ */
public static function getApplicationDescription($class): string public static function getApplicationDescription($class): string
{ {
@@ -400,8 +364,6 @@ class Item extends Model
/** /**
* Get the user that owns the item. * Get the user that owns the item.
*
* @return BelongsTo
*/ */
public function user(): BelongsTo public function user(): BelongsTo
{ {

View File

@@ -32,7 +32,6 @@ class ProcessApps implements ShouldQueue, ShouldBeUnique
/** /**
* Execute the job. * Execute the job.
* *
* @return void
* @throws GuzzleException * @throws GuzzleException
*/ */
public function handle(): void public function handle(): void

View File

@@ -30,7 +30,6 @@ class UpdateApps implements ShouldQueue, ShouldBeUnique
/** /**
* Execute the job. * Execute the job.
* *
* @return void
* @throws GuzzleException * @throws GuzzleException
*/ */
public function handle(): void public function handle(): void
@@ -50,9 +49,6 @@ class UpdateApps implements ShouldQueue, ShouldBeUnique
Cache::lock('updateApps')->forceRelease(); Cache::lock('updateApps')->forceRelease();
} }
/**
* @return void
*/
public function failed($exception): void public function failed($exception): void
{ {
Cache::lock('updateApps')->forceRelease(); Cache::lock('updateApps')->forceRelease();

View File

@@ -19,8 +19,6 @@ class AppServiceProvider extends ServiceProvider
{ {
/** /**
* Bootstrap any application services. * Bootstrap any application services.
*
* @return void
*/ */
public function boot(): void public function boot(): void
{ {
@@ -105,8 +103,6 @@ class AppServiceProvider extends ServiceProvider
/** /**
* Generate app key if missing and .env exists * Generate app key if missing and .env exists
*
* @return void
*/ */
public function genKey(): void public function genKey(): void
{ {
@@ -119,8 +115,6 @@ class AppServiceProvider extends ServiceProvider
/** /**
* Register any application services. * Register any application services.
*
* @return void
*/ */
public function register(): void public function register(): void
{ {
@@ -136,7 +130,6 @@ class AppServiceProvider extends ServiceProvider
/** /**
* Check if database needs an update or do first time database setup * Check if database needs an update or do first time database setup
* *
* @return void
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */
@@ -158,9 +151,6 @@ class AppServiceProvider extends ServiceProvider
} }
} }
/**
* @return void
*/
public function createEnvFile(): void public function createEnvFile(): void
{ {
if (!is_file(base_path('.env'))) { if (!is_file(base_path('.env'))) {
@@ -170,9 +160,6 @@ class AppServiceProvider extends ServiceProvider
$this->genKey(); $this->genKey();
} }
/**
* @return bool
*/
private function needsDBUpdate(): bool private function needsDBUpdate(): bool
{ {
if (!Schema::hasTable('settings')) { if (!Schema::hasTable('settings')) {
@@ -185,9 +172,6 @@ class AppServiceProvider extends ServiceProvider
return version_compare($app_version, $db_version) === 1; return version_compare($app_version, $db_version) === 1;
} }
/**
* @return void
*/
private function updateApps(): void private function updateApps(): void
{ {
// This lock ensures that the job is not invoked multiple times. // This lock ensures that the job is not invoked multiple times.

View File

@@ -17,8 +17,6 @@ class AuthServiceProvider extends ServiceProvider
/** /**
* Register any authentication / authorization services. * Register any authentication / authorization services.
*
* @return void
*/ */
public function boot(): void public function boot(): void
{ {

View File

@@ -19,8 +19,6 @@ class EventServiceProvider extends ServiceProvider
/** /**
* Register any events for your application. * Register any events for your application.
*
* @return void
*/ */
public function boot(): void public function boot(): void
{ {
@@ -31,8 +29,6 @@ class EventServiceProvider extends ServiceProvider
/** /**
* Determine if events and listeners should be automatically discovered. * Determine if events and listeners should be automatically discovered.
*
* @return bool
*/ */
public function shouldDiscoverEvents(): bool public function shouldDiscoverEvents(): bool
{ {

View File

@@ -17,8 +17,6 @@ class RouteServiceProvider extends ServiceProvider
/** /**
* Define your route model bindings, pattern filters, etc. * Define your route model bindings, pattern filters, etc.
*
* @return void
*/ */
public function boot(): void public function boot(): void
{ {
@@ -29,8 +27,6 @@ class RouteServiceProvider extends ServiceProvider
/** /**
* Define the routes for the application. * Define the routes for the application.
*
* @return void
*/ */
public function map(): void public function map(): void
{ {
@@ -45,8 +41,6 @@ class RouteServiceProvider extends ServiceProvider
* Define the "web" routes for the application. * Define the "web" routes for the application.
* *
* These routes all receive session state, CSRF protection, etc. * These routes all receive session state, CSRF protection, etc.
*
* @return void
*/ */
protected function mapWebRoutes(): void protected function mapWebRoutes(): void
{ {
@@ -58,8 +52,6 @@ class RouteServiceProvider extends ServiceProvider
* Define the "api" routes for the application. * Define the "api" routes for the application.
* *
* These routes are typically stateless. * These routes are typically stateless.
*
* @return void
*/ */
protected function mapApiRoutes(): void protected function mapApiRoutes(): void
{ {

View File

@@ -70,10 +70,6 @@ class Setting extends Model
*/ */
protected static $cache = []; protected static $cache = [];
/**
* @param Request $request
* @return object
*/
public static function getInput(Request $request): object public static function getInput(Request $request): object
{ {
return (object) [ return (object) [
@@ -198,16 +194,12 @@ class Setting extends Model
return $value; return $value;
} }
/**
* @return BelongsTo
*/
public function group(): BelongsTo public function group(): BelongsTo
{ {
return $this->belongsTo(\App\SettingGroup::class, 'group_id'); return $this->belongsTo(\App\SettingGroup::class, 'group_id');
} }
/** /**
* @param string $key
* *
* @return mixed * @return mixed
*/ */
@@ -220,7 +212,6 @@ class Setting extends Model
// @codingStandardsIgnoreStart // @codingStandardsIgnoreStart
/** /**
* @param string $key
* *
* @return mixed * @return mixed
*/ */
@@ -267,7 +258,6 @@ class Setting extends Model
} }
/** /**
* @param string $key
* @param $value * @param $value
*/ */
public static function add(string $key, $value) public static function add(string $key, $value)
@@ -275,11 +265,6 @@ class Setting extends Model
self::$cache[$key] = $value; self::$cache[$key] = $value;
} }
/**
* @param string $key
*
* @return bool
*/
public static function cached(string $key): bool public static function cached(string $key): bool
{ {
return array_key_exists($key, self::$cache); return array_key_exists($key, self::$cache);

View File

@@ -37,9 +37,6 @@ class SettingGroup extends Model
*/ */
public $timestamps = false; public $timestamps = false;
/**
* @return HasMany
*/
public function settings(): HasMany public function settings(): HasMany
{ {
return $this->hasMany(\App\Setting::class, 'group_id'); return $this->hasMany(\App\Setting::class, 'group_id');

View File

@@ -9,8 +9,6 @@ class ItemFactory extends Factory
{ {
/** /**
* Define the model's default state. * Define the model's default state.
*
* @return array
*/ */
public function definition(): array public function definition(): array
{ {

View File

@@ -10,8 +10,6 @@ class ItemTagFactory extends Factory
{ {
/** /**
* Define the model's default state. * Define the model's default state.
*
* @return array
*/ */
public function definition(): array public function definition(): array
{ {

View File

@@ -29,8 +29,6 @@ class UserFactory extends Factory
/** /**
* Indicate that the model's email address should be unverified. * Indicate that the model's email address should be unverified.
*
* @return \Illuminate\Database\Eloquent\Factories\Factory
*/ */
public function unverified(): Factory public function unverified(): Factory
{ {

View File

@@ -8,8 +8,6 @@ return new class extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void
*/ */
public function up(): void public function up(): void
{ {
@@ -29,8 +27,6 @@ return new class extends Migration
/** /**
* Reverse the migrations. * Reverse the migrations.
*
* @return void
*/ */
public function down(): void public function down(): void
{ {

View File

@@ -8,8 +8,6 @@ return new class extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void
*/ */
public function up(): void public function up(): void
{ {
@@ -28,8 +26,6 @@ return new class extends Migration
/** /**
* Reverse the migrations. * Reverse the migrations.
*
* @return void
*/ */
public function down(): void public function down(): void
{ {

View File

@@ -8,8 +8,6 @@ return new class extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void
*/ */
public function up(): void public function up(): void
{ {
@@ -22,8 +20,6 @@ return new class extends Migration
/** /**
* Reverse the migrations. * Reverse the migrations.
*
* @return void
*/ */
public function down(): void public function down(): void
{ {

View File

@@ -8,8 +8,6 @@ return new class extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void
*/ */
public function up(): void public function up(): void
{ {
@@ -20,8 +18,6 @@ return new class extends Migration
/** /**
* Reverse the migrations. * Reverse the migrations.
*
* @return void
*/ */
public function down(): void public function down(): void
{ {

View File

@@ -8,8 +8,6 @@ return new class extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void
*/ */
public function up(): void public function up(): void
{ {
@@ -25,8 +23,6 @@ return new class extends Migration
/** /**
* Reverse the migrations. * Reverse the migrations.
*
* @return void
*/ */
public function down(): void public function down(): void
{ {

View File

@@ -8,8 +8,6 @@ return new class extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void
*/ */
public function up(): void public function up(): void
{ {
@@ -28,8 +26,6 @@ return new class extends Migration
/** /**
* Reverse the migrations. * Reverse the migrations.
*
* @return void
*/ */
public function down(): void public function down(): void
{ {

View File

@@ -8,8 +8,6 @@ return new class extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void
*/ */
public function up(): void public function up(): void
{ {
@@ -22,8 +20,6 @@ return new class extends Migration
/** /**
* Reverse the migrations. * Reverse the migrations.
*
* @return void
*/ */
public function down(): void public function down(): void
{ {

View File

@@ -8,8 +8,6 @@ return new class extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void
*/ */
public function up(): void public function up(): void
{ {
@@ -20,8 +18,6 @@ return new class extends Migration
/** /**
* Reverse the migrations. * Reverse the migrations.
*
* @return void
*/ */
public function down(): void public function down(): void
{ {

View File

@@ -8,8 +8,6 @@ return new class extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void
*/ */
public function up(): void public function up(): void
{ {
@@ -25,8 +23,6 @@ return new class extends Migration
/** /**
* Reverse the migrations. * Reverse the migrations.
*
* @return void
*/ */
public function down(): void public function down(): void
{ {

View File

@@ -8,8 +8,6 @@ return new class extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void
*/ */
public function up(): void public function up(): void
{ {
@@ -30,8 +28,6 @@ return new class extends Migration
/** /**
* Reverse the migrations. * Reverse the migrations.
*
* @return void
*/ */
public function down(): void public function down(): void
{ {

View File

@@ -8,8 +8,6 @@ return new class extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void
*/ */
public function up(): void public function up(): void
{ {
@@ -20,8 +18,6 @@ return new class extends Migration
/** /**
* Reverse the migrations. * Reverse the migrations.
*
* @return void
*/ */
public function down(): void public function down(): void
{ {

View File

@@ -8,8 +8,6 @@ return new class extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void
*/ */
public function up(): void public function up(): void
{ {
@@ -26,8 +24,6 @@ return new class extends Migration
/** /**
* Reverse the migrations. * Reverse the migrations.
*
* @return void
*/ */
public function down(): void public function down(): void
{ {

View File

@@ -8,8 +8,6 @@ return new class extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void
*/ */
public function up(): void public function up(): void
{ {
@@ -25,8 +23,6 @@ return new class extends Migration
/** /**
* Reverse the migrations. * Reverse the migrations.
*
* @return void
*/ */
public function down(): void public function down(): void
{ {

View File

@@ -8,8 +8,6 @@ return new class extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void
*/ */
public function up(): void public function up(): void
{ {
@@ -20,8 +18,6 @@ return new class extends Migration
/** /**
* Reverse the migrations. * Reverse the migrations.
*
* @return void
*/ */
public function down(): void public function down(): void
{ {

View File

@@ -8,8 +8,6 @@ return new class extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void
*/ */
public function up(): void public function up(): void
{ {
@@ -20,8 +18,6 @@ return new class extends Migration
/** /**
* Reverse the migrations. * Reverse the migrations.
*
* @return void
*/ */
public function down(): void public function down(): void
{ {

View File

@@ -8,8 +8,6 @@ return new class extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void
*/ */
public function up(): void public function up(): void
{ {
@@ -20,8 +18,6 @@ return new class extends Migration
/** /**
* Reverse the migrations. * Reverse the migrations.
*
* @return void
*/ */
public function down(): void public function down(): void
{ {

View File

@@ -8,8 +8,6 @@ return new class extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
*
* @return void
*/ */
public function up(): void public function up(): void
{ {
@@ -18,8 +16,6 @@ return new class extends Migration
/** /**
* Reverse the migrations. * Reverse the migrations.
*
* @return void
*/ */
public function down(): void public function down(): void
{ {

View File

@@ -8,8 +8,6 @@ class DatabaseSeeder extends Seeder
{ {
/** /**
* Run the database seeds. * Run the database seeds.
*
* @return void
*/ */
public function run(): void public function run(): void
{ {

View File

@@ -52,8 +52,6 @@ class SettingsSeeder extends Seeder
/** /**
* Run the database seeds. * Run the database seeds.
*
* @return void
*/ */
public function run(): void public function run(): void
{ {

View File

@@ -9,8 +9,6 @@ class UsersSeeder extends Seeder
{ {
/** /**
* Run the database seeds. * Run the database seeds.
*
* @return void
*/ */
public function run(): void public function run(): void
{ {

View File

@@ -9,8 +9,6 @@ trait CreatesApplication
{ {
/** /**
* Creates the application. * Creates the application.
*
* @return \Illuminate\Foundation\Application
*/ */
public function createApplication(): Application public function createApplication(): Application
{ {

View File

@@ -9,8 +9,6 @@ class SettingsSeederTest extends TestCase
{ {
/** /**
* All language keys are defined in all languages based on the en language file. * All language keys are defined in all languages based on the en language file.
*
* @return void
*/ */
public function test_returns_a_jsonmap_with_same_amount_of_items_as_language_directories_present(): void public function test_returns_a_jsonmap_with_same_amount_of_items_as_language_directories_present(): void
{ {

View File

@@ -6,9 +6,6 @@ use Tests\TestCase;
class IsImageTest extends TestCase class IsImageTest extends TestCase
{ {
/**
* @return void
*/
public function test_returns_true_when_file_is_image(): void public function test_returns_true_when_file_is_image(): void
{ {
$file = file_get_contents(__DIR__ . '/fixtures/heimdall-icon-small.png'); $file = file_get_contents(__DIR__ . '/fixtures/heimdall-icon-small.png');
@@ -18,9 +15,6 @@ class IsImageTest extends TestCase
$this->assertTrue($actual); $this->assertTrue($actual);
} }
/**
* @return void
*/
public function test_returns_false_when_file_extension_is_image_but_content_is_not(): void public function test_returns_false_when_file_extension_is_image_but_content_is_not(): void
{ {
$actual = isImage("<?php ?>", "png"); $actual = isImage("<?php ?>", "png");
@@ -28,9 +22,6 @@ class IsImageTest extends TestCase
$this->assertFalse($actual); $this->assertFalse($actual);
} }
/**
* @return void
*/
public function test_returns_false_when_file_extension_is_not_image_but_content_is(): void public function test_returns_false_when_file_extension_is_not_image_but_content_is(): void
{ {
$file = file_get_contents(__DIR__ . '/fixtures/heimdall-icon-small.png'); $file = file_get_contents(__DIR__ . '/fixtures/heimdall-icon-small.png');

View File

@@ -6,9 +6,6 @@ use Tests\TestCase;
class SlugTest extends TestCase class SlugTest extends TestCase
{ {
/**
* @return void
*/
public function test_slug_returns_valid_tag_for_cn_characters_when_language_is_set_to_en_US(): void public function test_slug_returns_valid_tag_for_cn_characters_when_language_is_set_to_en_US(): void
{ {
$tag = str_slug('中文測試', '-', 'en_US'); $tag = str_slug('中文測試', '-', 'en_US');

View File

@@ -8,8 +8,6 @@ class LangTest extends TestCase
{ {
/** /**
* All language keys are defined in all languages based on the en language file. * All language keys are defined in all languages based on the en language file.
*
* @return void
*/ */
public function test_all_language_keys_are_defined(): void public function test_all_language_keys_are_defined(): void
{ {