-
Notifications
You must be signed in to change notification settings - Fork 3
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 #7 from worksome/disallow_resolve_function
Adds `resolve` to forbidden function all along with `app`
- Loading branch information
Showing
6 changed files
with
78 additions
and
3 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
13 changes: 13 additions & 0 deletions
13
tests/PHPStan/Laravel/DisallowAppUsageRule/Fixture/resolve_helper_in_namespace.php.inc
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,13 @@ | ||
<?php | ||
|
||
namespace Resolve\Services; | ||
|
||
class CallsResolveHelper | ||
{ | ||
public function method() | ||
{ | ||
return resolve('myService'); | ||
} | ||
} | ||
|
||
?> |
13 changes: 13 additions & 0 deletions
13
tests/PHPStan/Laravel/DisallowAppUsageRule/Fixture/resolve_helper_with_chain_calls.php.inc
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,13 @@ | ||
<?php | ||
|
||
namespace Resolve\Services; | ||
|
||
class CallsResolveHelper | ||
{ | ||
public function method() | ||
{ | ||
return \resolve('myService')->execute(); | ||
} | ||
} | ||
|
||
?> |
11 changes: 11 additions & 0 deletions
11
tests/PHPStan/Laravel/DisallowAppUsageRule/Fixture/resolve_helper_with_parameters.php.inc
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,11 @@ | ||
<?php | ||
|
||
class CallsResolveHelper | ||
{ | ||
public function method() | ||
{ | ||
return \resolve('myService', ['foo' => 'bar']); | ||
} | ||
} | ||
|
||
?> |
11 changes: 11 additions & 0 deletions
11
...s/PHPStan/Laravel/DisallowAppUsageRule/Fixture/skip_resolve_function_in_namespace.php.inc
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,11 @@ | ||
<?php | ||
|
||
class CallsOtherResolveHelper | ||
{ | ||
public function container() | ||
{ | ||
return \MyCustom\resolve(); | ||
} | ||
} | ||
|
||
?> |