Code clean up. Remove some duplicate keys; Remove some unused parameters; Fix some FQCN;
This commit is contained in:
@@ -149,7 +149,7 @@ class ComponentController extends Controller
|
||||
$tags = preg_split('/ ?, ?/', $tags);
|
||||
|
||||
// For every tag, do we need to create it?
|
||||
$componentTags = array_map(function ($taggable) use ($component) {
|
||||
$componentTags = array_map(function ($taggable) {
|
||||
return Tag::firstOrCreate(['name' => $taggable])->id;
|
||||
}, $tags);
|
||||
|
||||
@@ -203,7 +203,7 @@ class ComponentController extends Controller
|
||||
$tags = preg_split('/ ?, ?/', $tags);
|
||||
|
||||
// For every tag, do we need to create it?
|
||||
$componentTags = array_map(function ($taggable) use ($component) {
|
||||
$componentTags = array_map(function ($taggable) {
|
||||
return Tag::firstOrCreate(['name' => $taggable])->id;
|
||||
}, $tags);
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class DashboardController extends Controller
|
||||
/**
|
||||
* The feed integration.
|
||||
*
|
||||
* @var \CachetHQ\Cachet\Integrations\Feed
|
||||
* @var \CachetHQ\Cachet\Integrations\Contracts\Feed
|
||||
*/
|
||||
protected $feed;
|
||||
|
||||
@@ -62,7 +62,7 @@ class DashboardController extends Controller
|
||||
/**
|
||||
* Creates a new dashboard controller instance.
|
||||
*
|
||||
* @param \CachetHQ\Cachet\Integrations\Feed $feed
|
||||
* @param \CachetHQ\Cachet\Integrations\Contracts\Feed $feed
|
||||
* @param \Illuminate\Contracts\Auth\Guard $guard
|
||||
*
|
||||
* @return void
|
||||
|
||||
@@ -146,7 +146,7 @@ class SubscribeController extends Controller
|
||||
if ($subscription) {
|
||||
dispatch(new UnsubscribeSubscriptionCommand(Subscription::forSubscriber($subscriber->id)->firstOrFail()));
|
||||
} else {
|
||||
dispatch(new UnsubscribeSubscriberCommand($subscriber, $subscription));
|
||||
dispatch(new UnsubscribeSubscriberCommand($subscriber));
|
||||
}
|
||||
|
||||
return cachet_redirect('status-page')
|
||||
|
||||
Reference in New Issue
Block a user