File tree Expand file tree Collapse file tree 6 files changed +17
-14
lines changed Expand file tree Collapse file tree 6 files changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,8 @@ public function rules(): array
81
81
'string ' ,
82
82
'filled ' ,
83
83
Rule::unique ('books ' )
84
- ->where (function ($ query ) {
85
- return $ query ->where ('isbn ' , $ this ->isbn );
84
+ ->where (function (\ Illuminate \ Database \ Query \ Builder $ query ) {
85
+ $ query ->where ('isbn ' , $ this ->isbn );
86
86
}),
87
87
],
88
88
'publisher_id ' => 'integer|nullable ' ,
Original file line number Diff line number Diff line change @@ -88,9 +88,10 @@ public function rules(): array
88
88
'min:3 ' ,
89
89
'max:255 ' ,
90
90
Rule::unique ('publishers ' )
91
- ->where (function ($ query ) {
92
- return $ query ->where ('email ' , $ this ->email )
93
- && $ query ->where ('website ' , $ this ->website );
91
+ ->where (function (\Illuminate \Database \Query \Builder $ query ) {
92
+ $ query
93
+ ->where ('email ' , $ this ->email )
94
+ ->where ('website ' , $ this ->website );
94
95
}),
95
96
],
96
97
'email ' => 'required|string|email|filled ' ,
Original file line number Diff line number Diff line change @@ -82,8 +82,8 @@ public function rules(): array
82
82
'filled ' ,
83
83
Rule::unique ('books ' )
84
84
->ignore ($ this ->books )
85
- ->where (function ($ query ) {
86
- return $ query ->where ('isbn ' , $ this ->isbn );
85
+ ->where (function (\ Illuminate \ Database \ Query \ Builder $ query ) {
86
+ $ query ->where ('isbn ' , $ this ->isbn );
87
87
}),
88
88
],
89
89
'publisher_id ' => 'integer|nullable ' ,
Original file line number Diff line number Diff line change @@ -88,9 +88,10 @@ public function rules(): array
88
88
'max:255 ' ,
89
89
Rule::unique ('publishers ' )
90
90
->ignore ($ this ->publisher )
91
- ->where (function ($ query ) {
92
- return $ query ->where ('email ' , $ this ->email )
93
- && $ query ->where ('website ' , $ this ->website );
91
+ ->where (function (\Illuminate \Database \Query \Builder $ query ) {
92
+ $ query
93
+ ->where ('email ' , $ this ->email )
94
+ ->where ('website ' , $ this ->website );
94
95
}),
95
96
],
96
97
'email ' => 'sometimes|required|string|email|filled ' ,
Original file line number Diff line number Diff line change 8
8
use App \Repositories \PublisherRepository ;
9
9
use App \Services \BookService ;
10
10
use App \Services \PublisherService ;
11
+ use Illuminate \Contracts \Foundation \Application ;
11
12
use Illuminate \Support \ServiceProvider ;
12
13
13
14
class AppServiceProvider extends ServiceProvider
@@ -18,15 +19,15 @@ class AppServiceProvider extends ServiceProvider
18
19
public function register (): void
19
20
{
20
21
$ this ->app ->bind (BookRepositoryInterface::class, BookRepository::class);
21
- $ this ->app ->bind (BookService::class, function ($ app ) {
22
+ $ this ->app ->bind (BookService::class, function (Application $ app ) {
22
23
return new BookService (
23
24
$ app ->make (BookRepositoryInterface::class),
24
25
$ app ->make (PublisherRepositoryInterface::class),
25
26
);
26
27
});
27
28
28
29
$ this ->app ->bind (PublisherRepositoryInterface::class, PublisherRepository::class);
29
- $ this ->app ->bind (PublisherService::class, function ($ app ) {
30
+ $ this ->app ->bind (PublisherService::class, function (Application $ app ) {
30
31
return new PublisherService ($ app ->make (PublisherRepositoryInterface::class));
31
32
});
32
33
}
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ parameters:
5
5
paths:
6
6
- app/
7
7
8
- # Level 9 is the highest level
9
- level: 9
8
+ # Level 9 is the highest numeric level
9
+ level: max
10
10
11
11
# ignoreErrors:
12
12
# - '#PHPDoc tag @var#'
You can’t perform that action at this time.
0 commit comments