Created
November 6, 2025 23:23
-
-
Save rlerdorf/33ce5759c5b9e538c04ac52d7114a4df to your computer and use it in GitHub Desktop.
Phan Demo - PHP 84, Phan v6-dev
This file contains hidden or 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
| <?php | |
| /** @phan-file-suppress PhanUnusedPublicNoOverrideMethodParameter,PhanUnreferencedClass,PhanUnusedVariable */ | |
| class Iam { } | |
| class GCECredentials { | |
| /** | |
| * @param Iam $iam [optional] An IAM instance. | |
| * @param string|string[] $scope [optional] the scope of the access request, | |
| * expressed either as an array or as a space-delimited string. | |
| * @param string $targetAudience [optional] The audience for the ID token. | |
| * @param string $quotaProject [optional] Specifies a project to bill for access | |
| * @param string $serviceAccountIdentity [optional] Specify a service | |
| * account identity name to use instead of "default". | |
| * @param string $universeDomain [optional] Specify a universe domain to use | |
| * instead of fetching one from the metadata server. | |
| * | |
| */ | |
| public function __construct( | |
| ?Iam $iam = null, | |
| $scope = null, | |
| $targetAudience = null, | |
| $quotaProject = null, | |
| $serviceAccountIdentity = null, | |
| ?string $universeDomain = null | |
| ) { | |
| '@phan-debug-var $quotaProject'; | |
| } | |
| } | |
| function foo(?string $quota_project): void { | |
| $fetcher = new GCECredentials(scope: "foo", quotaProject: $quota_project); | |
| } | |
| foo(null); |
This file contains hidden or 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
| { | |
| "phpVersion": "84", | |
| "phanVersion": "v6-dev", | |
| "astVersion": "1.1.3", | |
| "plugins": "0", | |
| "fileOrder": [ | |
| "general.php" | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment