A PHP client library for accessing Google APIs
This report summarizes scanner evidence for googleapis/google-api-php-client, a PHP project with 9,813 GitHub stars. SynthScan examined 13,620 lines of code across 92 source files, recording 105 pattern matches distributed across 5 syntactic categories. The legacy adjusted pattern signal is 8.3 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 101 finding(s).
Are imports declared and package/API names verified? 4 finding(s).
Are wrappers, guards, and repeated structures necessary? 95 finding(s).
Which changes need focused human review? 105 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 105 distinct pattern matches across 5 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/BaseTest.php | 156 | protected function checkServiceAccountCredentials() | CODE |
| LOW | tests/Google/ModelTest.php | 170 | public function testCollectionWithItemsFromConstructor() | CODE |
| LOW | tests/Google/ModelTest.php | 197 | public function testCollectionWithItemsFromSetter() | CODE |
| LOW | tests/Google/ModelTest.php | 244 | public function testPassingInstanceInConstructor() | CODE |
| LOW | tests/Google/ModelTest.php | 256 | public function testPassingInstanceInConstructorForMap() | CODE |
| LOW | tests/Google/ModelTest.php | 279 | public function testKeyTypePropertyConflict() | CODE |
| LOW | tests/Google/ClientTest.php | 262 | public function testDefaultLoggerAppEngine() | CODE |
| LOW | tests/Google/ClientTest.php | 274 | public function testLoggerFromConstructor() | CODE |
| LOW | tests/Google/ClientTest.php | 313 | public function testSetAccessTokenValidation() | CODE |
| LOW | tests/Google/ClientTest.php | 393 | public function testApplicationDefaultCredentials() | CODE |
| LOW | tests/Google/ClientTest.php | 408 | public function testApplicationDefaultCredentialsWithSubject() | CODE |
| LOW | tests/Google/ClientTest.php | 428 | public function testRefreshTokenSetsValues() | CODE |
| LOW | tests/Google/ClientTest.php | 463 | public function testRefreshTokenIsSetOnRefresh() | CODE |
| LOW | tests/Google/ClientTest.php | 499 | public function testRefreshTokenIsNotSetWhenNewRefreshTokenIsReturned() | CODE |
| LOW | tests/Google/ClientTest.php | 536 | public function testFetchAccessTokenWithAssertionFromEnv() | CODE |
| LOW | tests/Google/ClientTest.php | 552 | public function testFetchAccessTokenWithAssertionFromFile() | CODE |
| LOW | tests/Google/ClientTest.php | 568 | public function testFetchAccessTokenWithAssertionAddsCreated() | CODE |
| LOW | tests/Google/ClientTest.php | 584 | public function testBadSubjectThrowsException() | CODE |
| LOW | tests/Google/ClientTest.php | 692 | public function testOnGceCacheAndCacheOptions() | CODE |
| LOW | tests/Google/ClientTest.php | 733 | public function testFetchAccessTokenWithAssertionCache() | CODE |
| LOW | tests/Google/ClientTest.php | 790 | public function testExecuteSetsCorrectHeaders() | CODE |
| LOW | tests/Google/ClientTest.php | 874 | public function testCredentialsOptionWithFetchAuthTokenInterface() | CODE |
| LOW | tests/Google/ClientTest.php | 939 | public function testQueryParamsForAuthUrl() | CODE |
| LOW | tests/Google/ClientTest.php | 948 | public function testUniverseDomainMismatch() | CODE |
| LOW | tests/Google/AccessToken/VerifyTest.php | 73 | public function testLeewayIsUnchangedWhenPassingInJwt() | CODE |
| LOW | tests/Google/AuthHandler/AuthHandlerTest.php | 33 | public function testSetAccessTokenResultsInAuthCacheMiss() | CODE |
| LOW | tests/Google/Http/RESTTest.php | 92 | public function testRequestExceptionWithResponseIsHandled() | CODE |
| LOW | tests/Google/Http/RESTTest.php | 108 | public function testRequestExceptionWithoutResponseIsRethrown() | CODE |
| LOW | tests/Google/Http/MediaFileUploadTest.php | 138 | public function testGetResumeUriUsesStringHeaderValues() | CODE |
| LOW | tests/Google/Http/MediaFileUploadTest.php | 192 | public function testNextChunkWithMoreRemaining() | CODE |
| LOW | tests/Google/Http/BatchTest.php | 70 | public function testParseResponseMatchesResponsesToRequestsByContentId() | CODE |
| LOW | tests/Google/Task/ComposerTest.php | 54 | public function testRelatePathServiceName() | CODE |
| LOW⚡ | tests/Google/Task/RunnerTest.php | 49 | public function testRestRetryOffByDefault($errorCode, $errorBody = '{}') | CODE |
| LOW⚡ | tests/Google/Task/RunnerTest.php | 58 | public function testOneRestRetryWithError($errorCode, $errorBody = '{}') | CODE |
| LOW⚡ | tests/Google/Task/RunnerTest.php | 68 | public function testMultipleRestRetriesWithErrors( | CODE |
| LOW⚡ | tests/Google/Task/RunnerTest.php | 326 | public function testTaskRetryOffByDefault() | CODE |
| LOW⚡ | tests/Google/Task/RunnerTest.php | 334 | public function testOneTaskRetryWithError() | CODE |
| LOW⚡ | tests/Google/Task/RunnerTest.php | 343 | public function testMultipleTaskRetriesWithErrors() | CODE |
| LOW⚡ | tests/Google/Task/RunnerTest.php | 352 | public function testOneTaskRetryWithSuccess() | CODE |
| LOW⚡ | tests/Google/Task/RunnerTest.php | 362 | public function testMultipleTaskRetriesWithSuccess() | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 81 | public function testOneRestRetryWithSuccess($errorCode, $errorBody = '{}') | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 94 | public function testMultipleRestRetriesWithSuccess( | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 109 | public function testCustomRestRetryMapReplacesDefaults( | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 121 | public function testCustomRestRetryMapAddsNewHandlers() | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 138 | public function testCustomRestRetryMapWithCustomLimits($limit) | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 170 | public function testCurlRetryOffByDefault($errorCode, $errorMessage = '') | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 181 | public function testOneCurlRetryWithError($errorCode, $errorMessage = '') | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 193 | public function testMultipleCurlRetriesWithErrors( | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 207 | public function testOneCurlRetryWithSuccess($errorCode, $errorMessage = '') | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 221 | public function testMultipleCurlRetriesWithSuccess( | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 237 | public function testCustomCurlRetryMapReplacesDefaults( | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 252 | public function testCustomCurlRetryMapAddsNewHandlers() | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 270 | public function testCustomCurlRetryMapWithCustomLimits($limit) | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 375 | public function testTaskRetryWithCustomLimits($limit) | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 400 | public function testTaskWithManualRetries() | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 513 | public static function assertTaskTimeGreaterThanOrEqual( | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 695 | private function setNextTaskAllowedRetries($allowedRetries) | CODE |
| LOW | tests/Google/Task/RunnerTest.php | 709 | private function setNextTasksAllowedRetries($count, $allowedRetries) | CODE |
| LOW | tests/Google/Service/AdSenseTest.php | 56 | public function testAccountsReportGenerate() | CODE |
| LOW | tests/Google/Service/AdSenseTest.php | 75 | public function testAccountsAdClientsList() | CODE |
| 35 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/oauth-web.md | 72 | ### Step 1: Set authorization parameters | COMMENT |
| LOW | docs/oauth-web.md | 198 | ### Step 2: Redirect to Google's OAuth 2.0 server | COMMENT |
| LOW | docs/oauth-web.md | 216 | ### Step 3: Google prompts user for consent | COMMENT |
| LOW | docs/oauth-web.md | 222 | ### Step 4: Handle the OAuth 2.0 server response | COMMENT |
| LOW | docs/oauth-web.md | 257 | ### Step 5: Exchange authorization code for refresh and access tokens | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | README.md | 258 | POST https://datastore.googleapis.com/v1beta3/projects/YOUR_PROJECT_ID:runQuery?key=YOUR_API_KEY | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | UPGRADING.md | 173 | $user_to_impersonate = 'user@example.org'; | CODE |
| LOW | UPGRADING.md | 187 | $user_to_impersonate = 'user@example.org'; | CODE |
| LOW | tests/Google/ClientTest.php | 144 | $client->setLoginHint('bob@example.org'); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | UPGRADING.md | 101 | COMMENT |