generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #122 from DutchCodingCompany/feature/disable-provi…
…ders Add option to hide providers
- Loading branch information
Showing
11 changed files
with
126 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Class App\\\\Models\\\\User not found\\.$#" | ||
count: 1 | ||
path: src/FilamentSocialitePlugin.php | ||
|
||
- | ||
message: "#^Property DutchCodingCompany\\\\FilamentSocialite\\\\FilamentSocialitePlugin\\:\\:\\$userModelClass \\(class\\-string\\<Illuminate\\\\Contracts\\\\Auth\\\\Authenticatable\\>\\) does not accept default value of type string\\.$#" | ||
count: 1 | ||
path: src/FilamentSocialitePlugin.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$value of method DutchCodingCompany\\\\FilamentSocialite\\\\Http\\\\Controllers\\\\SocialiteLoginController\\:\\:evaluate\\(\\) expects bool\\|\\(callable\\(\\)\\: bool\\), bool\\|\\(Closure\\(string, Laravel\\\\Socialite\\\\Contracts\\\\User, Illuminate\\\\Contracts\\\\Auth\\\\Authenticatable\\|null\\)\\: bool\\) given\\.$#" | ||
count: 1 | ||
path: src/Http/Controllers/SocialiteLoginController.php | ||
|
||
- | ||
message: "#^Generic type Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\BelongsToMany\\<DutchCodingCompany\\\\FilamentSocialite\\\\Tests\\\\Fixtures\\\\TestTeam, static\\(DutchCodingCompany\\\\FilamentSocialite\\\\Tests\\\\Fixtures\\\\TestTenantUser\\)\\> in PHPDoc tag @return specifies 2 template types, but class Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\BelongsToMany supports only 1\\: TRelatedModel$#" | ||
count: 1 | ||
path: tests/Fixtures/TestTenantUser.php | ||
|
||
- | ||
message: "#^Method DutchCodingCompany\\\\FilamentSocialite\\\\Tests\\\\Fixtures\\\\TestTenantUser\\:\\:teams\\(\\) should return Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\BelongsToMany\\<DutchCodingCompany\\\\FilamentSocialite\\\\Tests\\\\Fixtures\\\\TestTeam, static\\(DutchCodingCompany\\\\FilamentSocialite\\\\Tests\\\\Fixtures\\\\TestTenantUser\\)\\> but returns Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\BelongsToMany\\<DutchCodingCompany\\\\FilamentSocialite\\\\Tests\\\\Fixtures\\\\TestTeam\\>\\.$#" | ||
count: 1 | ||
path: tests/Fixtures/TestTenantUser.php | ||
|
||
- | ||
message: "#^Call to an undefined method Mockery\\\\ExpectationInterface\\|Mockery\\\\HigherOrderMessage\\:\\:andReturn\\(\\)\\.$#" | ||
count: 3 | ||
path: tests/TestCase.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$callback of static method Illuminate\\\\Database\\\\Eloquent\\\\Factories\\\\Factory\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\:\\:guessFactoryNamesUsing\\(\\) expects callable\\(class\\-string\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>\\)\\: class\\-string\\<Illuminate\\\\Database\\\\Eloquent\\\\Factories\\\\Factory\\>, Closure\\(string\\)\\: non\\-falsy\\-string given\\.$#" | ||
count: 1 | ||
path: tests/TestCase.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
includes: | ||
- ./vendor/larastan/larastan/extension.neon | ||
- ./phpstan-baseline.laravel-10.neon | ||
|
||
parameters: | ||
level: 8 | ||
|
||
paths: | ||
- config | ||
- database | ||
- src | ||
- tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace DutchCodingCompany\FilamentSocialite\Traits; | ||
|
||
use Closure; | ||
|
||
trait CanBeHidden | ||
{ | ||
protected bool | Closure $isHidden = false; | ||
|
||
protected bool | Closure $isVisible = true; | ||
|
||
public function hidden(bool | Closure $condition = true): static | ||
{ | ||
$this->isHidden = $condition; | ||
|
||
return $this; | ||
} | ||
|
||
public function visible(bool | Closure $condition = true): static | ||
{ | ||
$this->isVisible = $condition; | ||
|
||
return $this; | ||
} | ||
|
||
public function isHidden(): bool | ||
{ | ||
if ($this->evaluate($this->isHidden)) { | ||
return true; | ||
} | ||
|
||
return ! $this->evaluate($this->isVisible); | ||
} | ||
|
||
public function isVisible(): bool | ||
{ | ||
return ! $this->isHidden(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters