Adopt PSR-2 coding style

The Laravel framework adopts the PSR-2 coding style in version 5.1.
Laravel apps *should* adopt this coding style as well. Read the
[PSR-2 coding style guide][1] for more details and check out [PHPCS][2]
to use as a code formatting tool.

[1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
[2]: https://github.com/squizlabs/PHP_CodeSniffer
This commit is contained in:
Laravel Shift
2018-07-18 20:13:14 +00:00
parent 3a273990d5
commit 5c1c56d2ca
50 changed files with 180 additions and 203 deletions
@@ -27,7 +27,6 @@ class SubscriptionController extends Controller
public function subscribe(Topic $topic)
{
if (!auth()->user()->isSubscribed($topic->id)) {
$subscription = new TopicSubscription();
$subscription->user_id = auth()->user()->id;
$subscription->topic_id = $topic->id;
@@ -50,7 +49,6 @@ class SubscriptionController extends Controller
public function unsubscribe(Topic $topic)
{
if (auth()->user()->isSubscribed($topic->id)) {
$subscription = auth()->user()->subscriptions()->where('topic_id', $topic->id)->first();
$subscription->delete();