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

@@ -26,7 +26,7 @@ class CleanupLoginKeys extends Command
*
* @return int
*/
public function handle()
public function handle(): int
{
DB::table('login_keys')
->where('created_at', '<', now()->subDays(1))

View File

@@ -25,7 +25,7 @@ class CreatePermissions extends Command
*
* @return int
*/
public function handle()
public function handle(): int
{
$actions = [
'*',

View File

@@ -26,7 +26,7 @@ class CreateTags extends Command
*
* @return int
*/
public function handle()
public function handle(): int
{
$tags = config('tags.tags.course');
foreach ($tags as $tag) {

View File

@@ -26,7 +26,7 @@ class FillUserEmails extends Command
*
* @return int
*/
public function handle()
public function handle(): int
{
$users = User::all();

View File

@@ -28,7 +28,7 @@ class ImportGithubMeetups extends Command
*
* @return int
*/
public function handle()
public function handle(): int
{
$meetups = json_decode(file_get_contents(config_path('meetups/github.json')), true, 512, JSON_THROW_ON_ERROR);

View File

@@ -26,7 +26,7 @@ class MigrateLibraryItemSlugs extends Command
*
* @return int
*/
public function handle()
public function handle(): int
{
foreach (LibraryItem::all() as $item) {
$item->slug = str($item->name)->slug('-', 'de');

View File

@@ -26,7 +26,7 @@ class MigrateMeetupSlugs extends Command
*
* @return int
*/
public function handle()
public function handle(): int
{
foreach (Meetup::all() as $item) {
$item->slug = str($item->name)->slug('-', 'de');

View File

@@ -27,7 +27,7 @@ class RenameFileToMd5 extends Command
*
* @return int
*/
public function handle()
public function handle(): int
{
$media = Media::query()
->where('file_name', 'ilike', '%ö%')

View File

@@ -27,7 +27,7 @@ class SetReputation extends Command
*
* @return int
*/
public function handle()
public function handle(): int
{
foreach (User::query()
->with(['orangePills'])

View File

@@ -27,7 +27,7 @@ class SyncGithubMeetups extends Command
*
* @return int
*/
public function handle()
public function handle(): int
{
$response = Http::get('https://raw.githubusercontent.com/Einundzwanzig-Podcast/einundzwanzig.space/master/content/meetups.json');

View File

@@ -28,7 +28,7 @@ class ReadAndSyncPodcastFeeds extends Command
*
* @return int
*/
public function handle()
public function handle(): int
{
$client = new \PodcastIndex\Client([
'app' => 'Einundzwanzig School',

View File

@@ -26,7 +26,7 @@ class CreateGeoJsonPolygon extends Command
*
* @return int
*/
public function handle()
public function handle(): int
{
$meetups = Meetup::query()
->with([

View File

@@ -27,7 +27,7 @@ class SyncOpenBooks extends Command
*
* @return int
*/
public function handle()
public function handle(): int
{
$response = Http::post('https://openbookcase.de/api/listarea/83.08995477111446/-200.56640625000003/-38.13455657705413/221.30859375000003');

View File

@@ -28,7 +28,7 @@ class ImportLibraryItems extends Command
*
* @return int
*/
public function handle()
public function handle(): int
{
$items = [
'https://aprycot.media/blog/weg-zum-bitcoin-standard/' => 'Auf dem Weg zu einem Bitcoin-Standard || Gigi',