diff --git a/app/Auth/NostrUser.php b/app/Auth/NostrUser.php
index 79a61da..d629d7c 100644
--- a/app/Auth/NostrUser.php
+++ b/app/Auth/NostrUser.php
@@ -7,6 +7,7 @@ use Illuminate\Contracts\Auth\Authenticatable;
class NostrUser implements Authenticatable
{
protected string $pubkey;
+
protected ?object $pleb;
public function __construct(string $pubkey)
diff --git a/app/Console/Commands/Einundzwanzig/SyncPlebs.php b/app/Console/Commands/Einundzwanzig/SyncPlebs.php
index bbf7b03..cea5e9a 100644
--- a/app/Console/Commands/Einundzwanzig/SyncPlebs.php
+++ b/app/Console/Commands/Einundzwanzig/SyncPlebs.php
@@ -36,7 +36,7 @@ class SyncPlebs extends Command
$npub = str($pleb)->trim();
EinundzwanzigPleb::updateOrCreate(
['npub' => $npub],
- ['pubkey' => (new Key())->convertToHex($npub)]
+ ['pubkey' => (new Key)->convertToHex($npub)]
);
}
}
diff --git a/app/Console/Commands/Nostr/FetchEvents.php b/app/Console/Commands/Nostr/FetchEvents.php
index 27c136f..a6f2c77 100644
--- a/app/Console/Commands/Nostr/FetchEvents.php
+++ b/app/Console/Commands/Nostr/FetchEvents.php
@@ -38,10 +38,10 @@ class FetchEvents extends Command
$plebs = \App\Models\EinundzwanzigPleb::query()
->get();
- $subscription = new Subscription();
+ $subscription = new Subscription;
$subscriptionId = $subscription->setId();
- $filter1 = new Filter();
+ $filter1 = new Filter;
$filter1->setKinds([1]); // You can add multiple kind numbers
$filter1->setAuthors($plebs->pluck('pubkey')->toArray()); // You can add multiple authors
$filter1->setLimit(25); // Limit to fetch only a maximum of 25 events
@@ -54,7 +54,7 @@ class FetchEvents extends Command
new Relay('wss://nostr.wine'),
new Relay('wss://nos.lol'),
];
- $relaySet = new RelaySet();
+ $relaySet = new RelaySet;
$relaySet->setRelays($relays);
$request = new Request($relaySet, $requestMessage);
@@ -64,7 +64,7 @@ class FetchEvents extends Command
foreach ($response as $relay => $events) {
foreach ($events as $event) {
- if (!isset($uniqueEvents[$event->event->id])) {
+ if (! isset($uniqueEvents[$event->event->id])) {
$uniqueEvents[$event->event->id] = $event;
}
}
@@ -97,6 +97,7 @@ class FetchEvents extends Command
}
}
}
+
return null;
}
@@ -104,11 +105,12 @@ class FetchEvents extends Command
{
foreach ($event->tags as $tag) {
if ($tag[0] === 'e') {
- if ((isset($tag[3]) && $tag[3] === 'reply') || (!isset($tag[3]) && isset($tag[2]) && $tag[2] === '')) {
+ if ((isset($tag[3]) && $tag[3] === 'reply') || (! isset($tag[3]) && isset($tag[2]) && $tag[2] === '')) {
return 'reply';
}
}
}
+
return 'root';
}
}
diff --git a/app/Console/Commands/Nostr/FetchProfile.php b/app/Console/Commands/Nostr/FetchProfile.php
index 163112e..b9b3409 100644
--- a/app/Console/Commands/Nostr/FetchProfile.php
+++ b/app/Console/Commands/Nostr/FetchProfile.php
@@ -31,6 +31,7 @@ class FetchProfile extends Command
$pubkey = $this->option('pubkey');
if (empty($pubkey)) {
$this->error('Please provide a pubkey');
+
return;
}
diff --git a/app/Console/Commands/Nostr/SyncProfiles.php b/app/Console/Commands/Nostr/SyncProfiles.php
index d44bfbc..81ec3a3 100644
--- a/app/Console/Commands/Nostr/SyncProfiles.php
+++ b/app/Console/Commands/Nostr/SyncProfiles.php
@@ -31,7 +31,7 @@ class SyncProfiles extends Command
{
$query = EinundzwanzigPleb::query();
- if (!$this->option('all')) {
+ if (! $this->option('all')) {
$query->whereDoesntHave('profile');
}
@@ -48,7 +48,7 @@ class SyncProfiles extends Command
$bar->finish();
$this->info("\n✅ Successfully synced $count profiles!");
} else {
- $this->info("⚡ No profiles to sync!");
+ $this->info('⚡ No profiles to sync!');
}
}
}
diff --git a/app/Enums/AssociationStatus.php b/app/Enums/AssociationStatus.php
index 70188de..a774642 100644
--- a/app/Enums/AssociationStatus.php
+++ b/app/Enums/AssociationStatus.php
@@ -13,12 +13,12 @@ use ArchTech\Enums\Values;
#[Meta(Label::class, Color::class)]
enum AssociationStatus: int
{
- use InvokableCases;
- use Names;
- use Values;
- use Options;
- use Metadata;
use From;
+ use InvokableCases;
+ use Metadata;
+ use Names;
+ use Options;
+ use Values;
#[Label('kein Mitglied')] #[Color('cyan')]
case DEFAULT = 1;
@@ -33,7 +33,7 @@ enum AssociationStatus: int
{
return collect(self::options())
->map(
- fn(
+ fn (
$option,
$name
) => [
diff --git a/app/Enums/Color.php b/app/Enums/Color.php
index 54754ce..8287abd 100644
--- a/app/Enums/Color.php
+++ b/app/Enums/Color.php
@@ -6,6 +6,4 @@ use ArchTech\Enums\Meta\MetaProperty;
use Attribute;
#[Attribute]
-class Color extends MetaProperty
-{
-}
+class Color extends MetaProperty {}
diff --git a/app/Enums/Icon.php b/app/Enums/Icon.php
index 9faa0d0..8334c7e 100644
--- a/app/Enums/Icon.php
+++ b/app/Enums/Icon.php
@@ -6,6 +6,4 @@ use ArchTech\Enums\Meta\MetaProperty;
use Attribute;
#[Attribute]
-class Icon extends MetaProperty
-{
-}
+class Icon extends MetaProperty {}
diff --git a/app/Enums/Label.php b/app/Enums/Label.php
index bface1a..39ea377 100644
--- a/app/Enums/Label.php
+++ b/app/Enums/Label.php
@@ -6,6 +6,4 @@ use ArchTech\Enums\Meta\MetaProperty;
use Attribute;
#[Attribute]
-class Label extends MetaProperty
-{
-}
+class Label extends MetaProperty {}
diff --git a/app/Enums/NewsCategory.php b/app/Enums/NewsCategory.php
index 3872b61..960cedd 100644
--- a/app/Enums/NewsCategory.php
+++ b/app/Enums/NewsCategory.php
@@ -13,12 +13,12 @@ use ArchTech\Enums\Values;
#[Meta(Label::class, Color::class, Icon::class)]
enum NewsCategory: int
{
- use InvokableCases;
- use Names;
- use Values;
- use Options;
- use Metadata;
use From;
+ use InvokableCases;
+ use Metadata;
+ use Names;
+ use Options;
+ use Values;
#[Label('Organisation')] #[Color('cyan')] #[Icon('file-lines')]
case ORGANISATION = 1;
@@ -27,7 +27,7 @@ enum NewsCategory: int
{
return collect(self::options())
->map(
- fn(
+ fn (
$option,
$name
) => [
diff --git a/app/Http/Controllers/Api/Nostr/GetProfile.php b/app/Http/Controllers/Api/Nostr/GetProfile.php
index a8a8936..e8a7e5c 100644
--- a/app/Http/Controllers/Api/Nostr/GetProfile.php
+++ b/app/Http/Controllers/Api/Nostr/GetProfile.php
@@ -15,7 +15,7 @@ class GetProfile extends Controller
public function __invoke($key, Request $request)
{
- if (!Profile::query()->where('pubkey', $key)->exists()) {
+ if (! Profile::query()->where('pubkey', $key)->exists()) {
$this->fetchProfile([$key]);
}
@@ -28,7 +28,7 @@ class GetProfile extends Controller
->where('pubkey', $key)
->first();
- if (!$profile) {
+ if (! $profile) {
return response()->json(['message' => 'Profile not found'], 200);
}
diff --git a/app/Livewire/Forms/ApplicationForm.php b/app/Livewire/Forms/ApplicationForm.php
index 998665e..a2f65ed 100644
--- a/app/Livewire/Forms/ApplicationForm.php
+++ b/app/Livewire/Forms/ApplicationForm.php
@@ -9,6 +9,7 @@ class ApplicationForm extends Form
{
#[Validate('nullable|string')]
public $reason = '';
+
#[Validate('boolean')]
public $check = false;
}
diff --git a/app/Livewire/MeetupTable.php b/app/Livewire/MeetupTable.php
index 5fd7998..06aef2b 100644
--- a/app/Livewire/MeetupTable.php
+++ b/app/Livewire/MeetupTable.php
@@ -11,11 +11,9 @@ use PowerComponents\LivewirePowerGrid\Exportable;
use PowerComponents\LivewirePowerGrid\Facades\Filter;
use PowerComponents\LivewirePowerGrid\Facades\Rule;
use PowerComponents\LivewirePowerGrid\Footer;
-use PowerComponents\LivewirePowerGrid\Header;
-use PowerComponents\LivewirePowerGrid\Lazy;
use PowerComponents\LivewirePowerGrid\PowerGrid;
-use PowerComponents\LivewirePowerGrid\PowerGridFields;
use PowerComponents\LivewirePowerGrid\PowerGridComponent;
+use PowerComponents\LivewirePowerGrid\PowerGridFields;
final class MeetupTable extends PowerGridComponent
{
@@ -54,7 +52,7 @@ final class MeetupTable extends PowerGridComponent
->searchable()
->sortable(),
- Column::action('Action')
+ Column::action('Action'),
];
}
@@ -79,7 +77,7 @@ final class MeetupTable extends PowerGridComponent
->slot('Edit: '.$row->id)
->id()
->class('pg-btn-white dark:ring-pg-primary-600 dark:border-pg-primary-600 dark:hover:bg-pg-primary-700 dark:ring-offset-pg-primary-800 dark:text-pg-primary-300 dark:bg-pg-primary-700')
- ->dispatch('edit', ['rowId' => $row->id])
+ ->dispatch('edit', ['rowId' => $row->id]),
];
}
diff --git a/app/Livewire/Traits/WithNostrAuth.php b/app/Livewire/Traits/WithNostrAuth.php
index cbb35af..4238467 100644
--- a/app/Livewire/Traits/WithNostrAuth.php
+++ b/app/Livewire/Traits/WithNostrAuth.php
@@ -8,8 +8,11 @@ use Livewire\Attributes\On;
trait WithNostrAuth
{
public ?string $currentPubkey = null;
+
public ?object $currentPleb = null;
+
public bool $isAllowed = false;
+
public bool $canEdit = false;
#[On('nostrLoggedIn')]
diff --git a/app/Models/City.php b/app/Models/City.php
index dc9a4d6..5536723 100644
--- a/app/Models/City.php
+++ b/app/Models/City.php
@@ -12,8 +12,8 @@ use Spatie\Sluggable\SlugOptions;
class City extends Model
{
- use HasSlug;
use Geoly;
+ use HasSlug;
protected $connection = 'einundzwanzig';
@@ -51,9 +51,9 @@ class City extends Model
public function getSlugOptions(): SlugOptions
{
return SlugOptions::create()
- ->generateSlugsFrom(['country.code', 'name'])
- ->saveSlugsTo('slug')
- ->usingLanguage(Cookie::get('lang', config('app.locale')));
+ ->generateSlugsFrom(['country.code', 'name'])
+ ->saveSlugsTo('slug')
+ ->usingLanguage(Cookie::get('lang', config('app.locale')));
}
public function createdBy(): BelongsTo
diff --git a/app/Models/Course.php b/app/Models/Course.php
index 7020360..dad1f4d 100644
--- a/app/Models/Course.php
+++ b/app/Models/Course.php
@@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Spatie\Image\Enums\Fit;
-use Spatie\Image\Manipulations;
use Spatie\MediaLibrary\HasMedia;
use Spatie\MediaLibrary\InteractsWithMedia;
use Spatie\MediaLibrary\MediaCollections\Models\Media;
@@ -15,8 +14,8 @@ use Spatie\Tags\HasTags;
class Course extends Model implements HasMedia
{
- use InteractsWithMedia;
use HasTags;
+ use InteractsWithMedia;
protected $connection = 'einundzwanzig';
@@ -46,25 +45,25 @@ class Course extends Model implements HasMedia
});
}
- public function registerMediaConversions(Media $media = null): void
+ public function registerMediaConversions(?Media $media = null): void
{
$this
->addMediaConversion('preview')
->fit(Fit::Crop, 300, 300)
->nonQueued();
$this->addMediaConversion('thumb')
- ->fit(Fit::Crop, 130, 130)
- ->width(130)
- ->height(130);
+ ->fit(Fit::Crop, 130, 130)
+ ->width(130)
+ ->height(130);
}
public function registerMediaCollections(): void
{
$this->addMediaCollection('logo')
- ->singleFile()
- ->useFallbackUrl(asset('img/einundzwanzig.png'));
+ ->singleFile()
+ ->useFallbackUrl(asset('img/einundzwanzig.png'));
$this->addMediaCollection('images')
- ->useFallbackUrl(asset('img/einundzwanzig.png'));
+ ->useFallbackUrl(asset('img/einundzwanzig.png'));
}
public function createdBy(): BelongsTo
diff --git a/app/Models/CourseEvent.php b/app/Models/CourseEvent.php
index add5c0c..c9ed68d 100644
--- a/app/Models/CourseEvent.php
+++ b/app/Models/CourseEvent.php
@@ -4,7 +4,6 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
-use Illuminate\Database\Eloquent\Relations\HasMany;
class CourseEvent extends Model
{
diff --git a/app/Models/EinundzwanzigPleb.php b/app/Models/EinundzwanzigPleb.php
index 62dbaed..f5a53a2 100644
--- a/app/Models/EinundzwanzigPleb.php
+++ b/app/Models/EinundzwanzigPleb.php
@@ -38,5 +38,4 @@ class EinundzwanzigPleb extends Model implements CipherSweetEncrypted
{
return $this->hasMany(PaymentEvent::class);
}
-
}
diff --git a/app/Models/Event.php b/app/Models/Event.php
index 501a161..7b2b55c 100644
--- a/app/Models/Event.php
+++ b/app/Models/Event.php
@@ -6,12 +6,10 @@ use Illuminate\Database\Eloquent\Model;
class Event extends Model
{
-
protected $guarded = [];
public function renderedEvent()
{
return $this->hasOne(RenderedEvent::class, 'event_id', 'event_id');
}
-
}
diff --git a/app/Models/Lecturer.php b/app/Models/Lecturer.php
index e0844e0..1fe276e 100644
--- a/app/Models/Lecturer.php
+++ b/app/Models/Lecturer.php
@@ -23,47 +23,49 @@ class Lecturer extends Model implements HasMedia
/**
* The attributes that aren't mass assignable.
+ *
* @var array
*/
protected $guarded = [];
/**
* The attributes that should be cast to native types.
+ *
* @var array
*/
protected $casts = [
- 'id' => 'integer',
- 'active' => 'boolean',
+ 'id' => 'integer',
+ 'active' => 'boolean',
];
protected static function booted()
{
static::creating(function ($model) {
- if (!$model->created_by) {
+ if (! $model->created_by) {
$model->created_by = auth()->id();
}
});
}
- public function registerMediaConversions(Media $media = null): void
+ public function registerMediaConversions(?Media $media = null): void
{
$this
->addMediaConversion('preview')
->fit(Fit::Crop, 300, 300)
->nonQueued();
$this->addMediaConversion('thumb')
- ->fit(Fit::Crop, 130, 130)
- ->width(130)
- ->height(130);
+ ->fit(Fit::Crop, 130, 130)
+ ->width(130)
+ ->height(130);
}
public function registerMediaCollections(): void
{
$this->addMediaCollection('avatar')
- ->singleFile()
- ->useFallbackUrl(asset('img/einundzwanzig.png'));
+ ->singleFile()
+ ->useFallbackUrl(asset('img/einundzwanzig.png'));
$this->addMediaCollection('images')
- ->useFallbackUrl(asset('img/einundzwanzig.png'));
+ ->useFallbackUrl(asset('img/einundzwanzig.png'));
}
/**
@@ -72,9 +74,9 @@ class Lecturer extends Model implements HasMedia
public function getSlugOptions(): SlugOptions
{
return SlugOptions::create()
- ->generateSlugsFrom(['name'])
- ->saveSlugsTo('slug')
- ->usingLanguage(Cookie::get('lang', config('app.locale')));
+ ->generateSlugsFrom(['name'])
+ ->saveSlugsTo('slug')
+ ->usingLanguage(Cookie::get('lang', config('app.locale')));
}
public function createdBy(): BelongsTo
diff --git a/app/Models/Meetup.php b/app/Models/Meetup.php
index 07c8f94..ed27de2 100644
--- a/app/Models/Meetup.php
+++ b/app/Models/Meetup.php
@@ -16,8 +16,8 @@ use Spatie\Sluggable\SlugOptions;
class Meetup extends Model implements HasMedia
{
- use InteractsWithMedia;
use HasSlug;
+ use InteractsWithMedia;
protected $connection = 'einundzwanzig';
@@ -43,7 +43,7 @@ class Meetup extends Model implements HasMedia
protected static function booted()
{
static::creating(function ($model) {
- if (!$model->created_by) {
+ if (! $model->created_by) {
$model->created_by = auth()->id();
}
});
@@ -57,7 +57,7 @@ class Meetup extends Model implements HasMedia
->usingLanguage(Cookie::get('lang', config('app.locale')));
}
- public function registerMediaConversions(Media $media = null): void
+ public function registerMediaConversions(?Media $media = null): void
{
$this
->addMediaConversion('preview')
@@ -101,7 +101,7 @@ class Meetup extends Model implements HasMedia
}
return Attribute::make(
- get: fn() => url()->route('img',
+ get: fn () => url()->route('img',
[
'path' => $path,
'w' => 900,
@@ -117,7 +117,7 @@ class Meetup extends Model implements HasMedia
$nextEvent = $this->meetupEvents()->where('start', '>=', now())->orderBy('start')->first();
return Attribute::make(
- get: fn() => $nextEvent ? [
+ get: fn () => $nextEvent ? [
'start' => $nextEvent->start->toDateTimeString(),
'portalLink' => url()->route('meetup.event.landing', ['country' => $this->city->country, 'meetupEvent' => $nextEvent]),
'location' => $nextEvent->location,
diff --git a/app/Models/Profile.php b/app/Models/Profile.php
index ec17416..4628de8 100644
--- a/app/Models/Profile.php
+++ b/app/Models/Profile.php
@@ -6,7 +6,5 @@ use Illuminate\Database\Eloquent\Model;
class Profile extends Model
{
-
protected $guarded = [];
-
}
diff --git a/app/Models/ProjectProposal.php b/app/Models/ProjectProposal.php
index e4a468a..0475582 100644
--- a/app/Models/ProjectProposal.php
+++ b/app/Models/ProjectProposal.php
@@ -15,17 +15,19 @@ use Spatie\Sluggable\SlugOptions;
class ProjectProposal extends Model implements HasMedia
{
- use InteractsWithMedia;
use HasSlug;
+ use InteractsWithMedia;
/**
* The attributes that aren't mass assignable.
+ *
* @var array
*/
protected $guarded = [];
/**
* The attributes that should be cast to native types.
+ *
* @var array
*/
protected $casts = [
@@ -33,10 +35,7 @@ class ProjectProposal extends Model implements HasMedia
'einundzwanzig_pleb_id' => 'integer',
];
- protected static function booted()
- {
-
- }
+ protected static function booted() {}
public function getSlugOptions(): SlugOptions
{
@@ -46,7 +45,7 @@ class ProjectProposal extends Model implements HasMedia
->usingLanguage(Cookie::get('lang', config('app.locale')));
}
- public function registerMediaConversions(Media $media = null): void
+ public function registerMediaConversions(?Media $media = null): void
{
$this
->addMediaConversion('preview')
diff --git a/app/Models/Venue.php b/app/Models/Venue.php
index b0eeb1d..46bd81f 100644
--- a/app/Models/Venue.php
+++ b/app/Models/Venue.php
@@ -16,8 +16,8 @@ use Staudenmeir\EloquentHasManyDeep\HasRelationships;
class Venue extends Model implements HasMedia
{
- use HasSlug;
use HasRelationships;
+ use HasSlug;
use InteractsWithMedia;
protected $connection = 'einundzwanzig';
@@ -48,22 +48,22 @@ class Venue extends Model implements HasMedia
});
}
- public function registerMediaConversions(Media $media = null): void
+ public function registerMediaConversions(?Media $media = null): void
{
$this
->addMediaConversion('preview')
->fit(Fit::Crop, 300, 300)
->nonQueued();
$this->addMediaConversion('thumb')
- ->fit(Fit::Crop, 130, 130)
- ->width(130)
- ->height(130);
+ ->fit(Fit::Crop, 130, 130)
+ ->width(130)
+ ->height(130);
}
public function registerMediaCollections(): void
{
$this->addMediaCollection('images')
- ->useFallbackUrl(asset('img/einundzwanzig.png'));
+ ->useFallbackUrl(asset('img/einundzwanzig.png'));
}
/**
@@ -72,9 +72,9 @@ class Venue extends Model implements HasMedia
public function getSlugOptions(): SlugOptions
{
return SlugOptions::create()
- ->generateSlugsFrom(['city.slug', 'name'])
- ->saveSlugsTo('slug')
- ->usingLanguage(Cookie::get('lang', config('app.locale')));
+ ->generateSlugsFrom(['city.slug', 'name'])
+ ->saveSlugsTo('slug')
+ ->usingLanguage(Cookie::get('lang', config('app.locale')));
}
public function createdBy(): BelongsTo
@@ -89,12 +89,12 @@ class Venue extends Model implements HasMedia
public function lecturers()
{
- return $this->hasManyDeepFromRelations($this->courses(), (new Course())->lecturer());
+ return $this->hasManyDeepFromRelations($this->courses(), (new Course)->lecturer());
}
public function courses()
{
- return $this->hasManyDeepFromRelations($this->events(), (new CourseEvent())->course());
+ return $this->hasManyDeepFromRelations($this->events(), (new CourseEvent)->course());
}
public function courseEvents(): HasMany
diff --git a/app/Models/Vote.php b/app/Models/Vote.php
index 6daa12f..02cbb72 100644
--- a/app/Models/Vote.php
+++ b/app/Models/Vote.php
@@ -7,7 +7,6 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Vote extends Model
{
-
/**
* The attributes that aren't mass assignable.
*
diff --git a/app/Providers/NostrAuthServiceProvider.php b/app/Providers/NostrAuthServiceProvider.php
index 33256a4..400dd7b 100644
--- a/app/Providers/NostrAuthServiceProvider.php
+++ b/app/Providers/NostrAuthServiceProvider.php
@@ -13,7 +13,7 @@ class NostrAuthServiceProvider extends ServiceProvider
public function boot(): void
{
Auth::provider('nostr', function (Application $app, array $config) {
- return new NostrUserProvider();
+ return new NostrUserProvider;
});
Auth::extend('nostr-session', function (Application $app, string $name, array $config) {
diff --git a/app/Support/NostrAuth.php b/app/Support/NostrAuth.php
index 83b1d97..3b469c3 100644
--- a/app/Support/NostrAuth.php
+++ b/app/Support/NostrAuth.php
@@ -3,8 +3,8 @@
namespace App\Support;
use App\Auth\NostrUser;
-use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Auth;
+use Illuminate\Support\Facades\Session;
class NostrAuth
{
diff --git a/app/Traits/NostrEventRendererTrait.php b/app/Traits/NostrEventRendererTrait.php
index 6ca5088..ae51a34 100644
--- a/app/Traits/NostrEventRendererTrait.php
+++ b/app/Traits/NostrEventRendererTrait.php
@@ -15,7 +15,7 @@ trait NostrEventRendererTrait
$profile = Profile::query()->where('pubkey', $event->pubkey)->first();
if ($profile && $profile->name) {
$name = $profile->name;
- } elseif ($profile && !empty($profile->display_name)) {
+ } elseif ($profile && ! empty($profile->display_name)) {
$name = $profile->display_name;
} else {
$name = 'Anonymous';
@@ -30,7 +30,7 @@ trait NostrEventRendererTrait
'event_id' => $event->event_id,
], [
'html' => $content,
- 'profile_image' => $profile && $profile->picture !== '' ? $profile->picture : 'https://robohash.org/' . $profile->pubkey,
+ 'profile_image' => $profile && $profile->picture !== '' ? $profile->picture : 'https://robohash.org/'.$profile->pubkey,
'profile_name' => $name,
]);
}
@@ -57,7 +57,7 @@ trait NostrEventRendererTrait
$profile = Profile::query()->where('pubkey', $pubkey)->first();
if ($profile && $profile->name) {
$name = $profile->name;
- } elseif ($profile && !empty($profile->display_name)) {
+ } elseif ($profile && ! empty($profile->display_name)) {
$name = $profile->display_name;
} else {
$name = 'Anonymous';
diff --git a/app/Traits/NostrFetcherTrait.php b/app/Traits/NostrFetcherTrait.php
index d8dd211..49a9c84 100644
--- a/app/Traits/NostrFetcherTrait.php
+++ b/app/Traits/NostrFetcherTrait.php
@@ -22,6 +22,7 @@ trait NostrFetcherTrait
'hex' => $item,
'npub' => (new Key)->convertPublicKeyToBech32($item),
]);
+
continue;
}
$hex->push([
@@ -30,10 +31,10 @@ trait NostrFetcherTrait
]);
}
- $subscription = new Subscription();
+ $subscription = new Subscription;
$subscriptionId = $subscription->setId();
- $filter1 = new Filter();
+ $filter1 = new Filter;
$filter1->setKinds([0]); // You can add multiple kind numbers
$filter1->setAuthors($hex->pluck('hex')->toArray()); // You can add multiple author ids
$filters = [$filter1];
@@ -54,7 +55,7 @@ trait NostrFetcherTrait
try {
$response = $request->send();
$data = $response[$relayUrl];
- if (!empty($data)) {
+ if (! empty($data)) {
\Log::info('Successfully fetched data from relay: '.$relayUrl);
break; // Exit the loop if data is not empty
}
@@ -65,6 +66,7 @@ trait NostrFetcherTrait
if (empty($data)) {
\Log::warning('No data found from any relay');
+
return;
}
foreach ($data as $item) {
@@ -94,5 +96,4 @@ trait NostrFetcherTrait
}
}
}
-
}
diff --git a/config/ciphersweet.php b/config/ciphersweet.php
index 188019c..4f0f085 100644
--- a/config/ciphersweet.php
+++ b/config/ciphersweet.php
@@ -50,5 +50,5 @@ return [
* the field to have a value and alerts the user if it is empty or undefined.
* Supported: "true", "false"
*/
- 'permit_empty' => env('CIPHERSWEET_PERMIT_EMPTY', FALSE)
+ 'permit_empty' => env('CIPHERSWEET_PERMIT_EMPTY', false),
];
diff --git a/config/filesystems.php b/config/filesystems.php
index 14ad3d7..1c6f9e9 100644
--- a/config/filesystems.php
+++ b/config/filesystems.php
@@ -51,7 +51,7 @@ return [
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
- 'url' => env('APP_URL') . '/storage',
+ 'url' => env('APP_URL').'/storage',
'visibility' => 'public',
'throw' => false,
],
diff --git a/config/livewire-powergrid.php b/config/livewire-powergrid.php
index 2d51c83..6af01e7 100644
--- a/config/livewire-powergrid.php
+++ b/config/livewire-powergrid.php
@@ -12,7 +12,7 @@ return [
*/
'theme' => \PowerComponents\LivewirePowerGrid\Themes\Tailwind::class,
- //'theme' => \PowerComponents\LivewirePowerGrid\Themes\Bootstrap5::class,
+ // 'theme' => \PowerComponents\LivewirePowerGrid\Themes\Bootstrap5::class,
/*
|--------------------------------------------------------------------------
@@ -30,10 +30,10 @@ return [
'flatpickr' => [
'locales' => [
'de_DE' => [
- 'locale' => 'de',
+ 'locale' => 'de',
'dateFormat' => 'd.m.Y H:i',
'enableTime' => true,
- 'time_24hr' => true,
+ 'time_24hr' => true,
],
],
],
@@ -128,14 +128,14 @@ return [
*/
'exportable' => [
- 'default' => 'openspout_v4',
+ 'default' => 'openspout_v4',
'openspout_v4' => [
'xlsx' => \PowerComponents\LivewirePowerGrid\Components\Exports\OpenSpout\v4\ExportToXLS::class,
- 'csv' => \PowerComponents\LivewirePowerGrid\Components\Exports\OpenSpout\v4\ExportToCsv::class,
+ 'csv' => \PowerComponents\LivewirePowerGrid\Components\Exports\OpenSpout\v4\ExportToCsv::class,
],
'openspout_v3' => [
'xlsx' => \PowerComponents\LivewirePowerGrid\Components\Exports\OpenSpout\v3\ExportToXLS::class,
- 'csv' => \PowerComponents\LivewirePowerGrid\Components\Exports\OpenSpout\v3\ExportToCsv::class,
+ 'csv' => \PowerComponents\LivewirePowerGrid\Components\Exports\OpenSpout\v3\ExportToCsv::class,
],
],
diff --git a/config/markdown.php b/config/markdown.php
index d2cc5ff..16fb74a 100644
--- a/config/markdown.php
+++ b/config/markdown.php
@@ -45,7 +45,6 @@ return [
*/
'cache_store' => null,
-
/*
* When cache_store is enabled, this value will be used to determine
* how long the cache will be valid. If you set this to `null` the
diff --git a/config/media-library.php b/config/media-library.php
index 22517c5..6f8881c 100644
--- a/config/media-library.php
+++ b/config/media-library.php
@@ -141,7 +141,7 @@ return [
'-m 6', // for the slowest compression method in order to get the best compression.
'-pass 10', // for maximizing the amount of analysis pass.
'-mt', // multithreading for some speed improvements.
- '-q 90', //quality factor that brings the least noticeable changes.
+ '-q 90', // quality factor that brings the least noticeable changes.
],
Spatie\ImageOptimizer\Optimizers\Avifenc::class => [
'-a cq-level=23', // constant quality level, lower values mean better quality and greater file size (0-63).
diff --git a/config/services.php b/config/services.php
index b5f1da3..a06698d 100644
--- a/config/services.php
+++ b/config/services.php
@@ -42,6 +42,6 @@ return [
'btc_pay' => [
'api_key' => env('BTC_PAY_API_KEY'),
- ]
+ ],
];
diff --git a/database/migrations/2023_03_10_190301_create_votes_table.php b/database/migrations/2023_03_10_190301_create_votes_table.php
index 39fc172..2c360e9 100644
--- a/database/migrations/2023_03_10_190301_create_votes_table.php
+++ b/database/migrations/2023_03_10_190301_create_votes_table.php
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration {
+return new class extends Migration
+{
/**
* Run the migrations.
*/
diff --git a/database/migrations/2024_08_29_120928_create_einundzwanzig_plebs_table.php b/database/migrations/2024_08_29_120928_create_einundzwanzig_plebs_table.php
index 6671b79..bda3bab 100644
--- a/database/migrations/2024_08_29_120928_create_einundzwanzig_plebs_table.php
+++ b/database/migrations/2024_08_29_120928_create_einundzwanzig_plebs_table.php
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration {
+return new class extends Migration
+{
/**
* Run the migrations.
*/
diff --git a/database/migrations/2024_08_29_125457_create_profiles_table.php b/database/migrations/2024_08_29_125457_create_profiles_table.php
index cab29a3..d5eda41 100644
--- a/database/migrations/2024_08_29_125457_create_profiles_table.php
+++ b/database/migrations/2024_08_29_125457_create_profiles_table.php
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration {
+return new class extends Migration
+{
/**
* Run the migrations.
*/
diff --git a/database/migrations/2024_08_29_141818_create_events_table.php b/database/migrations/2024_08_29_141818_create_events_table.php
index b9e7d30..42094a1 100644
--- a/database/migrations/2024_08_29_141818_create_events_table.php
+++ b/database/migrations/2024_08_29_141818_create_events_table.php
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration {
+return new class extends Migration
+{
/**
* Run the migrations.
*/
diff --git a/database/migrations/2024_08_29_143915_create_rendered_events_table.php b/database/migrations/2024_08_29_143915_create_rendered_events_table.php
index 14b706c..726ff76 100644
--- a/database/migrations/2024_08_29_143915_create_rendered_events_table.php
+++ b/database/migrations/2024_08_29_143915_create_rendered_events_table.php
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration {
+return new class extends Migration
+{
/**
* Run the migrations.
*/
diff --git a/database/migrations/2024_09_28_181901_create_elections_table.php b/database/migrations/2024_09_28_181901_create_elections_table.php
index 3bc366b..a416306 100644
--- a/database/migrations/2024_09_28_181901_create_elections_table.php
+++ b/database/migrations/2024_09_28_181901_create_elections_table.php
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration {
+return new class extends Migration
+{
/**
* Run the migrations.
*/
diff --git a/database/migrations/2024_09_29_143100_add_end_time_field_to_elections_table.php b/database/migrations/2024_09_29_143100_add_end_time_field_to_elections_table.php
index 910a554..2a43814 100644
--- a/database/migrations/2024_09_29_143100_add_end_time_field_to_elections_table.php
+++ b/database/migrations/2024_09_29_143100_add_end_time_field_to_elections_table.php
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration {
+return new class extends Migration
+{
/**
* Run the migrations.
*/
diff --git a/database/migrations/2024_09_29_152902_add_application_fields_to_einundzwanzig_plebs_table.php b/database/migrations/2024_09_29_152902_add_application_fields_to_einundzwanzig_plebs_table.php
index 573ee99..7d767ca 100644
--- a/database/migrations/2024_09_29_152902_add_application_fields_to_einundzwanzig_plebs_table.php
+++ b/database/migrations/2024_09_29_152902_add_application_fields_to_einundzwanzig_plebs_table.php
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration {
+return new class extends Migration
+{
/**
* Run the migrations.
*/
@@ -21,7 +22,6 @@ return new class extends Migration {
*/
public function down(): void
{
- Schema::table('einundzwanzig_plebs', function (Blueprint $table) {
- });
+ Schema::table('einundzwanzig_plebs', function (Blueprint $table) {});
}
};
diff --git a/database/migrations/2024_09_30_125722_create_payment_events_table.php b/database/migrations/2024_09_30_125722_create_payment_events_table.php
index 53bc617..d2c2032 100644
--- a/database/migrations/2024_09_30_125722_create_payment_events_table.php
+++ b/database/migrations/2024_09_30_125722_create_payment_events_table.php
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration {
+return new class extends Migration
+{
/**
* Run the migrations.
*/
diff --git a/database/migrations/2024_09_30_171153_add_copy_field_application_text_to_einundzwanzig_plebs_table.php b/database/migrations/2024_09_30_171153_add_copy_field_application_text_to_einundzwanzig_plebs_table.php
index 71cdef3..e8ea56c 100644
--- a/database/migrations/2024_09_30_171153_add_copy_field_application_text_to_einundzwanzig_plebs_table.php
+++ b/database/migrations/2024_09_30_171153_add_copy_field_application_text_to_einundzwanzig_plebs_table.php
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration {
+return new class extends Migration
+{
/**
* Run the migrations.
*/
diff --git a/database/migrations/2024_10_22_143729_add_zap_endpoint_field_to_payment_events_table.php b/database/migrations/2024_10_22_143729_add_zap_endpoint_field_to_payment_events_table.php
index 77d94d8..aac1138 100644
--- a/database/migrations/2024_10_22_143729_add_zap_endpoint_field_to_payment_events_table.php
+++ b/database/migrations/2024_10_22_143729_add_zap_endpoint_field_to_payment_events_table.php
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration {
+return new class extends Migration
+{
/**
* Run the migrations.
*/
diff --git a/database/migrations/2024_10_23_160756_add_accepted_field_to_project_proposals_table.php b/database/migrations/2024_10_23_160756_add_accepted_field_to_project_proposals_table.php
index 9974037..0b31b07 100644
--- a/database/migrations/2024_10_23_160756_add_accepted_field_to_project_proposals_table.php
+++ b/database/migrations/2024_10_23_160756_add_accepted_field_to_project_proposals_table.php
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration {
+return new class extends Migration
+{
/**
* Run the migrations.
*/
diff --git a/database/migrations/2024_10_24_132233_alter_payment_events_table.php b/database/migrations/2024_10_24_132233_alter_payment_events_table.php
index 03c83bb..e365682 100644
--- a/database/migrations/2024_10_24_132233_alter_payment_events_table.php
+++ b/database/migrations/2024_10_24_132233_alter_payment_events_table.php
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration {
+return new class extends Migration
+{
/**
* Run the migrations.
*/
diff --git a/database/migrations/2024_10_24_153410_add_website_field_to_project_proposals_table.php b/database/migrations/2024_10_24_153410_add_website_field_to_project_proposals_table.php
index fdde4b8..37d8c40 100644
--- a/database/migrations/2024_10_24_153410_add_website_field_to_project_proposals_table.php
+++ b/database/migrations/2024_10_24_153410_add_website_field_to_project_proposals_table.php
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration {
+return new class extends Migration
+{
/**
* Run the migrations.
*/
diff --git a/database/migrations/2024_10_25_121448_create_notifications_table.php b/database/migrations/2024_10_25_121448_create_notifications_table.php
index 072ba27..a6f2195 100644
--- a/database/migrations/2024_10_25_121448_create_notifications_table.php
+++ b/database/migrations/2024_10_25_121448_create_notifications_table.php
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration {
+return new class extends Migration
+{
/**
* Run the migrations.
*/
diff --git a/database/migrations/2024_10_25_140418_add_email_field_to_einundzwanzig_plebs_table.php b/database/migrations/2024_10_25_140418_add_email_field_to_einundzwanzig_plebs_table.php
index 19b8a9d..fab7ba9 100644
--- a/database/migrations/2024_10_25_140418_add_email_field_to_einundzwanzig_plebs_table.php
+++ b/database/migrations/2024_10_25_140418_add_email_field_to_einundzwanzig_plebs_table.php
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration {
+return new class extends Migration
+{
/**
* Run the migrations.
*/
diff --git a/database/migrations/2024_10_25_171026_add_no_email_field_to_einundzwanzig_plebs_table.php b/database/migrations/2024_10_25_171026_add_no_email_field_to_einundzwanzig_plebs_table.php
index 7be6a3a..a35395a 100644
--- a/database/migrations/2024_10_25_171026_add_no_email_field_to_einundzwanzig_plebs_table.php
+++ b/database/migrations/2024_10_25_171026_add_no_email_field_to_einundzwanzig_plebs_table.php
@@ -4,7 +4,8 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-return new class extends Migration {
+return new class extends Migration
+{
/**
* Run the migrations.
*/
diff --git a/resources/views/components/project-card.blade.php b/resources/views/components/project-card.blade.php
index 8bc98d0..0245dbe 100644
--- a/resources/views/components/project-card.blade.php
+++ b/resources/views/components/project-card.blade.php
@@ -21,8 +21,8 @@
Du bist nicht berechtigt, die Wahlen einzusehen.
-Keine News vorhanden.
-Du bist nicht berechtigt, die News einzusehen.
-{{ $project->description ?? 'Keine Beschreibung' }}
-Du bist nicht berechtigt, die Projektförderung einzusehen.
-