Code clean up. Remove some duplicate keys; Remove some unused parameters; Fix some FQCN;

This commit is contained in:
Luis Henrique Mulinari
2017-10-11 21:19:07 +02:00
parent e426eff98c
commit 968bc6a3ce
9 changed files with 12 additions and 17 deletions

View File

@@ -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);

View File

@@ -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

View File

@@ -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')