File tree Expand file tree Collapse file tree 3 files changed +41
-3
lines changed Expand file tree Collapse file tree 3 files changed +41
-3
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+
9+
10+ jobs :
11+ phpcs :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v2
15+ - name : Setup PHP environment
16+ uses : shivammathur/setup-php@v2
17+ - name : Install dependencies
18+ run : composer install
19+ - name : PHPCSFixer check
20+ run : composer check-style
21+ phpunit :
22+ strategy :
23+ matrix :
24+ php_version : [7.2, 7.3, 7.4]
25+ runs-on : ubuntu-latest
26+ steps :
27+ - uses : actions/checkout@v2
28+ - name : Setup PHP environment
29+ uses : shivammathur/setup-php@v2
30+ with :
31+ php-version : ${{ matrix.php_version }}
32+ coverage : xdebug
33+ - name : Install dependencies
34+ run : composer install
35+ - name : PHPUnit check
36+ run : ./vendor/bin/phpunit --coverage-text
Original file line number Diff line number Diff line change @@ -4,3 +4,5 @@ composer.lock
44.php_cs.cache
55/coverage /
66.phpunit.result.cache
7+ cghooks.lock
8+
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ public function hasRequestedToFollow(Model $user): bool
9090 /* @var \Illuminate\Database\Eloquent\Model $this */
9191 if ($ this ->relationLoaded ('followings ' )) {
9292 return $ this ->followings
93- ->whereNull ('pivot.accepted_at ' )
93+ ->whereStrict ('pivot.accepted_at ' , null )
9494 ->contains ($ user );
9595 }
9696
@@ -114,7 +114,7 @@ public function isFollowing($user)
114114 /* @var \Illuminate\Database\Eloquent\Model $this */
115115 if ($ this ->relationLoaded ('followings ' )) {
116116 return $ this ->followings
117- ->whereNotNull ('pivot.accepted_at ' )
117+ ->where ('pivot.accepted_at ' , ' !== ' , null )
118118 ->contains ($ user );
119119 }
120120
@@ -138,7 +138,7 @@ public function isFollowedBy($user)
138138 /* @var \Illuminate\Database\Eloquent\Model $this */
139139 if ($ this ->relationLoaded ('followers ' )) {
140140 return $ this ->followers
141- ->whereNotNull ('pivot.accepted_at ' )
141+ ->where ('pivot.accepted_at ' , ' !== ' , null )
142142 ->contains ($ user );
143143 }
144144
You can’t perform that action at this time.
0 commit comments