Skip to content

Commit 691abba

Browse files
authored
Merge pull request #22 from AmazonPython/master
Apply fixes from StyleCI
2 parents 0e94b24 + 4b62969 commit 691abba

File tree

75 files changed

+611
-599
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+611
-599
lines changed

.styleci.yml

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
php:
2-
risky: false
3-
version: 7.4
4-
preset: recommended
5-
tab-width: 4
6-
use-tabs: true
7-
finder:
8-
exclude:
9-
- "modules"
10-
- "node_modules"
11-
- "nova"
12-
- "nova-components"
13-
- "storage"
14-
- "spark"
15-
- "vendor"
16-
name: "*.php"
17-
not-name:
18-
- "*.blade.php"
19-
- "_ide_helper.php"
1+
risky: false
2+
version: 7.4
3+
preset: recommended
4+
finder:
5+
exclude:
6+
- "modules"
7+
- "node_modules"
8+
- "nova"
9+
- "nova-components"
10+
- "storage"
11+
- "spark"
12+
- "vendor"
13+
name: "*.php"
14+
not-name:
15+
- "*.blade.php"
16+
- "_ide_helper.php"

app/Channel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace App;
44

5-
use Illuminate\Support\Str;
65
use Illuminate\Database\Eloquent\Model;
6+
use Illuminate\Support\Str;
77

88
class Channel extends Model
99
{

app/Console/Kernel.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ class Kernel extends ConsoleKernel
1919
/**
2020
* Define the application's command schedule.
2121
*
22-
* @param \Illuminate\Console\Scheduling\Schedule $schedule
22+
* @param \Illuminate\Console\Scheduling\Schedule $schedule
23+
*
2324
* @return void
2425
*/
2526
protected function schedule(Schedule $schedule)

app/Events/ThreadReceivedNewReply.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22

33
namespace App\Events;
44

5-
use Illuminate\Queue\SerializesModels;
5+
use Illuminate\Broadcasting\InteractsWithSockets;
66
use Illuminate\Broadcasting\PrivateChannel;
77
use Illuminate\Foundation\Events\Dispatchable;
8-
use Illuminate\Broadcasting\InteractsWithSockets;
8+
use Illuminate\Queue\SerializesModels;
99

1010
class ThreadReceivedNewReply
1111
{
12-
use Dispatchable, InteractsWithSockets, SerializesModels;
12+
use Dispatchable;
13+
use InteractsWithSockets;
14+
use SerializesModels;
1315

1416
public $reply;
1517

app/Exceptions/Handler.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ class Handler extends ExceptionHandler
2929
/**
3030
* Report or log an exception.
3131
*
32-
* @param \Exception $exception
32+
* @param \Exception $exception
33+
*
3334
* @return void
3435
*/
3536
public function report(Exception $exception)
@@ -40,8 +41,9 @@ public function report(Exception $exception)
4041
/**
4142
* Render an exception into an HTTP response.
4243
*
43-
* @param \Illuminate\Http\Request $request
44-
* @param \Exception $exception
44+
* @param \Illuminate\Http\Request $request
45+
* @param \Exception $exception
46+
*
4547
* @return \Illuminate\Http\Response
4648
*/
4749
public function render($request, Exception $exception)

app/Extensions/EloquentUserProvider.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
namespace App\Extensions;
44

5-
use Illuminate\Support\Str;
65
use Illuminate\Auth\EloquentUserProvider as BaseUserProvider;
6+
use Illuminate\Support\Str;
77

88
class EloquentUserProvider extends BaseUserProvider
99
{
1010
/**
1111
* Retrieve a user by the given credentials.
1212
*
13-
* @param array $credentials
13+
* @param array $credentials
14+
*
1415
* @return \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|object
1516
*/
1617
public function retrieveByCredentials(array $credentials)

app/Favoritable.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace App;
44

5-
use Illuminate\Database\Eloquent\Model;
6-
75
trait Favoritable
86
{
97
protected static function bootFavoritable()
@@ -22,7 +20,7 @@ public function favorite()
2220
{
2321
$arrtributes = ['user_id' => auth()->id()];
2422

25-
if (! $this->favorites()->where($arrtributes)->exists()){
23+
if (!$this->favorites()->where($arrtributes)->exists()) {
2624
return $this->favorites()->create($arrtributes);
2725
}
2826
}
@@ -36,7 +34,7 @@ public function unfavorite()
3634

3735
public function isFavorited()
3836
{
39-
return ! ! $this->favorites->where('user_id', auth()->id())->count();
37+
return (bool) $this->favorites->where('user_id', auth()->id())->count();
4038
}
4139

4240
public function getIsFavoritedAttribute()

app/Filters/Filters.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
abstract class Filters
88
{
9-
protected $request, $builder;
9+
protected $request;
10+
protected $builder;
1011

1112
protected $filters = [];
1213

app/Http/Controllers/Admin/ChannelController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function store()
2323
{
2424
$channel = Channel::create(
2525
request()->validate([
26-
'name' => 'required|unique:channels',
26+
'name' => 'required|unique:channels',
2727
'description' => 'required',
2828
])
2929
);

app/Http/Controllers/Admin/ThreadController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace App\Http\Controllers\Admin;
44

5+
use App\Http\Controllers\Controller;
56
use App\Thread;
67
use App\Trending;
7-
use App\Http\Controllers\Controller;
88

99
class ThreadController extends Controller
1010
{

0 commit comments

Comments
 (0)