CodepadME / laravel-tricks

The source code for the Laravel Tricks website
http://laravel-tricks.com
MIT License
966 stars 298 forks source link

Why two lines instead of one? #77

Closed irfanevrens closed 8 years ago

irfanevrens commented 9 years ago

1 - original

    public function findAllForUser(User $user, $perPage = 9)
    {
        $tricks = $user->tricks()->orderBy('created_at', 'DESC')->paginate($perPage);

        return $tricks;
    }

2 - edited

    public function findAllForUser(User $user, $perPage = 9)
    {
        return $user->tricks()->orderBy('created_at', 'DESC')->paginate($perPage);
    }
msurguy commented 9 years ago

It could be done either way, but for readability it is split in two lines. I agree that there is some inconsistency in some of the files and it could be fixed with a Pull Request.