Skip to content

Commit 59a371c

Browse files
committed
♻️ refactoring
1 parent d13039a commit 59a371c

File tree

12 files changed

+6
-28
lines changed

12 files changed

+6
-28
lines changed

app/Spotlight/Article.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function searchArticle($query)
3030
{
3131
return ArticleModel::published()->where('title', 'like', "%$query%")
3232
->get()
33-
->map(function(ArticleModel $article) {
33+
->map(function (ArticleModel $article) {
3434
return new SpotlightSearchResult(
3535
$article->slug(),
3636
$article->title,

app/Spotlight/Articles.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
use LivewireUI\Spotlight\Spotlight;
66
use LivewireUI\Spotlight\SpotlightCommand;
7-
use LivewireUI\Spotlight\SpotlightCommandDependencies;
8-
use LivewireUI\Spotlight\SpotlightCommandDependency;
9-
use LivewireUI\Spotlight\SpotlightSearchResult;
107

118
class Articles extends SpotlightCommand
129
{

app/Spotlight/Discussion.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function searchDiscussion($query)
3030
{
3131
return DiscussionModel::where('title', 'like', "%$query%")
3232
->get()
33-
->map(function(DiscussionModel $discussion) {
33+
->map(function (DiscussionModel $discussion) {
3434
return new SpotlightSearchResult(
3535
$discussion->slug(),
3636
$discussion->title,

app/Spotlight/Discussions.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
use LivewireUI\Spotlight\Spotlight;
66
use LivewireUI\Spotlight\SpotlightCommand;
7-
use LivewireUI\Spotlight\SpotlightCommandDependencies;
8-
use LivewireUI\Spotlight\SpotlightCommandDependency;
9-
use LivewireUI\Spotlight\SpotlightSearchResult;
107

118
class Discussions extends SpotlightCommand
129
{
@@ -16,7 +13,7 @@ class Discussions extends SpotlightCommand
1613

1714
protected array $synonyms = [
1815
'débat',
19-
'conversation'
16+
'conversation',
2017
];
2118

2219
public function execute(Spotlight $spotlight)

app/Spotlight/FAQs.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
use LivewireUI\Spotlight\Spotlight;
66
use LivewireUI\Spotlight\SpotlightCommand;
7-
use LivewireUI\Spotlight\SpotlightCommandDependencies;
8-
use LivewireUI\Spotlight\SpotlightCommandDependency;
9-
use LivewireUI\Spotlight\SpotlightSearchResult;
107

118
class FAQs extends SpotlightCommand
129
{
@@ -17,7 +14,7 @@ class FAQs extends SpotlightCommand
1714
protected array $synonyms = [
1815
'faq',
1916
'question',
20-
'foire'
17+
'foire',
2118
];
2219

2320
/**

app/Spotlight/Forum.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
use LivewireUI\Spotlight\Spotlight;
66
use LivewireUI\Spotlight\SpotlightCommand;
7-
use LivewireUI\Spotlight\SpotlightCommandDependencies;
8-
use LivewireUI\Spotlight\SpotlightCommandDependency;
9-
use LivewireUI\Spotlight\SpotlightSearchResult;
107

118
class Forum extends SpotlightCommand
129
{

app/Spotlight/Guides.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
use LivewireUI\Spotlight\Spotlight;
66
use LivewireUI\Spotlight\SpotlightCommand;
7-
use LivewireUI\Spotlight\SpotlightCommandDependencies;
8-
use LivewireUI\Spotlight\SpotlightCommandDependency;
9-
use LivewireUI\Spotlight\SpotlightSearchResult;
107

118
class Guides extends SpotlightCommand
129
{

app/Spotlight/Slack.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
use LivewireUI\Spotlight\Spotlight;
66
use LivewireUI\Spotlight\SpotlightCommand;
7-
use LivewireUI\Spotlight\SpotlightCommandDependencies;
8-
use LivewireUI\Spotlight\SpotlightCommandDependency;
9-
use LivewireUI\Spotlight\SpotlightSearchResult;
107

118
class Slack extends SpotlightCommand
129
{

app/Spotlight/Sujet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function searchThread($query)
3535
{
3636
return Thread::where('title', 'like', "%$query%")
3737
->get()
38-
->map(function(Thread $thread) {
38+
->map(function (Thread $thread) {
3939
// You must map your search result into SpotlightSearchResult objects
4040
return new SpotlightSearchResult(
4141
$thread->slug(),

app/Spotlight/Telegram.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
use LivewireUI\Spotlight\Spotlight;
66
use LivewireUI\Spotlight\SpotlightCommand;
7-
use LivewireUI\Spotlight\SpotlightCommandDependencies;
8-
use LivewireUI\Spotlight\SpotlightCommandDependency;
9-
use LivewireUI\Spotlight\SpotlightSearchResult;
107

118
class Telegram extends SpotlightCommand
129
{

app/Spotlight/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function searchUser($query)
3131
return UserModel::where('name', 'like', "%$query%")
3232
->orWhere('username', 'like', "%$query%")
3333
->get()
34-
->map(function(UserModel $user) {
34+
->map(function (UserModel $user) {
3535
return new SpotlightSearchResult(
3636
$user->id,
3737
$user->name,

config/livewire-ui-spotlight.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
*/
5454
'include_css' => false,
5555

56-
5756
/*
5857
|--------------------------------------------------------------------------
5958
| Include JS

0 commit comments

Comments
 (0)