mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-13 06:56:48 +00:00
Apply Laravel coding style
Shift automatically applies the Laravel coding style - which uses the PSR-12 coding style as a base with some minor additions. You may customize the code style applied by configuring [Pint](https://laravel.com/docs/pint), [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer), or [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) for your project root. For more information on customizing the code style applied by Shift, [watch this short video](https://laravelshift.com/videos/shift-code-style).
This commit is contained in:
committed by
HolgerHatGarKeineNode
parent
a15ca4a2bc
commit
5776b01d15
@@ -13,7 +13,6 @@ class LibraryItemObserver
|
||||
* Handle the LibraryItem "created" event.
|
||||
*
|
||||
* @param \App\Models\LibraryItem $libraryItem
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function created(LibraryItem $libraryItem)
|
||||
@@ -26,7 +25,7 @@ class LibraryItemObserver
|
||||
if ($libraryItem->lecturer->twitter_username && $libraryItem->type !== 'markdown_article') {
|
||||
$libraryItemName .= ' von @'.$libraryItem->lecturer->twitter_username;
|
||||
}
|
||||
if (!$libraryItem->lecturer->twitter_username) {
|
||||
if (! $libraryItem->lecturer->twitter_username) {
|
||||
$libraryItemName .= ' von '.$libraryItem->lecturer->name;
|
||||
}
|
||||
|
||||
@@ -36,9 +35,8 @@ class LibraryItemObserver
|
||||
// http://localhost/de/library/library-item?l=de&table[filters][id]=2
|
||||
|
||||
if ($libraryItem->type !== 'markdown_article') {
|
||||
|
||||
if ($libraryItem->whereDoesntHave('libraries',
|
||||
fn($query) => $query->where('libraries.is_public', false))
|
||||
fn ($query) => $query->where('libraries.is_public', false))
|
||||
->exists()) {
|
||||
$text = sprintf("Es gibt was Neues zum Lesen oder Anhören:\n\n%s\n\n%s\n\n#Bitcoin #Wissen #Einundzwanzig #gesundesgeld",
|
||||
$libraryItemName,
|
||||
@@ -47,7 +45,6 @@ class LibraryItemObserver
|
||||
);
|
||||
$this->postTweet($text);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
@@ -59,7 +56,6 @@ class LibraryItemObserver
|
||||
* Handle the LibraryItem "updated" event.
|
||||
*
|
||||
* @param \App\Models\LibraryItem $libraryItem
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function updated(LibraryItem $libraryItem)
|
||||
@@ -71,7 +67,6 @@ class LibraryItemObserver
|
||||
* Handle the LibraryItem "deleted" event.
|
||||
*
|
||||
* @param \App\Models\LibraryItem $libraryItem
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function deleted(LibraryItem $libraryItem)
|
||||
@@ -83,7 +78,6 @@ class LibraryItemObserver
|
||||
* Handle the LibraryItem "restored" event.
|
||||
*
|
||||
* @param \App\Models\LibraryItem $libraryItem
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function restored(LibraryItem $libraryItem)
|
||||
@@ -95,7 +89,6 @@ class LibraryItemObserver
|
||||
* Handle the LibraryItem "force deleted" event.
|
||||
*
|
||||
* @param \App\Models\LibraryItem $libraryItem
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function forceDeleted(LibraryItem $libraryItem)
|
||||
|
||||
Reference in New Issue
Block a user