Add PHP type hints for Laravel 10

This commit is contained in:
Shift
2023-02-19 16:19:46 +00:00
committed by HolgerHatGarKeineNode
parent ad55c69b51
commit 98a430c91c
192 changed files with 563 additions and 550 deletions

View File

@@ -16,7 +16,7 @@ class PodcastPolicy extends BasePolicy
* @param \App\Models\User $user
* @return \Illuminate\Auth\Access\Response|bool
*/
public function viewAny(User $user)
public function viewAny(User $user): bool
{
return true;
}
@@ -28,7 +28,7 @@ class PodcastPolicy extends BasePolicy
* @param \App\Models\Podcast $podcast
* @return \Illuminate\Auth\Access\Response|bool
*/
public function view(User $user, Podcast $podcast)
public function view(User $user, Podcast $podcast): bool
{
return true;
}
@@ -39,7 +39,7 @@ class PodcastPolicy extends BasePolicy
* @param \App\Models\User $user
* @return \Illuminate\Auth\Access\Response|bool
*/
public function create(User $user)
public function create(User $user): bool
{
return false;
}
@@ -51,7 +51,7 @@ class PodcastPolicy extends BasePolicy
* @param \App\Models\Podcast $podcast
* @return \Illuminate\Auth\Access\Response|bool
*/
public function update(User $user, Podcast $podcast)
public function update(User $user, Podcast $podcast): bool
{
return ! $podcast->locked;
}
@@ -63,7 +63,7 @@ class PodcastPolicy extends BasePolicy
* @param \App\Models\Podcast $podcast
* @return \Illuminate\Auth\Access\Response|bool
*/
public function delete(User $user, Podcast $podcast)
public function delete(User $user, Podcast $podcast): bool
{
return ! $podcast->locked;
}
@@ -75,7 +75,7 @@ class PodcastPolicy extends BasePolicy
* @param \App\Models\Podcast $podcast
* @return \Illuminate\Auth\Access\Response|bool
*/
public function restore(User $user, Podcast $podcast)
public function restore(User $user, Podcast $podcast): bool
{
return ! $podcast->locked;
}
@@ -87,7 +87,7 @@ class PodcastPolicy extends BasePolicy
* @param \App\Models\Podcast $podcast
* @return \Illuminate\Auth\Access\Response|bool
*/
public function forceDelete(User $user, Podcast $podcast)
public function forceDelete(User $user, Podcast $podcast): bool
{
return ! $podcast->locked;
}