Public report of aws/aws-sdk-php, published 18 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 18 November 2026, 00:35 UTC · Survey ID cd_9e3d9662bb004783a80d956ee6aca9de

aws/aws-sdk-php

Measured 18 November 2026, 00:30 UTC, at code version 4fa37d0

CAI score 61.9out of 100 Adequate
CriticalWeakAdequateStrongExemplary
Up 5.7 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 342,014 lines of product code in 462 projects, tests not counted · Estimated rebuild effort: about 3.4 person-years · Weakest lens: Code Health, 55.1

Findings by how serious they are

8 critical 340 serious 142 minor

20 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
18 November 2026, 00:30 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

47of 47 dimensions measured by tools.
477of 490 findings point to an exact file and line, so you can open each one in the code. The other 13 concern the repository as a whole, such as missing documentation.
47dimensions across 5 lenses, read from 342,014 lines of product code in 462 projects.
Chapters

Executive summary

aws/aws-sdk-php falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 61.9 out of 100 and is rated Adequate, and two of its eight critical findings are security problems in the build pipeline.

Code Health, at 55.1, is the weakest lens and counts most in the score. The best first steps are raising the type checker to a stricter level and recording design decisions, each worth about 5.1 points. Raising Code Health to 70 would lift the score to about 65.8.

One pipeline tool is referenced by a changeable name, so the build pipeline can be tampered with. One secret can leak from the build pipeline, and four parts of the code are no longer understood by anyone working on it. Pinning the tool to an exact version, limiting the secret to its own step and having someone learn the forgotten files would close these risks. The loop of parts of the code that depend on each other needs breaking by moving the shared parts into a project of their own.

The product code is 342,014 lines, about €490,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Code Health 55.1 · counts for 47%Maturity 57.7 · counts for 26%Production Readiness 64.7 · counts for 14%Security and Compliance 93.3 · counts for 8%Architecture 96.7 · counts for 4%

If Code Health rose from 55.1 to 70, the lowest score rated Strong, the score would rise from 61.9 to about 65.8.

Code composition: what the lines of code are
Product code 77%Tests 23%
New since the last survey: 87 findings

These 87 critical or serious findings weren't in the previous survey, on 5 November 2026.

  • Cyclomatic Complexity · RestSerializer.serialize (cyclomatic 30) src/Api/Serializer/RestSerializer.php
  • Cyclomatic Complexity · AbstractRestParser.__invoke (cyclomatic 18) src/Api/Parser/AbstractRestParser.php
  • Cyclomatic Complexity · CredentialProvider.loadRoleProfile (cyclomatic 16) src/Credentials/CredentialProvider.php
  • Cyclomatic Complexity · functions.parse_ini_section_with_subsections (cyclomatic 16) src/functions.php
  • Cognitive Complexity · RestSerializer.serialize (cognitive 39) src/Api/Serializer/RestSerializer.php
  • Cognitive Complexity · ClientResolver.resolveArgs (cognitive 33) src/ClientResolver.php
  • Cognitive Complexity · HttpRequestBindingPlanProvider.compile (cognitive 18) src/Api/Serde/Http/HttpRequestBindingPlanProvider.php
  • Cognitive Complexity · HttpResponseBindingPlanProvider.compile (cognitive 17) src/Api/Serde/Http/HttpResponseBindingPlanProvider.php
  • Cognitive Complexity · RetryMiddleware.isThrottlingError (cognitive 17) src/Retry/V3/RetryMiddleware.php
  • Cognitive Complexity · RestSerializer.expandUriTemplate (cognitive 16) src/Api/Serializer/RestSerializer.php
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) src/ClientSideMonitoring/ConfigurationProvider.php
  • Code Duplication · Edited copy of a member (88 corresponding lines) src/Crypto/DecryptionTraitV2.php
  • Code Duplication · Edited copy of a member (94 corresponding lines) src/Api/Cbor/CborEncoder.php
  • Code Duplication · Edited copy of a member (78 corresponding lines) src/S3/Crypto/S3EncryptionClientV2.php
  • Code Duplication · Edited copy of a member (61 corresponding lines) src/Crypto/DecryptionTraitV2.php
  • Code Duplication · Edited copy of a member (50 corresponding lines) src/S3/Crypto/S3EncryptionClient.php
  • Code Duplication · Edited copy of a member (48 corresponding lines) src/Api/Cbor/CborEncoder.php
  • Code Duplication · Edited copy of a member (64 corresponding lines) src/Api/Parser/AbstractRestParser.php
  • Code Duplication · Edited copy of a member (50 corresponding lines) src/Crypto/DecryptionTraitV2.php
  • Code Duplication · Edited copy of a member (27 corresponding lines) src/S3/Crypto/S3EncryptionMultipartUploader.php
  • Code Duplication · Edited copies of one member (4 members, 30+ corresponding lines) src/Endpoint/UseDualstackEndpoint/ConfigurationProvider.php
  • Code Duplication · Edited copy of a member (45 corresponding lines) src/Api/Serde/Json/JsonDecodePlanProvider.php
  • Code Duplication · Edited copy of a member (23 corresponding lines) src/S3/RegionalEndpoint/ConfigurationProvider.php
  • Code Duplication · Edited copy of a member (42 corresponding lines) src/Crypto/EncryptionTrait.php
  • Code Duplication · Edited copy of a member (31 corresponding lines) src/Arn/S3/OutpostsAccessPointArn.php
  • Code Duplication · Edited copy of a member (27 corresponding lines) src/Crypto/AesDecryptingStream.php
  • Code Duplication · Edited copy of a member (35 corresponding lines) src/Credentials/CredentialProvider.php
  • Code Duplication · Edited copies of one member (3 members, 22+ corresponding lines) src/S3/Crypto/S3EncryptionMultipartUploader.php
  • Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) src/Endpoint/UseDualstackEndpoint/ConfigurationProvider.php
  • Code Duplication · Edited copy of a member (21 corresponding lines) src/S3/S3Transfer/DirectoryDownloader.php
  • Code Duplication · Edited copy of a member (27 corresponding lines) src/Api/Serde/Http/HttpRequestBindingPlanProvider.php
  • Code Duplication · Edited copy of a member (17 corresponding lines) src/CloudFront/CloudFrontClient.php
  • Code Duplication · Edited copy of a member (19 corresponding lines) src/Api/Cbor/CborEncoder.php
  • Code Duplication · Edited copy of a member (19 corresponding lines) src/Api/ErrorParser/JsonRpcErrorParser.php
  • Code Duplication · Edited copy of a member (25 corresponding lines) src/ClientResolver.php
  • Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) src/Api/Parser/AbstractRestParser.php
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/S3/PostObject.php
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/ClientResolver.php
  • Code Duplication · Edited copy of a member (17 corresponding lines) src/AbstractConfigurationProvider.php
  • Code Duplication · Edited copies of one member (4 members, 18+ corresponding lines) src/EndpointDiscovery/ConfigurationProvider.php
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/Crypto/AesDecryptingStream.php
  • Code Duplication · Edited copy of a member (13 corresponding lines) src/Arn/S3/OutpostsAccessPointArn.php
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/Crypto/MetadataEnvelope.php
  • Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) src/Credentials/CredentialProvider.php
  • Code Duplication · Edited copy of a member (24 corresponding lines) src/S3/S3Transfer/AbstractMultipartDownloader.php
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/S3/MultipartCopy.php
  • Code Duplication · Edited copy of a member (9 corresponding lines) src/EndpointV2/Bdd/BddRuleset.php
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/EndpointV2/Bdd/BddResultResolver.php
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/AbstractConfigurationProvider.php
  • Code Duplication · Edited copy of a member (20 corresponding lines) src/Api/Service.php
  • Code Duplication · Edited copy of a member (17 corresponding lines) src/S3/S3ClientTrait.php
  • Code Duplication · Edited copy of a member (20 corresponding lines) src/S3/S3Transfer/Progress/DirectoryProgressTracker.php
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/S3/S3Transfer/AbstractMultipartUploader.php
  • Code Duplication · Edited copy of a member (4 corresponding lines) src/Signature/DpopSignature.php
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/AwsClient.php
  • Code Duplication · Edited copy of a member (13 corresponding lines) src/S3/S3Transfer/Models/UploadDirectoryRequest.php
  • Code Duplication · Edited copy of a member (12 corresponding lines) src/DynamoDb/DynamoDbClient.php
  • Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) src/CloudSearchDomain/CloudSearchDomainClient.php
  • Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) src/DefaultsMode/ConfigurationProvider.php
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/Glacier/GlacierClient.php
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/S3/Crypto/S3EncryptionClient.php
  • Code Duplication · Edited copy of a member (9 corresponding lines) src/Crypto/AesGcmDecryptingStream.php
  • Code Duplication · Edited copy of a member (4 corresponding lines) src/Api/Serializer/RestJsonSerializer.php
  • Code Duplication · Edited copy of a member (4 corresponding lines) src/S3/MultipartUploader.php
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/S3/S3Transfer/Progress/DirectoryTransferProgressSnapshot.php
  • Code Duplication · Edited copies of one member (4 members, 3+ corresponding lines) src/EndpointV2/EndpointV2Middleware.php
  • Code Duplication · Edited copy of a member (3 corresponding lines) src/Auth/AuthSelectionMiddleware.php
  • Code Duplication · Edited copy of a member (5 corresponding lines) src/S3/S3Transfer/Progress/DirectoryTransferProgressSnapshot.php
  • Code Duplication · Edited copy of a member (6 corresponding lines) src/Api/Parser/AbstractParser.php
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/Api/Serde/Json/JsonDecodePlanProvider.php
  • Code Duplication · Duplicated block (19–20 lines × 2) src/ClientResolver.php
  • Code Duplication · Duplicated block (15 lines × 2) src/Credentials/CredentialProvider.php
  • Code Duplication · Duplicated block (8 lines × 2) src/Api/Serializer/RestSerializer.php
  • Coupling · Circular dependency src/AwsClient.php
  • Coupling · Off the main sequence: src/Handler
  • Coupling · Off the main sequence: src/Exception
  • Coupling · Off the main sequence: src/Configuration
  • Coupling · Off the main sequence: src
  • Coupling · Off the main sequence: src/Api
  • Coupling · Off the main sequence: src/Arn
  • Churn × Complexity Hotspots · Hotspot: src/Credentials/CredentialProvider.php src/Credentials/CredentialProvider.php
  • Churn × Complexity Hotspots · Repeated repair: src/Api/Parser/NonSeekableStreamDecodingEventStreamIterator.php src/Api/Parser/NonSeekableStreamDecodingEventStreamIterator.php
  • Knowledge Freshness · Orphaned knowledge src/S3/StreamWrapper.php
  • Knowledge Freshness · Orphaned knowledge src/Crypto/EncryptionTraitV3.php
  • Knowledge Freshness · Orphaned knowledge src/S3/Crypto/S3EncryptionClientV2.php
  • Exception handling · Swallowed exception (caught, then discarded) src/Api/Serde/Http/HttpRequestBindingPlanProvider.php
  • Exception handling · Swallowed exception (caught, then discarded) src/Api/Serde/Http/HttpResponseBindingPlanProvider.php

We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 129 findings

These 129 critical or serious findings were in the previous survey, on 5 November 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · RetryMiddlewareV2.isRetryable (cyclomatic 22) src/RetryMiddlewareV2.php
  • Cognitive Complexity · ClientResolver.resolve (cognitive 33) src/ClientResolver.php
  • Cognitive Complexity · RetryMiddlewareV2.isRetryable (cognitive 27) src/RetryMiddlewareV2.php
  • Cognitive Complexity · ClientResolver._apply_defaults (cognitive 18) src/ClientResolver.php
  • Code Duplication · Edited copy of a member (18 corresponding lines) src/ClientSideMonitoring/ConfigurationProvider.php
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) src/ClientSideMonitoring/ConfigurationProvider.php
  • Code Duplication · Duplicated block (124 lines × 2) src/Api/Cbor/CborDecoder.php
  • Code Duplication · Duplicated block (45 lines × 2) src/Api/Cbor/CborDecoder.php
  • Code Duplication · Duplicated block (32–38 lines × 2) src/S3/S3Transfer/Models/ResumableDownload.php
  • Code Duplication · Duplicated block (24–26 lines × 2) src/Retry/V3/RetryMiddleware.php
  • Code Duplication · Duplicated block (24 lines × 2) src/RetryMiddleware.php
  • Code Duplication · Duplicated block (16–20 lines × 2) src/Credentials/CredentialProvider.php
  • Code Duplication · Duplicated block (18–19 lines × 2) src/Retry/V3/RetryMiddleware.php
  • Code Duplication · Duplicated block (18 lines × 2) src/Retry/V3/RetryMiddleware.php
  • Code Duplication · Duplicated block (14–16 lines × 2) src/Retry/V3/RetryMiddleware.php
  • Code Duplication · Duplicated block (13 lines × 2) src/S3/S3Client.php
  • Code Duplication · Duplicated block (11 lines × 2) src/Endpoint/UseDualstackEndpoint/ConfigurationProvider.php
  • Code Duplication · Duplicated block (9 lines × 8) src/ClientSideMonitoring/ConfigurationProvider.php
  • Code Duplication · Duplicated block (9 lines × 2) src/Arn/S3/OutpostsAccessPointArn.php
  • Code Duplication · Duplicated block (19 lines × 2) src/Credentials/AssumeRoleWithWebIdentityCredentialProvider.php
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/arc-region-switch/2022-07-26/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/artifact/2018-05-10/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/artifact/2018-05-10/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/artifact/2018-05-10/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/artifact/2018-05-10/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/artifact/2018-05-10/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/clouddirectory/2017-01-11/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cloudformation/2010-05-15/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cloudformation/2010-05-15/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cloudfront/2015-07-27/paginators-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cloudfront/2016-01-28/paginators-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cloudfront/2016-08-01/paginators-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cloudfront/2016-08-20/paginators-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cloudfront/2016-09-07/paginators-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cloudfront/2016-09-29/paginators-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cloudfront/2016-11-25/paginators-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cloudfront/2017-03-25/paginators-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cloudfront/2017-10-30/paginators-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cloudfront/2018-06-18/paginators-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cloudfront/2018-11-05/paginators-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cloudfront/2019-03-26/paginators-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cloudfront/2020-05-31/paginators-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cloudwatchomni/2025-01-01/examples-1.json
  • Secret Scanning · Leaked secret: hardcoded-credential src/data/cognito-idp/2016-04-18/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cognito-idp/2016-04-18/examples-1.json
  • Secret Scanning · Leaked secret: signing-key src/data/cognito-idp/2016-04-18/examples-1.json
  • Secret Scanning · Leaked secret: hardcoded-credential src/data/cognito-idp/2016-04-18/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/cognito-idp/2016-04-18/examples-1.json
  • Secret Scanning · Leaked secret: signing-key src/data/cognito-idp/2016-04-18/examples-1.json
  • Secret Scanning · Leaked secret: hardcoded-credential src/data/ds/2015-04-16/examples-1.json
  • Secret Scanning · Leaked secret: hardcoded-credential src/data/ds/2015-04-16/examples-1.json
  • Secret Scanning · Leaked secret: hardcoded-credential src/data/ds/2015-04-16/examples-1.json
  • Secret Scanning · Leaked secret: hardcoded-credential src/data/ds/2015-04-16/examples-1.json
  • Secret Scanning · Leaked secret: hardcoded-credential src/data/ds/2015-04-16/examples-1.json
  • Secret Scanning · Leaked secret: hardcoded-credential src/data/ds/2015-04-16/examples-1.json
  • Secret Scanning · Leaked secret: hardcoded-credential src/data/ds/2015-04-16/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/ec2/2016-11-15/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/ec2/2016-11-15/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/ecr/2015-09-21/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/ecs/2014-11-13/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/freetier/2023-09-07/examples-1.json
  • Secret Scanning · Leaked secret: hardcoded-credential src/data/iam/2010-05-08/examples-1.json
  • Secret Scanning · Leaked secret: hardcoded-credential src/data/iam/2010-05-08/examples-1.json
  • Secret Scanning · Leaked secret: hardcoded-credential src/data/iam/2010-05-08/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/invoicing/2024-12-01/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/invoicing/2024-12-01/examples-1.json
  • Secret Scanning · Leaked secret: signing-key src/data/invoicing/2024-12-01/examples-1.json
  • Secret Scanning · Leaked secret: hardcoded-credential src/data/kms/2014-11-01/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/kms/2014-11-01/examples-1.json
  • Secret Scanning · Leaked secret: signing-key src/data/kms/2014-11-01/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/kms/2014-11-01/examples-1.json
  • Secret Scanning · Leaked secret: signing-key src/data/kms/2014-11-01/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/kms/2014-11-01/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/kms/2014-11-01/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/kms/2014-11-01/examples-1.json
  • Secret Scanning · Leaked secret: signing-key src/data/kms/2014-11-01/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/kms/2014-11-01/examples-1.json
  • Secret Scanning · Leaked secret: signing-key src/data/kms/2014-11-01/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/kms/2014-11-01/examples-1.json
  • Secret Scanning · Leaked secret: signing-key src/data/kms/2014-11-01/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/kms/2014-11-01/examples-1.json
  • Secret Scanning · Leaked secret: signing-key src/data/kms/2014-11-01/examples-1.json
  • Secret Scanning · Leaked secret: hardcoded-credential src/data/mailmanager/2023-10-17/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/marketplace-agreement/2020-03-01/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/marketplace-discovery/2026-02-05/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/network-security-manager/2025-10-30/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/qapps/2023-11-27/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/qapps/2023-11-27/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/qapps/2023-11-27/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/qapps/2023-11-27/examples-1.json
  • Secret Scanning · Leaked secret: hardcoded-credential src/data/rds/2014-10-31/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/rtbfabric/2023-05-15/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/rtbfabric/2023-05-15/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/rtbfabric/2023-05-15/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/rtbfabric/2023-05-15/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/s3/2006-03-01/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/sagemaker-featurestore-runtime/2020-07-01/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/security-ir/2018-05-10/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/securityhub/2018-10-26/examples-1.json
  • Secret Scanning · Leaked secret: high-entropy-secret src/data/securityhub/2018-10-26/examples-1.json
Rebuild cost: about €490,000 · Estimate
Cost to rebuild€160,000 to €820,000, for 2,717 to 8,620 hours of work, about 3.4 person-years for 2 to 7 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.8 at a score of 62. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 342,014 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Raise PHPStan to level 8 (`level: 8` in `phpstan.neon.dist`, or `max`) or Psalm to `errorLevel="3"` or stricter, so `?Type` is a type the checker holds you to; generate a baseline for what that surfaces only to pay it down, not to keep it.
Then resolve the baselined nullness errors rather than adding to them: each is a call on a value the checker showed could be null — narrow it (`if ($x === null) { … }`, `?->`, an early return), make the property non-nullable and initialise it in the constructor, or change the return type so the null cannot arrive.
Raises the score by about 5.1 points · Medium effort · Nullable reference types
2
Record your significant design decisions.
Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Raises the score by about 5.1 points · Medium effort · Architecture documentation
3
Resolve the 4 Orphaned knowledge finding(s) in Knowledge Freshness — start with StreamWrapper.php, S3EncryptionClientV3.php, EncryptionTraitV3.php.
Raises the score by about 1.7 points · Low effort · Knowledge Freshness

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €490,000 to build again, about 3.4 person-years of work. Its weakest lens is Code Health, at 55.1 (Adequate). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Raise PHPStan to level 8 (`level: 8` in `phpstan.neon.dist`, or `max`) or Psalm to `errorLevel="3"` or stricter, so `?Type` is a type the checker holds you to; generate a baseline for what that surfaces only to pay it down, not to keep it. Of all the actions in this report, it raises the score most for the work it takes: about 5.1 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch build build src src build->src src/Api Api build->src/Api src/DynamoDb DynamoDb build->src/DynamoDb src/S3 S3 build->src/S3 src->src/Api src/Auth Auth src->src/Auth src/Configuration Configuration src->src/Configuration src/Credentials Credentials src->src/Credentials src/Endpoint Endpoint src->src/Endpoint src/EndpointV2 EndpointV2 src->src/EndpointV2 src/Exception Exception src->src/Exception src/Retry Retry src->src/Retry src/Signature Signature src->src/Signature src/Token Token src->src/Token src/Api->src/EndpointV2 src/Api->src/Exception src/Auth->src/Api src/Auth->src/Exception src/Identity Identity src/Auth->src/Identity src/Credentials->src/Api src/Credentials->src/Configuration src/Credentials->src/Exception src/Sts Sts src/Credentials->src/Sts src/Credentials->src/Token src/Crypto Crypto src/Crypto->src src/Crypto->src/Exception src/DynamoDb->src src/DynamoDb->src/Api src/DynamoDb->src/Exception src/DynamoDb->src/Retry src/Endpoint->src/Exception src/Endpoint->src/Sts src/EndpointV2->src/Auth src/EndpointV2->src/Exception src/Multipart Multipart src/Exception->src/Multipart src/Identity->src src/Identity->src/Credentials src/Identity->src/S3 src/Multipart->src src/Rds Rds src/Rds->src src/Rds->src/Api src/Rds->src/Credentials src/Rds->src/Exception src/Rds->src/Signature src/Retry->src/Configuration src/Retry->src/Exception src/S3->src src/S3->src/Api src/S3->src/Configuration src/S3->src/Credentials src/S3->src/Crypto src/S3->src/Endpoint src/S3->src/Exception src/S3->src/Multipart src/S3->src/Retry src/S3->src/Signature src/S3Control S3Control src/S3Control->src src/S3Control->src/Api src/S3Control->src/Endpoint src/S3Control->src/Exception src/S3Control->src/S3 src/Signature->src/Credentials src/Signature->src/Exception src/Signature->src/Token src/Sts->src src/Sts->src/Exception src/Sts->src/Retry src/Token->src/Configuration src/Token->src/Exception src/Token->src/Identity __more__ +442 more projects

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

950 modules, with 985 dependencies between them. One loop runs through 8 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 910 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 Api2 Api.Cbor3 Arn4 EndpointV2.Ruleset5 Identity6 S3.S3Transfer.Progress7 Api.Serde.Http8 Api.Serde.Json9 Api.Serde.Query10 Api.Serde.Xml11 Arn.S312 EndpointV2.Bdd13 Multipart14 S3.S3Transfer.Utils15 Token16 Exception17 Credentials18 Aws19 Api.Parser20 Api.Serializer21 Auth22 ClientSideMonitoring23 EndpointDiscovery24 EndpointV225 Glacier26 Kms27 Retry28 S3.Exception29 S3.S3Transfer.Models30 S3Control31 Api.ErrorParser32 Crypto33 DynamoDb34 Retry.V335 S336 CloudTrail37 Identity.S338 S3.Crypto39 S3.Parser40 S3.S3Transfer
1 Api
2 Api.Cbor
3 Arn
4 EndpointV2.Ruleset
5 Identity
6 S3.S3Transfer.Progress
7 Api.Serde.Http8
8 Api.Serde.Json3
9 Api.Serde.Query3
10 Api.Serde.Xml5
11 Arn.S37
12 EndpointV2.Bdd4
13 Multipart4
14 S3.S3Transfer.Utils1
15 Token11
16 Exception113
17 Credentials111
18 Aws1311
19 Api.Parser231117
20 Api.Serializer20111314
21 Auth11
22 ClientSideMonitoring29
23 EndpointDiscovery14
24 EndpointV22211
25 Glacier14
26 Kms1
27 Retry2
28 S3.Exception232
29 S3.S3Transfer.Models722
30 S3Control1113
31 Api.ErrorParser10153
32 Crypto3
33 DynamoDb21
34 Retry.V3112
35 S3922122641
36 CloudTrail13
37 Identity.S321
38 S3.Crypto21010
39 S3.Parser3811
40 S3.S3Transfer827156
Uses a module listed above itPart of a loopThe module itself
1 Api2 Api.Cbor3 Arn4 EndpointV2.Ruleset5 Identity6 S3.S3Transfer.Progress7 Api.Serde.Http8 Api.Serde.Json9 Api.Serde.Query10 Api.Serde.Xml11 Arn.S312 EndpointV2.Bdd13 Multipart14 S3.S3Transfer.Utils15 Token16 Exception17 Credentials18 Aws19 Api.Parser20 Api.Serializer21 Auth22 ClientSideMonitoring23 EndpointDiscovery24 EndpointV225 Glacier26 Kms27 Retry28 S3.Exception29 S3.S3Transfer.Models30 S3Control31 Api.ErrorParser32 Crypto33 DynamoDb34 Retry.V335 S336 CloudTrail37 Identity.S338 S3.Crypto39 S3.Parser40 S3.S3TransferApi1Api.Cbor2Arn3EndpointV2.Ruleset4Identity5S3.S3Transfer.Progress6Api.Serde.Http7Api.Serde.Json8Api.Serde.Query9Api.Serde.Xml10Arn.S311EndpointV2.Bdd12Multipart13S3.S3Transfer.Utils14Token15Exception16Credentials17Aws18Api.Parser19Api.Serializer20Auth21ClientSideMonitoring22EndpointDiscovery23EndpointV224Glacier25Kms26Retry27S3.Exception28S3.S3Transfer.Models29S3Control30Api.ErrorParser31Crypto32DynamoDb33Retry.V334S335CloudTrail36Identity.S337S3.Crypto38S3.Parser39S3.S3Transfer408335744111113111131123111720111314112914221114122327221113101533211129221226411321210103811827156+910 more modules (most-connected shown)

At a glance — Code Health · 55.1 · Adequate · gated by X5 ·

At a glance — Architecture · 96.7 · Exemplary ·

At a glance — Maturity · 57.7 · Adequate · gated by M2 ·

At a glance — Readiness · 64.7 · Adequate · gated by P7 ·

At a glance — Security · 93.3 · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A05:2025 — Injection3High / Critical

Roadmap

Top priorities: Raise PHPStan to level 8 (`level: 8` in `phpstan.neon.dist`, or `max`) or Psalm to `errorLevel="3"` or stricter, so `?Type` is a type the checker holds you to; generate a baseline for what that surfaces only to pay it down, not to keep it. Then resolve the baselined nullness errors rather than adding to them: each is a call on a value the checker showed could be null — narrow it (`if ($x === null) { … }`, `?->`, an early return), make the property non-nullable and initialise it in the constructor, or change the return type so the null cannot arrive; Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them; Swallowed exception (caught, then discarded).

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Raise PHPStan to level 8 (`level: 8` in `phpstan.neon.dist`, or `max`) or Psalm to `errorLevel="3"` or stricter, so `?Type` is a type the checker holds you to; generate a baseline for what that surfaces only to pay it down, not to keep it. Then resolve the baselined nullness errors rather than adding to them: each is a call on a value the checker showed could be null — narrow it (`if ($x === null) { … }`, `?->`, an early return), make the property non-nullable and initialise it in the constructor, or change the return type so the null cannot arrive.+5.1 ptsMediumNullable reference types
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+5.1 ptsMediumArchitecture documentation
Resolve the 4 Orphaned knowledge finding(s) in Knowledge Freshness — start with StreamWrapper.php, S3EncryptionClientV3.php, EncryptionTraitV3.php.+1.7 ptsLowKnowledge Freshness
Swallowed exception (caught, then discarded)+2.9 ptsMediumException handling
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.+1.9 ptsMediumDocumentation (README)
Give every client an explicit bound: `new Client(['timeout' => 10, 'connect_timeout' => 3])` for Guzzle (whose default is to wait forever), `CURLOPT_TIMEOUT`/`CURLOPT_CONNECTTIMEOUT` before `curl_exec`, `timeout`/`max_duration` on Symfony HttpClient (or `framework.http_client.default_options`), and a stream-context `timeout` or `connection_timeout` for `file_get_contents`/`SoapClient`. In Drupal, use the `http_client` service, which carries core's site-wide timeout, rather than `new Client()`. Add retries with back-off (Guzzle `Middleware::retry`, Symfony `RetryableHttpClient`, Laravel `->retry()`) around dependencies that fail.+1.9 ptsMediumOutbound HTTP resilience
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).+1.5 ptsMediumDR & Backup
Resolve the 97 Orphaned file finding(s) in Knowledge Freshness — start with ConfigurationProvider.php (8), MultipartUploader.php (2), Service.php.+1.3 ptsMediumKnowledge Freshness

File quality

Per-file score 0–10 — a quality signature. Of 127 files carrying findings, judged against the Production bar: 0% slop · 46% mixed · 54% near-clean.

FileScoreBandWorst signal
src/ClientResolver.php4.8MixedCognitive Complexity: ClientResolver.resolveArgs (cognitive 33)
src/AwsClient.php5.8MixedCoupling: Circular dependency
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
src/Api/Service.php6.3MixedGod Classes: TooManyMethods: Service
src/Api/Cbor/CborDecoder.php7.0MixedCyclomatic Complexity: CborDecoder.decodeValue (cyclomatic 96)
src/Api/Cbor/CborEncoder.php7.0MixedCyclomatic Complexity: CborEncoder.encodeValue (cyclomatic 24)
src/Credentials/CredentialProvider.php7.0MixedCyclomatic Complexity: CredentialProvider.process (cyclomatic 18)
src/Crypto/DecryptionTraitV2.php7.0MixedCognitive Complexity: DecryptionTraitV2.validateOptionsAndEnvelope (cognitive 16)
tests/S3/S3EndpointMiddlewareTest.php7.0MixedTest Quality: No assertions: testAppliesAccelerateDualStackEndpointToCommand
src/S3/S3Client.php7.0MixedCognitive Complexity: S3Client.getEncodingTypeMiddleware (cognitive 23)
src/Retry/V3/RetryMiddleware.php7.0MixedCyclomatic Complexity: RetryMiddleware.__invoke (cyclomatic 25)
build/docs/classes/DocsBuilder.php7.0MixedCyclomatic Complexity: DocsBuilder.createHtmlForOperation (cyclomatic 22)
src/S3/BucketEndpointArnMiddleware.php7.0MixedCyclomatic Complexity: BucketEndpointArnMiddleware.validateArn (cyclomatic 21)
src/Api/Parser/AbstractRestParser.php7.0MixedCyclomatic Complexity: AbstractRestParser.extractHeader (cyclomatic 20)
src/functions.php7.1MixedCyclomatic Complexity: functions.parse_ini_file (cyclomatic 44)
src/ClientSideMonitoring/ConfigurationProvider.php7.1MixedCode Duplication: Members sharing a duplicated core (5 members, 50+ identical tokens)
src/S3/Crypto/S3EncryptionMultipartUploader.php7.1MixedCode Duplication: Edited copy of a member (27 corresponding lines)
src/Cbor/CborDecoder.php7.1MixedCyclomatic Complexity: CborDecoder.decodeValue (cyclomatic 96)
src/Api/Serializer/RestSerializer.php7.1MixedCyclomatic Complexity: RestSerializer.serialize (cyclomatic 30)
src/S3/Crypto/S3EncryptionClient.php7.1MixedCode Duplication: Edited copy of a member (50 corresponding lines)

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 8

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 340

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 142

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 20

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 47 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 47 dimensions across the health lenses
D1D2D3D4D5D6D10D13D15D16D17D19D27D29D31D34D35D44AX10AX3AX4AX6AX8M1M2M3M4P1P10P11P2P3P5P6P7X14X16X18X19X21X25X27X28X29X3X30X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 477 of 490 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1ec0f-9aa4-70bd-8af3-4fa3cbafd616.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D4 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 104 duplicated block group(s) on this row were found in the languages this pass could tokenize, and they do NOT cover all of this repository's production source: .php (331,011 lines, 100% of production source) went unread, because no language model this pass could load exposed a clone-unit token stream for those file kinds. Duplication in that source is UNMEASURED — its absence from the count above is a gap in this analyzer's language coverage, not a finding that the code is free of duplication.
  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT READ here — but this repository measures it: a coverage step in CI (`phpunit --testsuite=unit --coverage`), uploaded by `codecov/codecov-action` and a Codecov configuration (codecov.yml, target 91%) shows that coverage is collected and tracked in your own CI. The built-in collector has no runner for this ecosystem (.php), so the analyzer could not read the number — a gap in the analyzer's language coverage, not an unmeasured repo. Not scored.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository declares a PHPUnit suite (phpunit.xml, 289 `*Test.php` files, run by `vendor/bin/phpunit`), but it was not re-run: the analyzer image carries no Composer to install the suite's runner from composer.lock, so the suite cannot be built or started here. Flakiness couldn't be assessed. Not scored — this is a limit of the analyzer, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 7 direct Composer requirement(s) were read, but the outdated signal needs Packagist, and no committed composer.lock resolves them to releases, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D14 License Compliance — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — this repository declares a composer.json but commits no composer.lock this pass can read, so the set of packages it installs is not on disk: its composer.json states version CONSTRAINTS, and Composer's guidance is that a library leaves the lock uncommitted. Producing the graph needs Composer's solver, which this pass does not run, and grading whichever release happens to be newest today would be a verdict about a dependency graph nobody resolved. NOT a finding that this repository's licences are compliant: this dimension asserts nothing about its licensing in either direction.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (331011 LoC, 1317 module-visible types across 948 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
  • D28 Secrets (history) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `gitleaks` TIMED OUT after 145.9s against a 145.8s budget, so we killed its process tree. The budget is ours; the work may simply be larger than it allows. Nothing about this repository is asserted by the absence of a result; the budget is ours to raise, and raising it is our backlog item, not an action for this repository's owner.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `src/Crypto/DecryptionTraitV2.php`, `src/Crypto/DecryptionTraitV3.php`, `src/EndpointV2/Bdd/BddEvaluator.php`, `src/EndpointV2/Bdd/BddResultResolver.php`, `src/EndpointV2/Bdd/BddRuleset.php`, … (+9 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in src/data/qapps/2023-11-27/examples-1.json.php, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust, Java and Kotlin source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust, Java or Kotlin was found, and this repository's PHP is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby, Scala or Rust was found, and this repository's PHP is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Kotlin, Java, Rust and Elixir source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Kotlin, Java, Rust or Elixir was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Kotlin, Rust, Java and Elixir source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Kotlin, Rust, Java or Elixir was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Python, Dart, Ruby, Scala, Kotlin, Rust, Go, Swift, Elixir, Erlang, F# and Visual Basic source only, and no C# was loaded and no JavaScript/TypeScript, Java, Python, Dart, Ruby, Scala, Kotlin, Rust, Go, Swift, Elixir, Erlang, F# or Visual Basic was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala, Rust, Go, Swift, Erlang, F# and Visual Basic source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity6.1 / 10Adequate✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 6.1 / 10 · rule-coverage 100% · ceiling Prevented

33 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was CborDecoder.decodeValue at 96. A further 1 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being PhpstanShapeFormatter.dispatchType at 20 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: build/PhpstanShapeFormatter.php (PhpstanShapeFormatter.dispatchType at 20). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

CborDecoder.decodeValue (cyclomatic 96) · ×2src/Api/Cbor/CborDecoder.php:78
CborDecoder.decodeIndefiniteString (cyclomatic 16) · ×2src/Api/Cbor/CborDecoder.php:527
XmlBody.formatPlan (cyclomatic 48)src/Api/Serializer/XmlBody.php:58
XmlParser.parsePlan (cyclomatic 46)src/Api/Parser/XmlParser.php:34
functions.parse_ini_file (cyclomatic 44)src/functions.php:412

+ 26 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 2 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with CborDecoder.decodeValue (cyclomatic 96), CborDecoder.decodeValue (cyclomatic 96). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 6.1 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity5.0 / 10Weak✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Prevented

74 method(s) exceeded the cognitive complexity threshold of 15; the worst was CborDecoder.decodeValue at 175.

CborDecoder.decodeValue (cognitive 175) · ×2src/Api/Cbor/CborDecoder.php:78
CborDecoder.decodeIndefiniteString (cognitive 33) · ×2src/Api/Cbor/CborDecoder.php:527
XmlBody.formatPlan (cognitive 92)src/Api/Serializer/XmlBody.php:58
XmlParser.parsePlan (cognitive 80)src/Api/Parser/XmlParser.php:34
EndpointArnMiddleware.__invoke (cognitive 68)src/S3Control/EndpointArnMiddleware.php:101

+ 67 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 5 bodies over 60 down to 60 or less in Cognitive Complexity — start with CborDecoder.decodeValue (cognitive 175), CborDecoder.decodeValue (cognitive 175), XmlBody.formatPlan (cognitive 92). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 5 together lifts Cognitive Complexity from 5.0 to about 6.3/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes9.8 / 10Stronggated by 16 serious findings✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Prevented

16 god class(es) detected.

MethodTooLong: CborDecoder.decodeValue · ×5src/Api/Cbor/CborDecoder.php:78
TooManyMethods: ClientResolver · ×5src/ClientResolver.php:49
FileTooLong: src/ClientResolver.php · ×3src/ClientResolver.php
ClassTooLong: CredentialProvider · ×3src/Credentials/CredentialProvider.php:44

What to do

  1. Resolve the 5 MethodTooLong finding(s) in God Classes — start with CborDecoder.php (2), XmlBody.php, XmlParser.php. — One of this dimension's main actionable groups (5 warning-level).
  2. Resolve the 5 TooManyMethods finding(s) in God Classes — start with ClientResolver.php, StreamWrapper.php, AwsClient.php. — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 3 FileTooLong finding(s) in God Classes — start with ClientResolver.php, S3Client.php, CredentialProvider.php. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication9.4 / 10Stronggated by 167 serious findings✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Verified

104 duplicated block group(s) detected. 1.5 % of the production lines (5,058 of 342,014) are in a reported copy. A further 63 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. Measured on part of this repository only: .php (100% of production source) was not exposed to the token comparison, so duplication there is unmeasured and is not in this count.

Duplicated block (16 lines × 2) · ×6src/Api/Cbor/CborDecoder.php:647
Duplicated block (7 lines × 2) · ×6src/ClientSideMonitoring/ApiCallAttemptMonitoringMiddleware.php:127
Edited copy of a member (14 corresponding lines) · ×5src/S3/PostObject.php:129
Duplicated block (15 lines × 2) · ×5src/Api/Cbor/CborDecoder.php:620
Duplicated block (14 lines × 2) · ×5src/Api/Parser/XmlParser.php:168

+ 97 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 6 Duplicated block (16 lines × 2) finding(s) in Code Duplication — start with RetryMiddleware.php (2), CborDecoder.php, QueryShapeType.php. — One of this dimension's main actionable groups (6 warning-level).
  2. Resolve the 6 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with ApiCallAttemptMonitoringMiddleware.php, ConfigurationProvider.php, Arn.php. — One of this dimension's main actionable groups (6 warning-level).
  3. Resolve the 5 Edited copy of a member (14 corresponding lines) finding(s) in Code Duplication — start with PostObject.php, ClientResolver.php, MultipartCopy.php. — One of this dimension's main actionable groups (5 warning-level).

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling8.9 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 8.9 / 10 · rule-coverage 100% · ceiling Prevented

462 production modules (source-import), 1 dependency cycle(s), 0 unstable depended-on module(s). No manifest declares this repository's modules, so the modules are its top-level source directories and the edges the imports between them; 6 module(s) off the main sequence, with abstractness counted on 461 of the 462 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Circular dependencysrc/AwsClient.php:4
Off the main sequence: src/Handler · ×6

What to do

  1. Resolve the 1 Circular dependency finding(s) in Coupling — start with AwsClient.php. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 6 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (6 warning-level).

Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)9.7 / 10Stronggated by 4 serious findings✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Verified

4 of 148 classes have LCOM4 above 3.

Low cohesion: RulesetStandardLibrary (LCOM4 7) · ×4src/EndpointV2/Ruleset/RulesetStandardLibrary.php:13

What to do

  1. Resolve the 4 Low cohesion finding(s) in Cohesion (LCOM4) — start with RulesetStandardLibrary.php, Service.php, Waiter.php. — One of this dimension's main actionable groups (4 warning-level).

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D10 · Test Quality9.7 / 10Stronggated by 21 serious findings✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Prevented

12 skipped (12 with a documented reason), 25 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 909 tests.

No assertions: testAppliesAccelerateDualStackEndpointToCommand · ×21tests/S3/S3EndpointMiddlewareTest.php:29
Skipped (documented): testResolvesAuthSchemeWithoutCRT · ×12tests/Auth/AuthSelectionMiddlewareTest.php:26
No assertions (declared): testVerifyDotChangesFolder · ×4tests/Build/Changelog/CurrentChangesTest.php:17

What to do

  1. Resolve the 21 No assertions finding(s) in Test Quality — start with S3EndpointMiddlewareTest.php (19), S3TransferManagerTest.php (2). — One of this dimension's main actionable groups (21 warning-level).

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets. 108 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D15 · Churn × Complexity Hotspots10.0 / 10Stronggated by 2 serious findings✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: src/Credentials/CredentialProvider.php (4×18=72) Repeated repair below the complexity floor: src/Api/Parser/NonSeekableStreamDecodingEventStreamIterator.php (3 of 3 changes were fixes)

Hotspot: src/Credentials/CredentialProvider.phpsrc/Credentials/CredentialProvider.php:595
Repeated repair: src/Api/Parser/NonSeekableStreamDecodingEventStreamIterator.phpsrc/Api/Parser/NonSeekableStreamDecodingEventStreamIterator.php:75

What to do

  1. Resolve the 1 Hotspot finding(s) in Churn × Complexity Hotspots — start with CredentialProvider.php. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with NonSeekableStreamDecodingEventStreamIterator.php. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor9.3 / 10Exemplary✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Documented

43 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/SageMaker/SageMakerClient.php. Counted over 608 of the 1293 production source files in this repository: 662 are under the ~2,400-byte size floor this dimension measures over, and the remaining 23 have no attributable history left to measure.

Off-boarding risk: anonymized user #1 · ×2
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt10.0 / 10Stronggated by 5 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

5 deducted task-comment markers across 342014 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

HackComment · ×4tests/Token/token_hack.php:4
TodoCommenttests/Token/BedrockTokenProviderTest.php:446

What to do

  1. Resolve the 4 HackComment finding(s) in Explicit Debt — start with sig_hack.php (2), token_hack.php, SignatureV4Test.php. — One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 1 TodoComment finding(s) in Explicit Debt — start with BedrockTokenProviderTest.php. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 1 documentation facets pass in full. 4 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D27 · Navigability9.7 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

Maturity: Documented → Verified → Prevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Documented

19 % of calls cross a namespace and 1 % go through an interface, but 78 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D29 · Static Analysis (SAST)8.0 / 10Adequategated by 2 critical findings✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Documented

3 finding(s): 0 critical, 2 high, 1 medium, 0 low. 1 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 16 file(s) — `src/Crypto/DecryptionTraitV2.php` (line 439), `src/Crypto/DecryptionTraitV3.php` (line 545), `src/EndpointV2/Bdd/BddEvaluator.php` (line 28, line 29), `src/EndpointV2/Bdd/BddResultResolver.php` (line 24), `src/EndpointV2/Bdd/BddRuleset.php` (line 39), … (+11 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  3. No action in Static Analysis (SAST) — all 1 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (1 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D31 · IaC & Container Security10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (Dockerfile/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

trivy and checkov found no infrastructure-as-code or container misconfigurations.

✓ On the Gold path — maintain.

Detailed fixes: d31_recommendation.md.

D34 · Knowledge Freshness8.4 / 10Adequategated by 4 critical findings✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 8.4 / 10 · rule-coverage 100% · ceiling Documented

101 of 631 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/S3/StreamWrapper.php. Counted over 631 of the 1293 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×4src/S3/StreamWrapper.php:1
Orphaned file · ×97src/Api/Service.php:1
Further orphaned files (smaller)

What to do

  1. Resolve the 4 Orphaned knowledge finding(s) in Knowledge Freshness — start with StreamWrapper.php, S3EncryptionClientV3.php, EncryptionTraitV3.php. — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 97 Orphaned file finding(s) in Knowledge Freshness — start with ConfigurationProvider.php (8), MultipartUploader.php (2), Service.php. — One of this dimension's main actionable groups (97 recommendation-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling10.0 / 10Stronggated by 3 serious findings✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: QuerySerializer.php↔RestSerializer.php 64%; ClientResolver.php↔EndpointV2Middleware.php 62%; ClientResolver.php↔StsClient.php 60%

Change coupling: QuerySerializer.php ↔ RestSerializer.php · ×3src/Api/Serializer/QuerySerializer.php:1

What to do

  1. Resolve the 3 Change coupling finding(s) in Change Coupling — start with ClientResolver.php (2), QuerySerializer.php. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 7 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a .NET runtime image a Dockerfile builds FROM, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AX10 · Code composition9.4 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

AX3 · Project dependency cycles7.9 / 10Strong✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

  • The projects src → src/Api → src (one cycle inside a mutually-dependent group of 24 projects) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference. — src/AwsClient.php:4

What to do

  • Break project reference cycles by extracting shared abstractions into a separate project; keep the graph a DAG.
AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX6 · Interface segregation9.9 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

  • `S3ClientInterface` declares 20 methods: `createPresignedRequest`, `getObjectUrl`, `doesBucketExist`, `doesBucketExistV2`, `doesObjectExist`, `doesObjectExistV2`, `registerStreamWrapper`, `registerStreamWrapperV2`, `deleteMatchingObjects`, `deleteMatchingObjectsAsync`, `upload`, `uploadAsync`, `copy`, `copyAsync`, `uploadDirectory`, `uploadDirectoryAsync`, `downloadBucket`, `downloadBucketAsync`, `determineBucketRegion`, `determineBucketRegionAsync`. Counted over its public instance methods, once per name; constants and static methods are not counted. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — src/S3/S3ClientInterface.php:2355

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

M1 · Documentation (README)6.7 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
  • No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
  • Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P11 · BDD / executable specs10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether behaviour is captured as executable Gherkin specifications (a plus for shared understanding) — only assessed when a BDD framework is present.

Method: Filesystem scan: BDD framework presence (SpecFlow, Gherkin files) when a project references a BDD tool. Exhaustive, deterministic.

P2 · Observability10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

P3 · Security & performance tooling7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • `.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `composer`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list. — .github/dependabot.yml:2

What to do

  • Dependabot is configured but does not watch `composer` — add that `package-ecosystem` entry to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `new Client(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — src/Handler/Guzzle/GuzzleHandler.php:35

What to do

  • Give every client an explicit bound: `new Client(['timeout' => 10, 'connect_timeout' => 3])` for Guzzle (whose default is to wait forever), `CURLOPT_TIMEOUT`/`CURLOPT_CONNECTTIMEOUT` before `curl_exec`, `timeout`/`max_duration` on Symfony HttpClient (or `framework.http_client.default_options`), and a stream-context `timeout` or `connection_timeout` for `file_get_contents`/`SoapClient`. In Drupal, use the `http_client` service, which carries core's site-wide timeout, rather than `new Client()`. Add retries with back-off (Guzzle `Middleware::retry`, Symfony `RetryableHttpClient`, Laravel `->retry()`) around dependencies that fail.
X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated7.9 / 10Strong✓ Tool-verified

Other · Code Health — Whether a `foreach` leaves the array or collection it is walking alone — PHP raises nothing, but the loop's view and the collection part: an array walked by value (and a Doctrine or Laravel collection) is walked as the snapshot taken when the loop began, so an element added in the body is never visited and one removed is visited anyway; an array walked by reference (`as &$v`) and an SPL container (`SplObjectStorage`, `ArrayObject`, `SplQueue`) are walked live, so an added element is walked too and a removal skips the next one; and after an `array_splice`, `array_shift` or sort every later key names a different element. Whether a `for…of` or an array's own walk (`forEach`, `map`, `filter` …) leaves the array, `Map` or `Set` it is walking alone — JavaScript raises nothing, but the walk and the collection part: an array is walked by index against its live length, so a `splice` or `shift` in the body moves the next element under an index already passed and it is skipped, a `push` in a `for…of` is walked too (a loop that always appends never ends) while `forEach` never sees it; a `Map` or `Set` walk never produces an entry deleted before it is reached and visits every one added.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

  • `n` is walked by `n.forEach(…)` at line 43, and line 43 reassigns `n`. The walk keeps the iterator of the collection it started with, while the body from here on reads and writes another one. — build/docs/js/combined.js:43

What to do

  • Each finding names the two lines that cannot both stand — the `foreach` over the collection, and the change to it in the body. Confirm from those two, then pick one: build the result instead of editing the walked collection (`$kept = array_filter($items, $keep)`, `$batch->reject(…)`); for a worklist, loop `while (($next = array_shift($queue)) !== null)` so what is added is visited; walk a copy (`foreach (array_values($items) as …)`, `foreach (clone $storage as …)`) and change the original; remove only the CURRENT element (`unset($items[$key])`), which an array walk tolerates; or — where only the first match was ever meant — `break` straight after the change. In JavaScript: Each finding names the two lines that cannot both stand — the walk over the collection, and the change to it in the body. Confirm from those two, then pick one: build the result instead of editing the walked collection (`const kept = xs.filter(keep)`; `xs.splice(0, xs.length, ...kept)` once after the loop); walk a copy (`for (const x of [...xs])`, `Array.from(set)`) and change the original; for a worklist that must visit what it adds, loop `while (queue.length)` and `shift()` from the front; remove by index walking backwards (`for (let i = xs.length - 1; i >= 0; i--)`); delete only the CURRENT key of a `Map` or `Set`, which the specification allows; or — where only the first match was ever meant — `break` straight after the change.
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling6.1 / 10Adequate✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • `catch (\Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×3) — src/SocketTimeout/Configuration.php:136, src/Api/Serde/Http/HttpRequestBindingPlanProvider.php:200, src/Api/Serde/Http/HttpResponseBindingPlanProvider.php:164
  • `catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — src/S3/S3Transfer/Models/AbstractResumableTransfer.php:210, src/Credentials/LoginCredentialProvider.php:238

What to do

  • Swallowed exception (caught, then discarded)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

Other · Code Health — Whether PHP's static analysis checks null and is not undermined by a nullness baseline — PHPStan from level 8 (`checkNullables`) or Psalm at `errorLevel` 3 or stricter is what makes `?User` a type whose method call is an error, and the null entries of a baseline, `@psalm-suppress PossiblyNull…` and `@phpstan-ignore *.nonObject` are what silence it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • 0/1 of this repository's PHPStan/Psalm configuration(s) run at a level that checks null — PHPStan level 8 or above (`max` included), or Psalm `errorLevel` 3 or below (Psalm's default, with none stated, is 1). A PHPStan level written neither in the file nor in an include inside the repository is 0, PHPStan's own default. Below those levels the checker removes `null` from a union before any rule looks, so `$order->customer()->name()` on a `?Customer` passes, and the first null reaching it is an `Error: Call to a member function name() on null` in production.

What to do

  • Raise PHPStan to level 8 (`level: 8` in `phpstan.neon.dist`, or `max`) or Psalm to `errorLevel="3"` or stricter, so `?Type` is a type the checker holds you to; generate a baseline for what that surfaces only to pay it down, not to keep it. Then resolve the baselined nullness errors rather than adding to them: each is a call on a value the checker showed could be null — narrow it (`if ($x === null) { … }`, `?->`, an early return), make the property non-nullable and initialise it in the constructor, or change the return type so the null cannot arrive.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health55.1Adequate — gated by X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture96.7ExemplaryStrongest area.
Maturity57.7Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness64.7Adequate — gated by P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security93.3ExemplarySolid.
Unscored — 4 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • X10 Duplicated predicate — 18 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
Not included — 66 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — Not applicable: PHP builds its object graph per request and shares none of it between requests.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Laravel migration, an Eloquent $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no data at rest for these controls to protect.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository registers no route (no Laravel Route::…, no Symfony #[Route], no Filament panel, no WordPress REST route or AJAX action). Access control is therefore N/A here — a Composer library is authorized by the application that mounts it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone_number, …) or stored credential in a Laravel migration, an Eloquent model's $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Laravel migration, an Eloquent $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Laravel migration, an Eloquent $fillable/$hidden list or a Doctrine #[ORM\Column] property — and no database client (PDO, mysqli, Laravel's DB facade, $wpdb) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D11 Test Reliability — Test reliability not included — the .php suite needs Composer to install the suite's runner from composer.lock, which the analyzer image does not carry
  • D12 Dependency Hygiene — Not scored — 7 direct Composer requirement(s) were read, but the outdated signal needs Packagist, and no committed composer.lock resolves them to releases, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D14 License Compliance — Composer package licences not graded — this repository commits no composer.lock and this pass does not run Composer's solver
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D21 Naming Consistency — Naming consistency does not read PHP yet; not measured.
  • D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed PHP surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .php, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D28 Secrets (history) — gitleaks killed before it finished — this repository's working tree not scanned
  • D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (composer.json — not scanned yet).
  • D32 Data Compliance (PII/GDPR) — 14 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D36 Supply-chain Provenance & Signing — The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files).
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (composer.json — not scanned yet).
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (5 value object(s))
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust, Java and Kotlin, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for PHPBench subjects (`bench*` methods, or `@Subject`/`#[Subject]` ones) in a file importing PhpBench or carrying its annotations, `bench*` methods in a `*Bench.php` file where PHPBench is installed, or phpbench/phpbench in a composer.json or a phpbench.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • PF3 Async & latency hygiene — Not applicable: PHP has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X12 Unreachable branch — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X13 Undrained process stream — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X2 Cancellation propagation — no C# was loaded; this repository's PHP was read and makes no request a caller can cancel (amphp's HttpClient or connect) — synchronous PHP offers its callers no cancellation to take
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 8 finding(s)
D34 · Knowledge Freshness · Orphaned knowledge · ×4
  • Orphaned knowledge src/S3/StreamWrapper.php:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge src/S3/Crypto/S3EncryptionClientV3.php:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge src/Crypto/EncryptionTraitV3.php:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge src/S3/Crypto/S3EncryptionClientV2.php:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
AX3 · Project dependency cycles · Project dependency cycle · ×1
  • Project dependency cycle src/AwsClient.php:4 — The projects src → src/Api → src (one cycle inside a mutually-dependent group of 24 projects) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D5 · Coupling · Circular dependency · ×1
  • Circular dependency src/AwsClient.php:4 — src → src/Api → src (one cycle inside a mutually-dependent group of 24 modules)
Serious — 340 finding(s)
D10 · Test Quality · No assertions · ×21
  • No assertions: testAppliesAccelerateDualStackEndpointToCommand tests/S3/S3EndpointMiddlewareTest.php:29 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAppliesDualStackToCommandForInvalidOperationsWhenEnableBoth tests/S3/S3EndpointMiddlewareTest.php:55 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAppliesDualStackWithPathStyleToCommandForInvalidOperationsWhenEnableBoth tests/S3/S3EndpointMiddlewareTest.php:70 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testDoesNothingWithoutOptIn tests/S3/S3EndpointMiddlewareTest.php:85 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAppliesAccelerateDualStackEndpointWithOperationalLevelOptIn tests/S3/S3EndpointMiddlewareTest.php:115 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAppliesDualStackForInvalidOperationsWhenEnableBothAtOperationalLevel tests/S3/S3EndpointMiddlewareTest.php:143 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAppliesDualStackForInvalidOperationsWhenEnableBothWithPathStyleAtOperationalLevel tests/S3/S3EndpointMiddlewareTest.php:157 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testDoesNothingWhenDisabledBothOnOperationLevel tests/S3/S3EndpointMiddlewareTest.php:171 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testIgnoresExcludedCommands tests/S3/S3EndpointMiddlewareTest.php:210 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAppliesAccelerateEndpointToCommands tests/S3/S3EndpointMiddlewareTest.php:221 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testDoesNothingWhenAccelerationDisabledOnOperationLevel tests/S3/S3EndpointMiddlewareTest.php:243 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAppliesDualStackEndpointToCommand tests/S3/S3EndpointMiddlewareTest.php:266 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAppliesDualStackWithPathStyleEndpointToCommand tests/S3/S3EndpointMiddlewareTest.php:287 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAppliesDualStackWithOperationLevelOptIn tests/S3/S3EndpointMiddlewareTest.php:301 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAppliesDualStackWithPathStyleWithOperationLevelOptIn tests/S3/S3EndpointMiddlewareTest.php:314 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testDoesNothingForDualStackWithoutOptIn tests/S3/S3EndpointMiddlewareTest.php:328 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testDoesNothingWhenDualStackDisabledOnOperationLevel tests/S3/S3EndpointMiddlewareTest.php:339 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testIncompatibleHostStyleBucketNameFallback tests/S3/S3EndpointMiddlewareTest.php:352 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testIncompatibleHostStyleIpAddressFallback tests/S3/S3EndpointMiddlewareTest.php:363 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testUploadUsesDefaultChecksumAlgorithm tests/S3/S3Transfer/S3TransferManagerTest.php:540 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testUploadUsesCustomChecksumAlgorithm tests/S3/S3Transfer/S3TransferManagerTest.php:557 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×6
  • Duplicated block (16 lines × 2) src/Api/Cbor/CborDecoder.php:647 — src/Api/Cbor/CborDecoder.php:647-662 | src/Cbor/CborDecoder.php:647-662 — before extracting anything, compare `src/Api/Cbor/CborDecoder.php` and `src/Cbor/CborDecoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 624 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: `CborException` names `Aws\Api\Cbor\Exception\CborException` in one and `Aws\Cbor\Exception\CborException` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16 lines × 2) src/Api/Serde/Query/QueryShapeType.php:46 — src/Api/Serde/Query/QueryShapeType.php:46-61 | src/Api/Serde/Xml/XmlShapeType.php:37-52 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) src/Retry/V3/RetryMiddleware.php:350 — src/Retry/V3/RetryMiddleware.php:350-365 | src/RetryMiddleware.php:115-130 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (16 lines × 2) src/Retry/V3/RetryMiddleware.php:369 — src/Retry/V3/RetryMiddleware.php:369-384 | src/RetryMiddleware.php:132-147 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (16 lines × 2) src/S3/BucketEndpointArnMiddleware.php:320 — src/S3/BucketEndpointArnMiddleware.php:320-335 | src/S3Control/EndpointArnMiddleware.php:342-357 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (16 lines × 2) src/S3/RegionalEndpoint/ConfigurationProvider.php:134 — src/S3/RegionalEndpoint/ConfigurationProvider.php:134-149 | src/Sts/RegionalEndpoints/ConfigurationProvider.php:155-170 — before extracting anything, compare `src/S3/RegionalEndpoint/ConfigurationProvider.php` and `src/Sts/RegionalEndpoints/ConfigurationProvider.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×6
  • Duplicated block (7 lines × 2) src/ClientSideMonitoring/ApiCallAttemptMonitoringMiddleware.php:127 — src/ClientSideMonitoring/ApiCallAttemptMonitoringMiddleware.php:127-133 | src/ClientSideMonitoring/ApiCallAttemptMonitoringMiddleware.php:149-155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) src/Endpoint/UseDualstackEndpoint/ConfigurationProvider.php:130 — src/Endpoint/UseDualstackEndpoint/ConfigurationProvider.php:130-136 | src/EndpointDiscovery/ConfigurationProvider.php:178-184 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Endpoint/UseDualstackEndpoint/ConfigurationProvider.php:130` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/Arn/Arn.php:180 — src/Arn/Arn.php:180-186 | src/EventBridge/EventBridgeEndpointMiddleware.php:84-90 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) src/EndpointV2/Rule/TreeRule.php:53 — src/EndpointV2/Rule/TreeRule.php:53-59 | src/EndpointV2/Ruleset/Ruleset.php:108-114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) src/S3/Parser/ValidateResponseChecksumResultMutator.php:197 — src/S3/Parser/ValidateResponseChecksumResultMutator.php:197-204 | src/S3/ValidateResponseChecksumParser.php:141-147 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) src/Api/Serde/Json/JsonEncodePlanProvider.php:90 — src/Api/Serde/Json/JsonEncodePlanProvider.php:90-96 | src/Api/Serde/Query/QueryEncodePlanProvider.php:160-166 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D5 · Coupling · Off the main sequence · ×6
  • Off the main sequence: src/Handler — src/Handler: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: src/Exception — src/Exception: abstractness 0.00, instability 0.01, distance 0.99 — zone of pain — concrete and depended on by 451 project(s), so it's rigid to change.
  • Off the main sequence: src/Configuration — src/Configuration: abstractness 0.00, instability 0.17, distance 0.83 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
  • Off the main sequence: src — src: abstractness 0.20, instability 0.03, distance 0.77 — zone of pain — concrete and depended on by 455 project(s), so it's rigid to change.
  • Off the main sequence: src/Api — src/Api: abstractness 0.11, instability 0.16, distance 0.73 — zone of pain — concrete and depended on by 16 project(s), so it's rigid to change.
  • Off the main sequence: src/Arn — src/Arn: abstractness 0.29, instability 0.00, distance 0.71 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
D3 · God Classes · MethodTooLong · ×5
  • MethodTooLong: CborDecoder.decodeValue src/Api/Cbor/CborDecoder.php:78 — MethodTooLong — decodeValue runs 274 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 174 over it, 2.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CborDecoder.decodeValue src/Cbor/CborDecoder.php:78 — MethodTooLong — decodeValue runs 274 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 174 over it, 2.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: XmlBody.formatPlan src/Api/Serializer/XmlBody.php:58 — MethodTooLong — formatPlan runs 165 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: XmlParser.parsePlan src/Api/Parser/XmlParser.php:34 — MethodTooLong — parsePlan runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: functions.parse_ini_file src/functions.php:412 — MethodTooLong — parse_ini_file runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D3 · God Classes · TooManyMethods · ×5
  • TooManyMethods: ClientResolver src/ClientResolver.php:49 — TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: StreamWrapper src/S3/StreamWrapper.php:62 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AwsClient src/AwsClient.php:20 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Service src/Api/Service.php:7 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: S3Client src/S3/S3Client.php:2377 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×5
  • Edited copy of a member (14 corresponding lines) src/S3/PostObject.php:129 — src/S3/PostObject.php:129-142 | src/S3/PostObjectV4.php:144-159 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/ClientResolver.php:1205 — src/ClientResolver.php:1205-1218 | src/ClientResolver.php:1223-1242 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/S3/MultipartCopy.php:856 — src/S3/MultipartCopy.php:856-869 | src/S3/MultipartCopy.php:878-891 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/AbstractConfigurationProvider.php:65 — src/AbstractConfigurationProvider.php:65-78 | src/Token/TokenProvider.php:111-127 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) src/S3/Crypto/S3EncryptionClient.php:57 — src/S3/Crypto/S3EncryptionClient.php:57-70 | src/S3/Crypto/S3EncryptionClientV2.php:110-124 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×5
  • Duplicated block (15 lines × 2) src/Api/Cbor/CborDecoder.php:620 — src/Api/Cbor/CborDecoder.php:620-634 | src/Cbor/CborDecoder.php:620-634 — before extracting anything, compare `src/Api/Cbor/CborDecoder.php` and `src/Cbor/CborDecoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 624 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: `CborException` names `Aws\Api\Cbor\Exception\CborException` in one and `Aws\Cbor\Exception\CborException` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (15 lines × 2) src/Credentials/CredentialProvider.php:510 — src/Credentials/CredentialProvider.php:510-524 | src/Credentials/CredentialProvider.php:603-617 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) src/Crypto/DecryptionTraitV2.php:158 — src/Crypto/DecryptionTraitV2.php:158-172 | src/Crypto/DecryptionTraitV3.php:218-232 — before extracting anything, compare `src/Crypto/DecryptionTraitV2.php` and `src/Crypto/DecryptionTraitV3.php` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (15 lines × 2) src/Crypto/EncryptionTraitV2.php:69 — src/Crypto/EncryptionTraitV2.php:69-83 | src/Crypto/EncryptionTraitV3.php:81-95 — before extracting anything, compare `src/Crypto/EncryptionTraitV2.php` and `src/Crypto/EncryptionTraitV3.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Crypto/EncryptionTraitV2.php:69` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) src/S3/S3Client.php:2664 — src/S3/S3Client.php:2664-2678 | src/S3Control/S3ControlClient.php:1082-1096 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×5
  • Duplicated block (14 lines × 2) src/Api/Parser/XmlParser.php:168 — src/Api/Parser/XmlParser.php:168-181 | src/Api/Serializer/XmlBody.php:199-212 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (14 lines × 2) src/Crypto/KmsMaterialsProviderV3.php:60 — src/Crypto/KmsMaterialsProviderV3.php:60-73 | src/Crypto/KmsMaterialsProviderV3.php:132-145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Crypto/KmsMaterialsProviderV3.php:60` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) src/S3/RegionalEndpoint/ConfigurationProvider.php:180 — src/S3/RegionalEndpoint/ConfigurationProvider.php:180-193 | src/Sts/RegionalEndpoints/ConfigurationProvider.php:187-200 — before extracting anything, compare `src/S3/RegionalEndpoint/ConfigurationProvider.php` and `src/Sts/RegionalEndpoints/ConfigurationProvider.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/S3/RegionalEndpoint/ConfigurationProvider.php:180` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) src/Signature/DpopSignature.php:203 — src/Signature/DpopSignature.php:203-216 | src/Signature/DpopSignature.php:220-233 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) src/ClientSideMonitoring/ApiCallAttemptMonitoringMiddleware.php:34 — src/ClientSideMonitoring/ApiCallAttemptMonitoringMiddleware.php:34-47 | src/ClientSideMonitoring/ApiCallMonitoringMiddleware.php:44-57 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×5
  • Duplicated block (10 lines × 2) src/Crypto/DecryptionTraitV2.php:82 — src/Crypto/DecryptionTraitV2.php:82-94 | src/Crypto/DecryptionTraitV3.php:91-100 — before extracting anything, compare `src/Crypto/DecryptionTraitV2.php` and `src/Crypto/DecryptionTraitV3.php` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Crypto/DecryptionTraitV2.php:82` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/functions.php:647 — src/functions.php:647-656 | src/functions.php:657-666 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/functions.php:647` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/Crypto/DecryptionTrait.php:98 — src/Crypto/DecryptionTrait.php:98-107 | src/Crypto/DecryptionTraitV2.php:213-222 — before extracting anything, compare `src/Crypto/DecryptionTrait.php` and `src/Crypto/DecryptionTraitV2.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) src/Crypto/DecryptionTrait.php:114 — src/Crypto/DecryptionTrait.php:114-123 | src/Crypto/DecryptionTraitV2.php:230-239 — before extracting anything, compare `src/Crypto/DecryptionTrait.php` and `src/Crypto/DecryptionTraitV2.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) src/Crypto/DecryptionTraitV2.php:195 — src/Crypto/DecryptionTraitV2.php:195-204 | src/Crypto/DecryptionTraitV3.php:202-211 — before extracting anything, compare `src/Crypto/DecryptionTraitV2.php` and `src/Crypto/DecryptionTraitV3.php` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×5
  • Duplicated block (6 lines × 2) src/Api/Parser/DecodingEventStreamIterator.php:308 — src/Api/Parser/DecodingEventStreamIterator.php:308-313 | src/Api/Parser/DecodingEventStreamIterator.php:318-323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) src/Api/Serializer/QueryParamBuilder.php:226 — src/Api/Serializer/QueryParamBuilder.php:226-231 | src/Api/Serializer/QueryParamBuilder.php:267-272 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/S3/S3Client.php:3298 — src/S3/S3Client.php:3298-3303 | src/S3/S3Client.php:3314-3319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/DSQL/AuthTokenGenerator.php:35 — src/DSQL/AuthTokenGenerator.php:35-40 | src/Rds/AuthTokenGenerator.php:26-31 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) src/S3/BucketEndpointArnMiddleware.php:66 — src/S3/BucketEndpointArnMiddleware.php:66-71 | src/S3Control/EndpointArnMiddleware.php:93-98 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×5
  • Swallowed exception (caught, then discarded) src/SocketTimeout/Configuration.php:136 — `catch (\Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/S3/S3Transfer/Models/AbstractResumableTransfer.php:210 — `catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/Credentials/LoginCredentialProvider.php:238 — `catch (\Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/Api/Serde/Http/HttpRequestBindingPlanProvider.php:200 — `catch (\Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) src/Api/Serde/Http/HttpResponseBindingPlanProvider.php:164 — `catch (\Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D17 · Explicit Debt · HackComment · ×4
  • HackComment tests/Token/token_hack.php:4 — // Hack time() to returned the canned result. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment tests/Signature/SignatureV4Test.php:75 — // Hack the class so that it thinks it needs 3 more entries to be full — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment tests/Signature/sig_hack.php:4 — // Hack gmdate() to returned the canned result. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment tests/S3/sig_hack.php:6 — // Hack gmdate() to returned the canned result. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×4
  • Duplicated block (8 lines × 2) src/Api/Serializer/RestSerializer.php:119 — src/Api/Serializer/RestSerializer.php:119-126 | src/Api/Serializer/RestSerializer.php:136-143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) src/Api/Cbor/CborDecoder.php:39 — src/Api/Cbor/CborDecoder.php:39-46 | src/Cbor/CborDecoder.php:39-46 — before extracting anything, compare `src/Api/Cbor/CborDecoder.php` and `src/Cbor/CborDecoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 624 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: `CborException` names `Aws\Api\Cbor\Exception\CborException` in one and `Aws\Cbor\Exception\CborException` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (8 lines × 2) src/S3/S3Transfer/Progress/DirectoryProgressTracker.php:37 — src/S3/S3Transfer/Progress/DirectoryProgressTracker.php:37-44 | src/S3/S3Transfer/Progress/SingleProgressTracker.php:42-49 — before extracting anything, compare `src/S3/S3Transfer/Progress/DirectoryProgressTracker.php` and `src/S3/S3Transfer/Progress/SingleProgressTracker.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) src/S3/S3Transfer/Progress/DirectoryProgressTracker.php:54 — src/S3/S3Transfer/Progress/DirectoryProgressTracker.php:54-61 | src/S3/S3Transfer/Progress/SingleProgressTracker.php:99-107 — before extracting anything, compare `src/S3/S3Transfer/Progress/DirectoryProgressTracker.php` and `src/S3/S3Transfer/Progress/SingleProgressTracker.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D6 · Cohesion (LCOM4) · Low cohesion · ×4
  • Low cohesion: RulesetStandardLibrary (LCOM4 7) src/EndpointV2/Ruleset/RulesetStandardLibrary.php:13 — RulesetStandardLibrary's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Service (LCOM4 5) src/Api/Service.php:7 — Service's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Waiter (LCOM4 5) src/Waiter.php:23 — Waiter's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: UserAgentMiddleware (LCOM4 4) src/UserAgentMiddleware.php:15 — UserAgentMiddleware's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D3 · God Classes · FileTooLong · ×3
  • FileTooLong: src/ClientResolver.php src/ClientResolver.php — FileTooLong — 902 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 402 over it, 1.80× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: S3/S3Client.php src/S3/S3Client.php — FileTooLong — 616 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: S3Client (2377-3447). The bar is 500 significant lines; this is 116 over it, 1.23× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Credentials/CredentialProvider.php src/Credentials/CredentialProvider.php — FileTooLong — 598 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: CredentialProvider (44-1175). The bar is 500 significant lines; this is 98 over it, 1.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
D3 · God Classes · ClassTooLong · ×3
  • ClassTooLong: CredentialProvider src/Credentials/CredentialProvider.php:44 — ClassTooLong — 590 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 190 over it, 1.48× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: S3Client src/S3/S3Client.php:2377 — ClassTooLong — 586 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 186 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: StreamWrapper src/S3/StreamWrapper.php:62 — ClassTooLong — 406 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 6 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D35 · Change Coupling · Change coupling · ×3
  • Change coupling: QuerySerializer.php ↔ RestSerializer.php src/Api/Serializer/QuerySerializer.php:1 — `src/Api/Serializer/QuerySerializer.php` and `src/Api/Serializer/RestSerializer.php` change together 64% of the time (9 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `42949eaa` Enhancement: Endpointv2 Middleware (#2844); `3daedce0` Revert "enhancement: Endpointv2 Middleware (#2790)" (#2833); `dca4bc1e` enhancement: Endpointv2 Middleware (#2790) — run `git show` on any of them.
  • Change coupling: ClientResolver.php ↔ EndpointV2Middleware.php src/ClientResolver.php:1 — `src/ClientResolver.php` and `src/EndpointV2/EndpointV2Middleware.php` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `761a190a` feat: endpoints bdd (#3276); `4fad9485` feat: account id endpoint support (#2976); `64e7659c` Revert "feat: account id endpoint resolution support (#2884)" (#2971) — run `git show` on any of them.
  • Change coupling: ClientResolver.php ↔ StsClient.php src/ClientResolver.php:1 — `src/ClientResolver.php` and `src/Sts/StsClient.php` change together 60% of the time (9 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `094b94e5` Reapply "feat(retries): make standard the default retry mode" (#3376)…; `66009432` Revert "feat(retries): make standard the default retry mode" (#3400); `a76c6c23` feat(retries): make standard the default retry mode — run `git show` on any of them.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/Api/Cbor/CborDecoder.php:80 — src/Api/Cbor/CborDecoder.php:80-515 | src/Api/Cbor/CborDecoder.php:529-607 | src/Cbor/CborDecoder.php:80-515 | src/Cbor/CborDecoder.php:529-607 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/Api/Cbor/CborEncoder.php:263 — src/Api/Cbor/CborEncoder.php:263-281 | src/Api/Cbor/CborEncoder.php:292-323 | src/Cbor/CborEncoder.php:275-293 | src/Cbor/CborEncoder.php:304-335 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/Crypto/AlgorithmSuite.php:190 — src/Crypto/AlgorithmSuite.php:190-225 | src/Crypto/EncryptionTrait.php:58-127 | src/Crypto/EncryptionTraitV2.php:62-139 | src/Crypto/EncryptionTraitV3.php:71-142 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×3
  • Edited copy of a member (27 corresponding lines) src/S3/Crypto/S3EncryptionMultipartUploader.php:110 — src/S3/Crypto/S3EncryptionMultipartUploader.php:110-136 | src/S3/Crypto/S3EncryptionMultipartUploaderV2.php:117-143 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) src/Crypto/AesDecryptingStream.php:118 — src/Crypto/AesDecryptingStream.php:118-144 | src/Crypto/AesEncryptingStream.php:123-149 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) src/Api/Serde/Http/HttpRequestBindingPlanProvider.php:114 — src/Api/Serde/Http/HttpRequestBindingPlanProvider.php:114-140 | src/Api/Serde/Http/HttpRequestBindingPlanProvider.php:145-177 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×3
  • Edited copy of a member (17 corresponding lines) src/CloudFront/CloudFrontClient.php:2030 — src/CloudFront/CloudFrontClient.php:2030-2046 | src/CloudFront/CloudFrontClient.php:2077-2093 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) src/AbstractConfigurationProvider.php:37 — src/AbstractConfigurationProvider.php:37-53 | src/Credentials/CredentialProvider.php:267-289 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) src/S3/S3ClientTrait.php:282 — src/S3/S3ClientTrait.php:282-298 | src/S3/S3ClientTrait.php:323-342 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×3
  • Edited copy of a member (10 corresponding lines) src/Crypto/MetadataEnvelope.php:118 — src/Crypto/MetadataEnvelope.php:118-127 | src/Crypto/MetadataEnvelope.php:132-147 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/EndpointV2/Bdd/BddResultResolver.php:105 — src/EndpointV2/Bdd/BddResultResolver.php:105-122 | src/EndpointV2/Rule/EndpointRule.php:72-81 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/AwsClient.php:767 — src/AwsClient.php:767-776 | src/ClientSideMonitoring/ApiCallMonitoringMiddleware.php:113-126 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×3
  • Edited copy of a member (4 corresponding lines) src/Signature/DpopSignature.php:160 — src/Signature/DpopSignature.php:160-164 | src/IdempotencyTokenMiddleware.php:95-98 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) src/Api/Serializer/RestJsonSerializer.php:36 — src/Api/Serializer/RestJsonSerializer.php:36-39 | src/Api/Serializer/RestXmlSerializer.php:31-34 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) src/S3/MultipartUploader.php:176 — src/S3/MultipartUploader.php:176-179 | src/S3/S3Transfer/MultipartUploader.php:582-585 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×3
  • Duplicated block (17 lines × 2) src/Api/Cbor/CborEncoder.php:236 — src/Api/Cbor/CborEncoder.php:236-252 | src/Cbor/CborEncoder.php:248-264 — before extracting anything, compare `src/Api/Cbor/CborEncoder.php` and `src/Cbor/CborEncoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) src/Api/ErrorParser/AbstractRpcV2ErrorParser.php:145 — src/Api/ErrorParser/AbstractRpcV2ErrorParser.php:145-161 | src/Api/ErrorParser/JsonParserTrait.php:114-130 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) src/Crypto/AlgorithmSuite.php:196 — src/Crypto/AlgorithmSuite.php:196-212 | src/Crypto/EncryptionTraitV3.php:87-103 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Crypto/AlgorithmSuite.php:196` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×3
  • Duplicated block (12 lines × 3) src/Endpoint/UseDualstackEndpoint/ConfigurationProvider.php:134 — src/Endpoint/UseDualstackEndpoint/ConfigurationProvider.php:134-145 | src/Endpoint/UseFipsEndpoint/ConfigurationProvider.php:133-144 | src/S3/UseArnRegion/ConfigurationProvider.php:134-145 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 3) src/S3/Crypto/S3EncryptionMultipartUploader.php:110 — src/S3/Crypto/S3EncryptionMultipartUploader.php:110-121 | src/S3/Crypto/S3EncryptionMultipartUploaderV2.php:117-128 | src/S3/Crypto/S3EncryptionMultipartUploaderV3.php:132-143 — before extracting anything, compare `src/S3/Crypto/S3EncryptionMultipartUploader.php` and `src/S3/Crypto/S3EncryptionMultipartUploaderV2.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/S3/Crypto/S3EncryptionMultipartUploaderV3.php:145` calls `getKeyCommitmentPolicy`, `unset` and `src/S3/Crypto/S3EncryptionMultipartUploader.php:123` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 3) src/S3/Crypto/S3EncryptionMultipartUploader.php:121 — src/S3/Crypto/S3EncryptionMultipartUploader.php:121-132 | src/S3/Crypto/S3EncryptionMultipartUploaderV2.php:128-139 | src/S3/Crypto/S3EncryptionMultipartUploaderV3.php:146-157 — before extracting anything, compare `src/S3/Crypto/S3EncryptionMultipartUploader.php` and `src/S3/Crypto/S3EncryptionMultipartUploaderV2.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/S3/Crypto/S3EncryptionMultipartUploaderV3.php:143` calls `unset`, `getKeyCommitmentPolicy` and `src/S3/Crypto/S3EncryptionMultipartUploader.php:120` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×3
  • Duplicated block (12 lines × 2) src/Credentials/CredentialProvider.php:897 — src/Credentials/CredentialProvider.php:897-908 | src/Token/TokenProvider.php:233-244 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (12 lines × 2) src/Credentials/InstanceProfileProvider.php:168 — src/Credentials/InstanceProfileProvider.php:168-180 | src/Credentials/InstanceProfileProvider.php:209-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Credentials/InstanceProfileProvider.php:168` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) src/S3/RegionalEndpoint/ConfigurationProvider.php:97 — src/S3/RegionalEndpoint/ConfigurationProvider.php:97-108 | src/Sts/RegionalEndpoints/ConfigurationProvider.php:104-115 — before extracting anything, compare `src/S3/RegionalEndpoint/ConfigurationProvider.php` and `src/Sts/RegionalEndpoints/ConfigurationProvider.php` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×3
  • Duplicated block (11 lines × 2) src/ClientSideMonitoring/ConfigurationProvider.php:167 — src/ClientSideMonitoring/ConfigurationProvider.php:167-177 | src/EndpointDiscovery/ConfigurationProvider.php:185-195 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/ClientSideMonitoring/ConfigurationProvider.php:167` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) src/Crypto/AesDecryptingStream.php:118 — src/Crypto/AesDecryptingStream.php:118-128 | src/Crypto/AesEncryptingStream.php:123-133 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Crypto/AesDecryptingStream.php:118` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/S3/Crypto/CryptoParamsTraitV2.php:22 — src/S3/Crypto/CryptoParamsTraitV2.php:22-32 | src/S3/Crypto/CryptoParamsTraitV3.php:22-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×3
  • Duplicated block (5 lines × 2) src/Crypto/MetadataEnvelope.php:118 — src/Crypto/MetadataEnvelope.php:118-122 | src/Crypto/MetadataEnvelope.php:132-140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Crypto/MetadataEnvelope.php:118` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src/S3Control/EndpointArnMiddleware.php:130 — src/S3Control/EndpointArnMiddleware.php:130-134 | src/S3Control/EndpointArnMiddleware.php:137-141 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/S3Control/EndpointArnMiddleware.php:130` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src/EndpointV2/Bdd/BddRuleset.php:121 — src/EndpointV2/Bdd/BddRuleset.php:121-125 | src/EndpointV2/Ruleset/Ruleset.php:97-103 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D1 · Cyclomatic Complexity · CborDecoder.decodeValue (cyclomatic 96) · ×2
  • CborDecoder.decodeValue (cyclomatic 96) src/Api/Cbor/CborDecoder.php:78 — CborDecoder.decodeValue has cyclomatic complexity 96 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • CborDecoder.decodeValue (cyclomatic 96) src/Cbor/CborDecoder.php:78 — CborDecoder.decodeValue has cyclomatic complexity 96 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CborDecoder.decodeIndefiniteString (cyclomatic 16) · ×2
  • CborDecoder.decodeIndefiniteString (cyclomatic 16) src/Api/Cbor/CborDecoder.php:527 — CborDecoder.decodeIndefiniteString has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • CborDecoder.decodeIndefiniteString (cyclomatic 16) src/Cbor/CborDecoder.php:527 — CborDecoder.decodeIndefiniteString has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · CborDecoder.decodeValue (cognitive 175) · ×2
  • CborDecoder.decodeValue (cognitive 175) src/Api/Cbor/CborDecoder.php:78 — CborDecoder.decodeValue has cognitive complexity 175 (threshold 15). Drivers by points: if/else 42 (124 pts), ternaries 7 (26 pts), match/switch 9 (21 pts), loops 2 (4 pts) (nesting depth added 115). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • CborDecoder.decodeValue (cognitive 175) src/Cbor/CborDecoder.php:78 — CborDecoder.decodeValue has cognitive complexity 175 (threshold 15). Drivers by points: if/else 42 (124 pts), ternaries 7 (26 pts), match/switch 9 (21 pts), loops 2 (4 pts) (nesting depth added 115). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CborDecoder.decodeIndefiniteString (cognitive 33) · ×2
  • CborDecoder.decodeIndefiniteString (cognitive 33) src/Api/Cbor/CborDecoder.php:527 — CborDecoder.decodeIndefiniteString has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (29 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • CborDecoder.decodeIndefiniteString (cognitive 33) src/Cbor/CborDecoder.php:527 — CborDecoder.decodeIndefiniteString has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (29 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (50 corresponding lines) · ×2
  • Edited copy of a member (50 corresponding lines) src/S3/Crypto/S3EncryptionClient.php:119 — src/S3/Crypto/S3EncryptionClient.php:119-168 | src/S3/Crypto/S3EncryptionClientV2.php:181-230 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (50 corresponding lines) src/Crypto/DecryptionTraitV2.php:391 — src/Crypto/DecryptionTraitV2.php:391-440 | src/Crypto/DecryptionTraitV3.php:479-546 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×2
  • Edited copy of a member (19 corresponding lines) src/Api/Cbor/CborEncoder.php:234 — src/Api/Cbor/CborEncoder.php:234-252 | src/Cbor/CborEncoder.php:246-264 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) src/Api/ErrorParser/JsonRpcErrorParser.php:29 — src/Api/ErrorParser/JsonRpcErrorParser.php:29-47 | src/Api/ErrorParser/RestJsonErrorParser.php:30-51 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 11+ corresponding lines) src/Api/Parser/AbstractRestParser.php:252 — src/Api/Parser/AbstractRestParser.php:252-266 | src/Api/Parser/AbstractRestParser.php:362-372 | src/Api/Parser/MetadataParserTrait.php:72-82 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) src/CloudSearchDomain/CloudSearchDomainClient.php:97 — src/CloudSearchDomain/CloudSearchDomainClient.php:97-107 | src/MachineLearning/MachineLearningClient.php:405-415 | src/S3/S3Client.php:2903-2916 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×2
  • Edited copy of a member (13 corresponding lines) src/Arn/S3/OutpostsAccessPointArn.php:42 — src/Arn/S3/OutpostsAccessPointArn.php:42-57 | src/Arn/S3/OutpostsBucketArn.php:46-58 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src/S3/S3Transfer/Models/UploadDirectoryRequest.php:70 — src/S3/S3Transfer/Models/UploadDirectoryRequest.php:70-82 | src/S3/S3Transfer/Models/DownloadDirectoryRequest.php:84-96 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×2
  • Edited copy of a member (9 corresponding lines) src/EndpointV2/Bdd/BddRuleset.php:108 — src/EndpointV2/Bdd/BddRuleset.php:108-116 | src/EndpointV2/Ruleset/Ruleset.php:84-92 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/Crypto/AesGcmDecryptingStream.php:53 — src/Crypto/AesGcmDecryptingStream.php:53-62 | src/Crypto/AesGcmEncryptingStream.php:62-70 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×2
  • Edited copy of a member (20 corresponding lines) src/Api/Service.php:90 — src/Api/Service.php:90-110 | src/Api/Service.php:150-169 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/S3/S3Transfer/Progress/DirectoryProgressTracker.php:103 — src/S3/S3Transfer/Progress/DirectoryProgressTracker.php:103-125 | src/S3/S3Transfer/Progress/SingleProgressTracker.php:188-207 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×2
  • Edited copy of a member (7 corresponding lines) src/S3/S3Transfer/Progress/DirectoryTransferProgressSnapshot.php:146 — src/S3/S3Transfer/Progress/DirectoryTransferProgressSnapshot.php:146-154 | src/S3/S3Transfer/Progress/TransferProgressSnapshot.php:131-137 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/Api/Serde/Json/JsonDecodePlanProvider.php:91 — src/Api/Serde/Json/JsonDecodePlanProvider.php:91-97 | src/Api/Serde/Xml/XmlDecodePlanProvider.php:159-165 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (23–24 lines × 2) · ×2
  • Duplicated block (23–24 lines × 2) src/Multipart/AbstractUploadManager.php:121 — src/Multipart/AbstractUploadManager.php:121-144 | src/S3/MultipartCopy.php:239-261 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Multipart/AbstractUploadManager.php:121` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23–24 lines × 2) src/S3/Crypto/S3EncryptionClientV2.php:365 — src/S3/Crypto/S3EncryptionClientV2.php:365-388 | src/S3/Crypto/S3EncryptionClientV3.php:462-484 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/S3/Crypto/S3EncryptionClientV2.php:365` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×2
  • Duplicated block (23 lines × 2) src/Crypto/DecryptionTraitV2.php:97 — src/Crypto/DecryptionTraitV2.php:97-119 | src/Crypto/DecryptionTraitV3.php:103-125 — before extracting anything, compare `src/Crypto/DecryptionTraitV2.php` and `src/Crypto/DecryptionTraitV3.php` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Crypto/DecryptionTraitV2.php:97` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (23 lines × 2) src/S3/Crypto/S3EncryptionClient.php:271 — src/S3/Crypto/S3EncryptionClient.php:271-293 | src/S3/Crypto/S3EncryptionClientV2.php:377-399 — before extracting anything, compare `src/S3/Crypto/S3EncryptionClient.php` and `src/S3/Crypto/S3EncryptionClientV2.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/S3/Crypto/S3EncryptionClient.php:271` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/S3/Crypto/S3EncryptionClient.php:295` calls `fromDecryptionEnvelope` and `src/S3/Crypto/S3EncryptionClientV2.php:401` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×2
  • Duplicated block (21 lines × 2) src/Crypto/DecryptionTraitV2.php:120 — src/Crypto/DecryptionTraitV2.php:120-140 | src/Crypto/DecryptionTraitV3.php:143-163 — before extracting anything, compare `src/Crypto/DecryptionTraitV2.php` and `src/Crypto/DecryptionTraitV3.php` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (21 lines × 2) src/S3/Crypto/S3EncryptionMultipartUploader.php:116 — src/S3/Crypto/S3EncryptionMultipartUploader.php:116-136 | src/S3/Crypto/S3EncryptionMultipartUploaderV2.php:123-143 — before extracting anything, compare `src/S3/Crypto/S3EncryptionMultipartUploader.php` and `src/S3/Crypto/S3EncryptionMultipartUploaderV2.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×2
  • Duplicated block (20 lines × 2) src/Rds/RdsClient.php:3729 — src/Rds/RdsClient.php:3729-3748 | src/Rds/RdsClient.php:3754-3773 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) src/S3/Crypto/S3EncryptionClient.php:119 — src/S3/Crypto/S3EncryptionClient.php:119-138 | src/S3/Crypto/S3EncryptionClientV2.php:181-200 — before extracting anything, compare `src/S3/Crypto/S3EncryptionClient.php` and `src/S3/Crypto/S3EncryptionClientV2.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/S3/Crypto/S3EncryptionClient.php:119` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×2
  • Duplicated block (9 lines × 2) src/S3/PostObject.php:129 — src/S3/PostObject.php:129-137 | src/S3/PostObjectV4.php:144-152 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/S3/PostObject.php:129` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/S3/PostObjectV4.php:154` calls `strpos`, `getHost` and `src/S3/PostObject.php:139` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) src/Api/Cbor/CborDecoder.php:59 — src/Api/Cbor/CborDecoder.php:59-67 | src/Cbor/CborDecoder.php:59-67 — before extracting anything, compare `src/Api/Cbor/CborDecoder.php` and `src/Cbor/CborDecoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 624 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D1 · Cyclomatic Complexity · XmlBody.formatPlan (cyclomatic 48) · ×1
  • XmlBody.formatPlan (cyclomatic 48) src/Api/Serializer/XmlBody.php:58 — XmlBody.formatPlan has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · XmlParser.parsePlan (cyclomatic 46) · ×1
  • XmlParser.parsePlan (cyclomatic 46) src/Api/Parser/XmlParser.php:34 — XmlParser.parsePlan has cyclomatic complexity 46 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · functions.parse_ini_file (cyclomatic 44) · ×1
  • functions.parse_ini_file (cyclomatic 44) src/functions.php:412 — functions.parse_ini_file has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JsonBody.formatPlan (cyclomatic 33) · ×1
  • JsonBody.formatPlan (cyclomatic 33) src/Api/Serializer/JsonBody.php:81 — JsonBody.formatPlan has cyclomatic complexity 33 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · EndpointArnMiddleware.__invoke (cyclomatic 31) · ×1
  • EndpointArnMiddleware.__invoke (cyclomatic 31) src/S3Control/EndpointArnMiddleware.php:101 — EndpointArnMiddleware.__invoke has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RestSerializer.serialize (cyclomatic 30) · ×1
  • RestSerializer.serialize (cyclomatic 30) src/Api/Serializer/RestSerializer.php:97 — RestSerializer.serialize has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CborEncoder.encodeValue (cyclomatic 27) · ×1
  • CborEncoder.encodeValue (cyclomatic 27) src/Cbor/CborEncoder.php:71 — CborEncoder.encodeValue has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InstanceProfileProvider.__invoke (cyclomatic 25) · ×1
  • InstanceProfileProvider.__invoke (cyclomatic 25) src/Credentials/InstanceProfileProvider.php:105 — InstanceProfileProvider.__invoke has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · RetryMiddleware.__invoke (cyclomatic 25) · ×1
  • RetryMiddleware.__invoke (cyclomatic 25) src/Retry/V3/RetryMiddleware.php:139 — RetryMiddleware.__invoke has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CborEncoder.encodeValue (cyclomatic 24) · ×1
  • CborEncoder.encodeValue (cyclomatic 24) src/Api/Cbor/CborEncoder.php:70 — CborEncoder.encodeValue has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Marshaler.marshalValue (cyclomatic 23) · ×1
  • Marshaler.marshalValue (cyclomatic 23) src/DynamoDb/Marshaler.php:151 — Marshaler.marshalValue has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DocsBuilder.createHtmlForOperation (cyclomatic 22) · ×1
  • DocsBuilder.createHtmlForOperation (cyclomatic 22) build/docs/classes/DocsBuilder.php:874 — DocsBuilder.createHtmlForOperation has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RetryMiddleware.isRetryable (cyclomatic 21) · ×1
  • RetryMiddleware.isRetryable (cyclomatic 21) src/Retry/V3/RetryMiddleware.php:337 — RetryMiddleware.isRetryable has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BucketEndpointArnMiddleware.validateArn (cyclomatic 21) · ×1
  • BucketEndpointArnMiddleware.validateArn (cyclomatic 21) src/S3/BucketEndpointArnMiddleware.php:227 — BucketEndpointArnMiddleware.validateArn has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AbstractRestParser.extractHeader (cyclomatic 20) · ×1
  • AbstractRestParser.extractHeader (cyclomatic 20) src/Api/Parser/AbstractRestParser.php:272 — AbstractRestParser.extractHeader has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Transfer.__construct (cyclomatic 20) · ×1
  • Transfer.__construct (cyclomatic 20) src/S3/Transfer.php:81 — Transfer.__construct has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AbstractRestParser.__invoke (cyclomatic 18) · ×1
  • AbstractRestParser.__invoke (cyclomatic 18) src/Api/Parser/AbstractRestParser.php:45 — AbstractRestParser.__invoke has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · CredentialProvider.process (cyclomatic 18) · ×1
  • CredentialProvider.process (cyclomatic 18) src/Credentials/CredentialProvider.php:595 — CredentialProvider.process has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BucketEndpointArnMiddleware.__invoke (cyclomatic 18) · ×1
  • BucketEndpointArnMiddleware.__invoke (cyclomatic 18) src/S3/BucketEndpointArnMiddleware.php:74 — BucketEndpointArnMiddleware.__invoke has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AbstractRpcV2Serializer.resolveInputShape (cyclomatic 17) · ×1
  • AbstractRpcV2Serializer.resolveInputShape (cyclomatic 17) src/Api/Serializer/AbstractRpcV2Serializer.php:152 — AbstractRpcV2Serializer.resolveInputShape has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DocsBuilder.getMemberText (cyclomatic 16) · ×1
  • DocsBuilder.getMemberText (cyclomatic 16) build/docs/classes/DocsBuilder.php:1120 — DocsBuilder.getMemberText has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · QueryParamBuilder.formatItems (cyclomatic 16) · ×1
  • QueryParamBuilder.formatItems (cyclomatic 16) src/Api/Serializer/QueryParamBuilder.php:137 — QueryParamBuilder.formatItems has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · Validator.check_structure (cyclomatic 16) · ×1
  • Validator.check_structure (cyclomatic 16) src/Api/Validator.php:92 — Validator.check_structure has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CredentialProvider.ini (cyclomatic 16) · ×1
  • CredentialProvider.ini (cyclomatic 16) src/Credentials/CredentialProvider.php:493 — CredentialProvider.ini has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CredentialProvider.loadRoleProfile (cyclomatic 16) · ×1
  • CredentialProvider.loadRoleProfile (cyclomatic 16) src/Credentials/CredentialProvider.php:747 — CredentialProvider.loadRoleProfile has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Marshaler.unmarshalValue (cyclomatic 16) · ×1
  • Marshaler.unmarshalValue (cyclomatic 16) src/DynamoDb/Marshaler.php:277 — Marshaler.unmarshalValue has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Partition.getVariant (cyclomatic 16) · ×1
  • Partition.getVariant (cyclomatic 16) src/Endpoint/Partition.php:286 — Partition.getVariant has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ValidateResponseChecksumParser.__invoke (cyclomatic 16) · ×1
  • ValidateResponseChecksumParser.__invoke (cyclomatic 16) src/S3/ValidateResponseChecksumParser.php:27 — ValidateResponseChecksumParser.__invoke has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · functions.parse_ini_section_with_subsections (cyclomatic 16) · ×1
  • functions.parse_ini_section_with_subsections (cyclomatic 16) src/functions.php:637 — functions.parse_ini_section_with_subsections has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D15 · Churn × Complexity Hotspots · Hotspot · ×1
  • Hotspot: src/Credentials/CredentialProvider.php src/Credentials/CredentialProvider.php:595 — src/Credentials/CredentialProvider.php changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in CredentialProvider.process at line 595. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:06:14 -05:00' --until='2026-11-17 16:06:14 -05:00' --full-history --no-merges -- src/Credentials/CredentialProvider.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D15 · Churn × Complexity Hotspots · Repeated repair · ×1
  • Repeated repair: src/Api/Parser/NonSeekableStreamDecodingEventStreamIterator.php src/Api/Parser/NonSeekableStreamDecodingEventStreamIterator.php:75 — src/Api/Parser/NonSeekableStreamDecodingEventStreamIterator.php changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is NonSeekableStreamDecodingEventStreamIterator.readAndHashBytes at line 75), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix event stream output for the smithy-rpc-v2-cbor protocol (#3407)”; “bugfix: keep final event when non-seekable event stream reaches EOF (#3375)”; “bugfix: read full message checksum on partial event stream reads (#3373)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:06:14 -05:00' --until='2026-11-17 16:06:14 -05:00' --full-history --no-merges -- src/Api/Parser/NonSeekableStreamDecodingEventStreamIterator.php`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D17 · Explicit Debt · TodoComment · ×1
  • TodoComment tests/Token/BedrockTokenProviderTest.php:446 — //TODO enable tests when these services support bearer auth — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D2 · Cognitive Complexity · XmlBody.formatPlan (cognitive 92) · ×1
  • XmlBody.formatPlan (cognitive 92) src/Api/Serializer/XmlBody.php:58 — XmlBody.formatPlan has cognitive complexity 92 (threshold 15). Drivers by points: loops 11 (34 pts), if/else 14 (32 pts), ternaries 6 (16 pts), boolean chains 7, match/switch 2 (3 pts) (nesting depth added 52). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · XmlParser.parsePlan (cognitive 80) · ×1
  • XmlParser.parsePlan (cognitive 80) src/Api/Parser/XmlParser.php:34 — XmlParser.parsePlan has cognitive complexity 80 (threshold 15). Drivers by points: loops 10 (31 pts), if/else 11 (28 pts), match/switch 5 (18 pts), boolean chains 3 (nesting depth added 51). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · EndpointArnMiddleware.__invoke (cognitive 68) · ×1
  • EndpointArnMiddleware.__invoke (cognitive 68) src/S3Control/EndpointArnMiddleware.php:101 — EndpointArnMiddleware.__invoke has cognitive complexity 68 (threshold 15). Drivers by points: if/else 18 (54 pts), boolean chains 11, loops 1 (3 pts) (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BucketEndpointArnMiddleware.__invoke (cognitive 54) · ×1
  • BucketEndpointArnMiddleware.__invoke (cognitive 54) src/S3/BucketEndpointArnMiddleware.php:74 — BucketEndpointArnMiddleware.__invoke has cognitive complexity 54 (threshold 15). Drivers by points: if/else 13 (44 pts), error handling 1 (4 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 36). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · functions.parse_ini_file (cognitive 53) · ×1
  • functions.parse_ini_file (cognitive 53) src/functions.php:412 — functions.parse_ini_file has cognitive complexity 53 (threshold 15). Drivers by points: if/else 18 (35 pts), boolean chains 14, loops 4 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DocsBuilder.createHtmlForOperation (cognitive 51) · ×1
  • DocsBuilder.createHtmlForOperation (cognitive 51) build/docs/classes/DocsBuilder.php:874 — DocsBuilder.createHtmlForOperation has cognitive complexity 51 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 8 (18 pts), ternaries 4 (13 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CborEncoder.encodeValue (cognitive 48) · ×1
  • CborEncoder.encodeValue (cognitive 48) src/Cbor/CborEncoder.php:71 — CborEncoder.encodeValue has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (44 pts), ternaries 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 28). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · CborEncoder.encodeValue (cognitive 40) · ×1
  • CborEncoder.encodeValue (cognitive 40) src/Api/Cbor/CborEncoder.php:70 — CborEncoder.encodeValue has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (37 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 23). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · JsonBody.formatPlan (cognitive 40) · ×1
  • JsonBody.formatPlan (cognitive 40) src/Api/Serializer/JsonBody.php:81 — JsonBody.formatPlan has cognitive complexity 40 (threshold 15). Drivers by points: loops 7 (20 pts), if/else 4 (11 pts), match/switch 4 (8 pts), boolean chains 1 (nesting depth added 24). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · RestSerializer.serialize (cognitive 39) · ×1
  • RestSerializer.serialize (cognitive 39) src/Api/Serializer/RestSerializer.php:97 — RestSerializer.serialize has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (21 pts), ternaries 4 (14 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BucketEndpointArnMiddleware.validateArn (cognitive 37) · ×1
  • BucketEndpointArnMiddleware.validateArn (cognitive 37) src/S3/BucketEndpointArnMiddleware.php:227 — BucketEndpointArnMiddleware.validateArn has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (31 pts), boolean chains 6 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalize-docs-files.updateHtmlHrefs (cognitive 36) · ×1
  • normalize-docs-files.updateHtmlHrefs (cognitive 36) build/normalize-docs-files.php:26 — normalize-docs-files.updateHtmlHrefs has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 7 (15 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · functions.parse_ini_section_with_subsections (cognitive 36) · ×1
  • functions.parse_ini_section_with_subsections (cognitive 36) src/functions.php:637 — functions.parse_ini_section_with_subsections has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Configuration.__construct (cognitive 35) · ×1
  • Configuration.__construct (cognitive 35) src/DefaultsMode/Configuration.php:23 — Configuration.__construct has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (33 pts), loops 1 (2 pts) (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · InstanceProfileProvider.__invoke (cognitive 34) · ×1
  • InstanceProfileProvider.__invoke (cognitive 34) src/Credentials/InstanceProfileProvider.php:105 — InstanceProfileProvider.__invoke has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 9, error handling 4 (8 pts), loops 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClientResolver.resolveArgs (cognitive 33) · ×1
  • ClientResolver.resolveArgs (cognitive 33) src/ClientResolver.php:426 — ClientResolver.resolveArgs has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · EndpointDiscoveryMiddleware.__invoke (cognitive 32) · ×1
  • EndpointDiscoveryMiddleware.__invoke (cognitive 32) src/EndpointDiscovery/EndpointDiscoveryMiddleware.php:62 — EndpointDiscoveryMiddleware.__invoke has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (25 pts), error handling 1 (4 pts), boolean chains 3 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · RetryMiddleware.__invoke (cognitive 32) · ×1
  • RetryMiddleware.__invoke (cognitive 32) src/Retry/V3/RetryMiddleware.php:139 — RetryMiddleware.__invoke has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Marshaler.marshalValue (cognitive 31) · ×1
  • Marshaler.marshalValue (cognitive 31) src/DynamoDb/Marshaler.php:151 — Marshaler.marshalValue has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gh-release.retryUpload (cognitive 30) · ×1
  • gh-release.retryUpload (cognitive 30) build/gh-release.php:104 — gh-release.retryUpload has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (18 pts), error handling 2 (7 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InputValidationMiddleware.__invoke (cognitive 28) · ×1
  • InputValidationMiddleware.__invoke (cognitive 28) src/InputValidationMiddleware.php:51 — InputValidationMiddleware.__invoke has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (17 pts), ternaries 1 (6 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Partition.getVariant (cognitive 27) · ×1
  • Partition.getVariant (cognitive 27) src/Endpoint/Partition.php:286 — Partition.getVariant has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QueryEncodePlanProvider.compile (cognitive 26) · ×1
  • QueryEncodePlanProvider.compile (cognitive 26) src/Api/Serde/Query/QueryEncodePlanProvider.php:65 — QueryEncodePlanProvider.compile has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 3 (8 pts), loops 2 (5 pts), boolean chains 1, match/switch 1 (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · AssumeRoleWithWebIdentityCredentialProvider.__invoke (cognitive 26) · ×1
  • AssumeRoleWithWebIdentityCredentialProvider.__invoke (cognitive 26) src/Credentials/AssumeRoleWithWebIdentityCredentialProvider.php:96 — AssumeRoleWithWebIdentityCredentialProvider.__invoke has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (19 pts), error handling 3 (6 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EcsCredentialProvider.__invoke (cognitive 26) · ×1
  • EcsCredentialProvider.__invoke (cognitive 26) src/Credentials/EcsCredentialProvider.php:82 — EcsCredentialProvider.__invoke has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (7 pts), boolean chains 5, error handling 1 (4 pts), loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RetryMiddleware.isRetryable (cognitive 25) · ×1
  • RetryMiddleware.isRetryable (cognitive 25) src/Retry/V3/RetryMiddleware.php:337 — RetryMiddleware.isRetryable has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (14 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Composer.removeServiceDirs (cognitive 25) · ×1
  • Composer.removeServiceDirs (cognitive 25) src/Script/Composer/Composer.php:81 — Composer.removeServiceDirs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 1 (5 pts), loops 2 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Validator.check_structure (cognitive 24) · ×1
  • Validator.check_structure (cognitive 24) src/Api/Validator.php:92 — Validator.check_structure has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts), ternaries 1 (4 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Transfer.__construct (cognitive 24) · ×1
  • Transfer.__construct (cognitive 24) src/S3/Transfer.php:81 — Transfer.__construct has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (19 pts), ternaries 3, boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · S3Client.getEncodingTypeMiddleware (cognitive 23) · ×1
  • S3Client.getEncodingTypeMiddleware (cognitive 23) src/S3/S3Client.php:2925 — S3Client.getEncodingTypeMiddleware has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ValidateResponseChecksumParser.__invoke (cognitive 23) · ×1
  • ValidateResponseChecksumParser.__invoke (cognitive 23) src/S3/ValidateResponseChecksumParser.php:27 — ValidateResponseChecksumParser.__invoke has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, ternaries 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractErrorParser.populateShape (cognitive 22) · ×1
  • AbstractErrorParser.populateShape (cognitive 22) src/Api/ErrorParser/AbstractErrorParser.php:34 — AbstractErrorParser.populateShape has cognitive complexity 22 (threshold 15). Drivers by points: loops 2 (8 pts), if/else 3 (7 pts), match/switch 1 (6 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClientResolver._apply_endpoint_provider (cognitive 22) · ×1
  • ClientResolver._apply_endpoint_provider (cognitive 22) src/ClientResolver.php:807 — ClientResolver._apply_endpoint_provider has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CredentialProvider.loadRoleProfile (cognitive 22) · ×1
  • CredentialProvider.loadRoleProfile (cognitive 22) src/Credentials/CredentialProvider.php:747 — CredentialProvider.loadRoleProfile has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · S3Client.processModel (cognitive 22) · ×1
  • S3Client.processModel (cognitive 22) src/S3/S3Client.php:3047 — S3Client.processModel has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DocsBuilder.updateClients (cognitive 21) · ×1
  • DocsBuilder.updateClients (cognitive 21) build/docs/classes/DocsBuilder.php:506 — DocsBuilder.updateClients has cognitive complexity 21 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 3 (8 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultipartUploader.createUploadPartPromises (cognitive 21) · ×1
  • MultipartUploader.createUploadPartPromises (cognitive 21) src/S3/S3Transfer/MultipartUploader.php:345 — MultipartUploader.createUploadPartPromises has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StreamRequestPayloadMiddleware.__invoke (cognitive 21) · ×1
  • StreamRequestPayloadMiddleware.__invoke (cognitive 21) src/StreamRequestPayloadMiddleware.php:35 — StreamRequestPayloadMiddleware.__invoke has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DocsBuilder.updateIssues (cognitive 20) · ×1
  • DocsBuilder.updateIssues (cognitive 20) build/docs/classes/DocsBuilder.php:232 — DocsBuilder.updateIssues has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 1 (5 pts), ternaries 1 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EventStreamExampleBuilder.addShape (cognitive 20) · ×1
  • EventStreamExampleBuilder.addShape (cognitive 20) build/docs/classes/EventStreamExampleBuilder.php:35 — EventStreamExampleBuilder.addShape has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonParser.parsePlan (cognitive 20) · ×1
  • JsonParser.parsePlan (cognitive 20) src/Api/Parser/JsonParser.php:37 — JsonParser.parsePlan has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 3 (8 pts), boolean chains 2, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · CredentialProvider.process (cognitive 20) · ×1
  • CredentialProvider.process (cognitive 20) src/Credentials/CredentialProvider.php:595 — CredentialProvider.process has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2, error handling 1 (2 pts), ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RpcV2ParserTrait.resolveOutputShape (cognitive 19) · ×1
  • RpcV2ParserTrait.resolveOutputShape (cognitive 19) src/Api/Parser/RpcV2ParserTrait.php:26 — RpcV2ParserTrait.resolveOutputShape has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (6 pts), ternaries 1 (3 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CredentialProvider.assumeRoleWithWebIdentityCredentialProvider (cognitive 19) · ×1
  • CredentialProvider.assumeRoleWithWebIdentityCredentialProvider (cognitive 19) src/Credentials/CredentialProvider.php:410 — CredentialProvider.assumeRoleWithWebIdentityCredentialProvider has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 5 (8 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClientAnnotator.getMethodAnnotations (cognitive 18) · ×1
  • ClientAnnotator.getMethodAnnotations (cognitive 18) build/ClientAnnotator.php:133 — ClientAnnotator.getMethodAnnotations has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (7 pts), ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClientAnnotator.getMethods (cognitive 18) · ×1
  • ClientAnnotator.getMethods (cognitive 18) build/ClientAnnotator.php:293 — ClientAnnotator.getMethods has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (5 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DocsBuilder.build (cognitive 18) · ×1
  • DocsBuilder.build (cognitive 18) build/docs/classes/DocsBuilder.php:94 — DocsBuilder.build has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractRestParser.extractHeader (cognitive 18) · ×1
  • AbstractRestParser.extractHeader (cognitive 18) src/Api/Parser/AbstractRestParser.php:272 — AbstractRestParser.extractHeader has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), error handling 2 (4 pts), match/switch 2 (3 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpRequestBindingPlanProvider.compile (cognitive 18) · ×1
  • HttpRequestBindingPlanProvider.compile (cognitive 18) src/Api/Serde/Http/HttpRequestBindingPlanProvider.php:47 — HttpRequestBindingPlanProvider.compile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QueryParamBuilder.formatStructure (cognitive 18) · ×1
  • QueryParamBuilder.formatStructure (cognitive 18) src/Api/Serializer/QueryParamBuilder.php:38 — QueryParamBuilder.formatStructure has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 1 (3 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QueryParamBuilder.formatItems (cognitive 18) · ×1
  • QueryParamBuilder.formatItems (cognitive 18) src/Api/Serializer/QueryParamBuilder.php:137 — QueryParamBuilder.formatItems has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (14 pts), ternaries 1 (3 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DecryptionTraitV3.validateOptionsAndEnvelope (cognitive 18) · ×1
  • DecryptionTraitV3.validateOptionsAndEnvelope (cognitive 18) src/Crypto/DecryptionTraitV3.php:287 — DecryptionTraitV3.validateOptionsAndEnvelope has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BucketEndpointArnMiddleware.generateAccessPointHost (cognitive 18) · ×1
  • BucketEndpointArnMiddleware.generateAccessPointHost (cognitive 18) src/S3/BucketEndpointArnMiddleware.php:171 — BucketEndpointArnMiddleware.generateAccessPointHost has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (17 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · S3Client.addBuiltIns (cognitive 18) · ×1
  • S3Client.addBuiltIns (cognitive 18) src/S3/S3Client.php:3093 — S3Client.addBuiltIns has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SqsClient.validateMd5 (cognitive 18) · ×1
  • SqsClient.validateMd5 (cognitive 18) src/Sqs/SqsClient.php:321 — SqsClient.validateMd5 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DateTimeResult.fromTimestamp (cognitive 17) · ×1
  • DateTimeResult.fromTimestamp (cognitive 17) src/Api/DateTimeResult.php:77 — DateTimeResult.fromTimestamp has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 3 (6 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HttpResponseBindingPlanProvider.compile (cognitive 17) · ×1
  • HttpResponseBindingPlanProvider.compile (cognitive 17) src/Api/Serde/Http/HttpResponseBindingPlanProvider.php:39 — HttpResponseBindingPlanProvider.compile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 1 (4 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RestSerializer.applyHeader (cognitive 17) · ×1
  • RestSerializer.applyHeader (cognitive 17) src/Api/Serializer/RestSerializer.php:314 — RestSerializer.applyHeader has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 1 (2 pts), match/switch 1 (2 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CredentialProvider.ini (cognitive 17) · ×1
  • CredentialProvider.ini (cognitive 17) src/Credentials/CredentialProvider.php:493 — CredentialProvider.ini has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, ternaries 3 (4 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · AbstractUploader.getUploadCommands (cognitive 17) · ×1
  • AbstractUploader.getUploadCommands (cognitive 17) src/Multipart/AbstractUploader.php:47 — AbstractUploader.getUploadCommands has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RetryMiddleware.isThrottlingError (cognitive 17) · ×1
  • RetryMiddleware.isThrottlingError (cognitive 17) src/Retry/V3/RetryMiddleware.php:408 — RetryMiddleware.isThrottlingError has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RetryMiddleware.isRetryable (cognitive 17) · ×1
  • RetryMiddleware.isRetryable (cognitive 17) src/RetryMiddleware.php:109 — RetryMiddleware.isRetryable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DirectoryDownloader.createDownloadPromises (cognitive 17) · ×1
  • DirectoryDownloader.createDownloadPromises (cognitive 17) src/S3/S3Transfer/DirectoryDownloader.php:196 — DirectoryDownloader.createDownloadPromises has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · filter-phpcs-report.parseChangedLineRanges (cognitive 16) · ×1
  • filter-phpcs-report.parseChangedLineRanges (cognitive 16) .github/scripts/filter-phpcs-report.php:74 — filter-phpcs-report.parseChangedLineRanges has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Burgomaster.recursiveCopy (cognitive 16) · ×1
  • Burgomaster.recursiveCopy (cognitive 16) build/Burgomaster.php:163 — Burgomaster.recursiveCopy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DocsBuilder.updateExceptions (cognitive 16) · ×1
  • DocsBuilder.updateExceptions (cognitive 16) build/docs/classes/DocsBuilder.php:577 — DocsBuilder.updateExceptions has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 2 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · RestSerializer.expandUriTemplate (cognitive 16) · ×1
  • RestSerializer.expandUriTemplate (cognitive 16) src/Api/Serializer/RestSerializer.php:472 — RestSerializer.expandUriTemplate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 2 (7 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DecryptionTraitV2.validateOptionsAndEnvelope (cognitive 16) · ×1
  • DecryptionTraitV2.validateOptionsAndEnvelope (cognitive 16) src/Crypto/DecryptionTraitV2.php:242 — DecryptionTraitV2.validateOptionsAndEnvelope has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InstructionFileMetadataStrategy.load (cognitive 16) · ×1
  • InstructionFileMetadataStrategy.load (cognitive 16) src/S3/Crypto/InstructionFileMetadataStrategy.php:121 — InstructionFileMetadataStrategy.load has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · S3MultiRegionClient.determineRegionMiddleware (cognitive 16) · ×1
  • S3MultiRegionClient.determineRegionMiddleware (cognitive 16) src/S3/S3MultiRegionClient.php:2394 — S3MultiRegionClient.determineRegionMiddleware has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) src/ClientSideMonitoring/ConfigurationProvider.php:80 — src/ClientSideMonitoring/ConfigurationProvider.php:80-97 | src/DefaultsMode/ConfigurationProvider.php:75-94 | src/S3/RegionalEndpoint/ConfigurationProvider.php:73-92 | src/S3/UseArnRegion/ConfigurationProvider.php:73-92 | src/Sts/RegionalEndpoints/ConfigurationProvider.php:75-94 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Edited copy of a member (88 corresponding lines) · ×1
  • Edited copy of a member (88 corresponding lines) src/Crypto/DecryptionTraitV2.php:65 — src/Crypto/DecryptionTraitV2.php:65-152 | src/Crypto/DecryptionTraitV3.php:74-180 — These two members are one piece of code written twice and then edited apart: 88 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (94 corresponding lines) · ×1
  • Edited copy of a member (94 corresponding lines) src/Api/Cbor/CborEncoder.php:72 — src/Api/Cbor/CborEncoder.php:72-165 | src/Cbor/CborEncoder.php:73-177 — These two members are one piece of code written twice and then edited apart: 94 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (78 corresponding lines) · ×1
  • Edited copy of a member (78 corresponding lines) src/S3/Crypto/S3EncryptionClientV2.php:345 — src/S3/Crypto/S3EncryptionClientV2.php:345-422 | src/S3/Crypto/S3EncryptionClientV3.php:435-525 — These two members are one piece of code written twice and then edited apart: 78 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (61 corresponding lines) · ×1
  • Edited copy of a member (61 corresponding lines) src/Crypto/DecryptionTraitV2.php:244 — src/Crypto/DecryptionTraitV2.php:244-304 | src/Crypto/DecryptionTraitV3.php:301-388 — These two members are one piece of code written twice and then edited apart: 61 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (48 corresponding lines) · ×1
  • Edited copy of a member (48 corresponding lines) src/Api/Cbor/CborEncoder.php:176 — src/Api/Cbor/CborEncoder.php:176-223 | src/Cbor/CborEncoder.php:188-235 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (64 corresponding lines) · ×1
  • Edited copy of a member (64 corresponding lines) src/Api/Parser/AbstractRestParser.php:177 — src/Api/Parser/AbstractRestParser.php:177-240 | src/Api/Parser/AbstractRestParser.php:278-349 — These two members are one piece of code written twice and then edited apart: 64 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 30+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 30+ corresponding lines) src/Endpoint/UseDualstackEndpoint/ConfigurationProvider.php:130 — src/Endpoint/UseDualstackEndpoint/ConfigurationProvider.php:130-159 | src/Endpoint/UseFipsEndpoint/ConfigurationProvider.php:129-158 | src/Retry/ConfigurationProvider.php:209-247 | src/S3/UseArnRegion/ConfigurationProvider.php:130-159 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (45 corresponding lines) · ×1
  • Edited copy of a member (45 corresponding lines) src/Api/Serde/Json/JsonDecodePlanProvider.php:37 — src/Api/Serde/Json/JsonDecodePlanProvider.php:37-82 | src/Api/Serde/Json/JsonEncodePlanProvider.php:37-81 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×1
  • Edited copy of a member (23 corresponding lines) src/S3/RegionalEndpoint/ConfigurationProvider.php:127 — src/S3/RegionalEndpoint/ConfigurationProvider.php:127-149 | src/Sts/RegionalEndpoints/ConfigurationProvider.php:148-170 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (42 corresponding lines) · ×1
  • Edited copy of a member (42 corresponding lines) src/Crypto/EncryptionTrait.php:150 — src/Crypto/EncryptionTrait.php:150-191 | src/Crypto/EncryptionTraitV3.php:297-342 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) src/Arn/S3/OutpostsAccessPointArn.php:69 — src/Arn/S3/OutpostsAccessPointArn.php:69-108 | src/Arn/S3/OutpostsBucketArn.php:67-97 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×1
  • Edited copy of a member (35 corresponding lines) src/Credentials/CredentialProvider.php:208 — src/Credentials/CredentialProvider.php:208-248 | src/Token/TokenProvider.php:139-173 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 22+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 22+ corresponding lines) src/S3/Crypto/S3EncryptionMultipartUploader.php:146 — src/S3/Crypto/S3EncryptionMultipartUploader.php:146-167 | src/S3/Crypto/S3EncryptionMultipartUploaderV2.php:153-174 | src/S3/Crypto/S3EncryptionMultipartUploaderV3.php:193-215 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 20+ corresponding lines) src/Endpoint/UseDualstackEndpoint/ConfigurationProvider.php:72 — src/Endpoint/UseDualstackEndpoint/ConfigurationProvider.php:72-92 | src/Endpoint/UseFipsEndpoint/ConfigurationProvider.php:72-91 | src/EndpointDiscovery/ConfigurationProvider.php:76-95 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) src/S3/S3Transfer/DirectoryDownloader.php:327 — src/S3/S3Transfer/DirectoryDownloader.php:327-347 | src/S3/Transfer.php:262-282 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) src/ClientResolver.php:566 — src/ClientResolver.php:566-590 | src/Sts/StsClient.php:222-247 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 18+ corresponding lines) src/EndpointDiscovery/ConfigurationProvider.php:216 — src/EndpointDiscovery/ConfigurationProvider.php:216-238 | src/Retry/ConfigurationProvider.php:260-284 | src/S3/RegionalEndpoint/ConfigurationProvider.php:176-193 | src/Sts/RegionalEndpoints/ConfigurationProvider.php:183-200 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×1
  • Edited copy of a member (11 corresponding lines) src/Crypto/AesDecryptingStream.php:90 — src/Crypto/AesDecryptingStream.php:90-101 | src/Crypto/AesEncryptingStream.php:89-99 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) src/Credentials/CredentialProvider.php:865 — src/Credentials/CredentialProvider.php:865-882 | src/Credentials/CredentialProvider.php:890-908 | src/Token/TokenProvider.php:230-244 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×1
  • Edited copy of a member (24 corresponding lines) src/S3/S3Transfer/AbstractMultipartDownloader.php:379 — src/S3/S3Transfer/AbstractMultipartDownloader.php:379-404 | src/S3/S3Transfer/AbstractMultipartDownloader.php:417-440 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×1
  • Edited copy of a member (15 corresponding lines) src/S3/S3Transfer/AbstractMultipartUploader.php:292 — src/S3/S3Transfer/AbstractMultipartUploader.php:292-306 | src/S3/S3Transfer/MultipartUploader.php:471-489 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×1
  • Edited copy of a member (12 corresponding lines) src/DynamoDb/DynamoDbClient.php:1558 — src/DynamoDb/DynamoDbClient.php:1558-1569 | src/S3/S3Client.php:3146-3157 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 12+ corresponding lines) src/DefaultsMode/ConfigurationProvider.php:104 — src/DefaultsMode/ConfigurationProvider.php:104-115 | src/Endpoint/UseDualstackEndpoint/ConfigurationProvider.php:102-113 | src/Endpoint/UseFipsEndpoint/ConfigurationProvider.php:101-112 | src/S3/UseArnRegion/ConfigurationProvider.php:102-113 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×1
  • Edited copy of a member (8 corresponding lines) src/Glacier/GlacierClient.php:363 — src/Glacier/GlacierClient.php:363-374 | src/Middleware.php:390-397 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 3+ corresponding lines) src/EndpointV2/EndpointV2Middleware.php:66 — src/EndpointV2/EndpointV2Middleware.php:66-68 | src/EventBridge/EventBridgeEndpointMiddleware.php:29-42 | src/S3/BucketEndpointArnMiddleware.php:54-56 | src/S3Control/EndpointArnMiddleware.php:80-82 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×1
  • Edited copy of a member (3 corresponding lines) src/Auth/AuthSelectionMiddleware.php:49 — src/Auth/AuthSelectionMiddleware.php:49-55 | src/S3/S3EndpointMiddleware.php:65-67 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×1
  • Edited copy of a member (5 corresponding lines) src/S3/S3Transfer/Progress/DirectoryTransferProgressSnapshot.php:39 — src/S3/S3Transfer/Progress/DirectoryTransferProgressSnapshot.php:39-45 | src/S3/S3Transfer/Progress/TransferProgressSnapshot.php:38-42 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×1
  • Edited copy of a member (6 corresponding lines) src/Api/Parser/AbstractParser.php:50 — src/Api/Parser/AbstractParser.php:50-55 | src/Api/Parser/RestXmlParser.php:31-36 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (436 lines × 2) · ×1
  • Duplicated block (436 lines × 2) src/Api/Cbor/CborDecoder.php:80 — src/Api/Cbor/CborDecoder.php:80-515 | src/Cbor/CborDecoder.php:80-515 — before extracting anything, compare `src/Api/Cbor/CborDecoder.php` and `src/Cbor/CborDecoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 624 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `CborException` names `Aws\Api\Cbor\Exception\CborException` in one and `Aws\Cbor\Exception\CborException` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (59–69 lines × 2) · ×1
  • Duplicated block (59–69 lines × 2) src/Crypto/DecryptionTraitV2.php:246 — src/Crypto/DecryptionTraitV2.php:246-304 | src/Crypto/DecryptionTraitV3.php:306-374 — before extracting anything, compare `src/Crypto/DecryptionTraitV2.php` and `src/Crypto/DecryptionTraitV3.php` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (44 lines × 4) · ×1
  • Duplicated block (44 lines × 4) src/Api/Cbor/CborDecoder.php:217 — src/Api/Cbor/CborDecoder.php:217-260 | src/Api/Cbor/CborDecoder.php:275-318 | src/Cbor/CborDecoder.php:217-260 | src/Cbor/CborDecoder.php:275-318 — before extracting anything, compare `src/Api/Cbor/CborDecoder.php` and `src/Cbor/CborDecoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 624 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Api/Cbor/CborDecoder.php:217` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `CborException` names `Aws\Api\Cbor\Exception\CborException` in one and `Aws\Cbor\Exception\CborException` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×1
  • Duplicated block (41 lines × 2) src/Api/Cbor/CborDecoder.php:529 — src/Api/Cbor/CborDecoder.php:529-569 | src/Cbor/CborDecoder.php:529-569 — before extracting anything, compare `src/Api/Cbor/CborDecoder.php` and `src/Cbor/CborDecoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 624 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Api/Cbor/CborDecoder.php:529` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `CborException` names `Aws\Api\Cbor\Exception\CborException` in one and `Aws\Cbor\Exception\CborException` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×1
  • Duplicated block (40 lines × 2) src/S3/S3Transfer/Models/ResumableDownload.php:188 — src/S3/S3Transfer/Models/ResumableDownload.php:188-227 | src/S3/S3Transfer/Models/ResumableUpload.php:138-177 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (38 lines × 10) · ×1
  • Duplicated block (38 lines × 10) src/Api/Cbor/CborDecoder.php:190 — src/Api/Cbor/CborDecoder.php:190-227 | src/Api/Cbor/CborDecoder.php:248-285 | src/Api/Cbor/CborDecoder.php:306-343 | src/Api/Cbor/CborDecoder.php:365-402 | src/Api/Cbor/CborDecoder.php:557-594 | src/Cbor/CborDecoder.php:190-227 | src/Cbor/CborDecoder.php:248-285 | src/Cbor/CborDecoder.php:306-343 | src/Cbor/CborDecoder.php:365-402 | src/Cbor/CborDecoder.php:557-594 — before extracting anything, compare `src/Api/Cbor/CborDecoder.php` and `src/Cbor/CborDecoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 624 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Api/Cbor/CborDecoder.php:190` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `CborException` names `Aws\Api\Cbor\Exception\CborException` in one and `Aws\Cbor\Exception\CborException` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Api/Cbor/CborDecoder.php:245` calls `substr` and `src/Api/Cbor/CborDecoder.php:187` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×1
  • Duplicated block (37 lines × 2) src/Api/Cbor/CborEncoder.php:91 — src/Api/Cbor/CborEncoder.php:91-127 | src/Cbor/CborEncoder.php:88-124 — before extracting anything, compare `src/Api/Cbor/CborEncoder.php` and `src/Cbor/CborEncoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Api/Cbor/CborEncoder.php:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Api/Cbor/CborEncoder.php:86` calls `isset`, `pack` and `src/Cbor/CborEncoder.php:86` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (29–37 lines × 2) · ×1
  • Duplicated block (29–37 lines × 2) src/Crypto/KmsMaterialsProviderV2.php:70 — src/Crypto/KmsMaterialsProviderV2.php:70-98 | src/Crypto/KmsMaterialsProviderV3.php:121-157 — before extracting anything, compare `src/Crypto/KmsMaterialsProviderV2.php` and `src/Crypto/KmsMaterialsProviderV3.php` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (29–34 lines × 3) · ×1
  • Duplicated block (29–34 lines × 3) src/S3/Crypto/S3EncryptionClient.php:140 — src/S3/Crypto/S3EncryptionClient.php:140-168 | src/S3/Crypto/S3EncryptionClientV2.php:202-230 | src/S3/Crypto/S3EncryptionClientV3.php:268-301 — before extracting anything, compare `src/S3/Crypto/S3EncryptionClient.php` and `src/S3/Crypto/S3EncryptionClientV2.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/S3/Crypto/S3EncryptionClient.php:140` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (32–33 lines × 2) · ×1
  • Duplicated block (32–33 lines × 2) src/Crypto/DecryptionTrait.php:148 — src/Crypto/DecryptionTrait.php:148-179 | src/Crypto/DecryptionTraitV3.php:415-447 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Crypto/DecryptionTrait.php:148` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) src/Api/Cbor/CborEncoder.php:191 — src/Api/Cbor/CborEncoder.php:191-221 | src/Cbor/CborEncoder.php:203-233 — before extracting anything, compare `src/Api/Cbor/CborEncoder.php` and `src/Cbor/CborEncoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Api/Cbor/CborEncoder.php:191` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (28–29 lines × 4) · ×1
  • Duplicated block (28–29 lines × 4) src/Api/Cbor/CborEncoder.php:116 — src/Api/Cbor/CborEncoder.php:116-144 | src/Api/Cbor/CborEncoder.php:176-203 | src/Cbor/CborEncoder.php:113-141 | src/Cbor/CborEncoder.php:188-215 — before extracting anything, compare `src/Api/Cbor/CborEncoder.php` and `src/Cbor/CborEncoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) src/Api/Serializer/JsonBody.php:127 — src/Api/Serializer/JsonBody.php:127-155 | src/Api/Serializer/JsonBody.php:161-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×1
  • Duplicated block (28 lines × 2) src/Api/Serde/Json/JsonDecodePlanProvider.php:55 — src/Api/Serde/Json/JsonDecodePlanProvider.php:55-82 | src/Api/Serde/Json/JsonEncodePlanProvider.php:54-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Api/Serde/Json/JsonDecodePlanProvider.php:55` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/Api/Serde/Json/JsonDecodePlanProvider.php:54` calls `empty` and `src/Api/Serde/Json/JsonEncodePlanProvider.php:53` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) src/Crypto/DecryptionTraitV2.php:414 — src/Crypto/DecryptionTraitV2.php:414-440 | src/Crypto/DecryptionTraitV3.php:520-546 — before extracting anything, compare `src/Crypto/DecryptionTraitV2.php` and `src/Crypto/DecryptionTraitV3.php` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 194 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) src/Api/Cbor/CborEncoder.php:298 — src/Api/Cbor/CborEncoder.php:298-323 | src/Cbor/CborEncoder.php:310-335 — before extracting anything, compare `src/Api/Cbor/CborEncoder.php` and `src/Cbor/CborEncoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Api/Cbor/CborEncoder.php:298` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) src/Api/Parser/AbstractRestParser.php:291 — src/Api/Parser/AbstractRestParser.php:291-314 | src/Api/Parser/MetadataParserTrait.php:29-52 — before extracting anything, compare `src/Api/Parser/AbstractRestParser.php` and `src/Api/Parser/MetadataParserTrait.php` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (22–24 lines × 2) · ×1
  • Duplicated block (22–24 lines × 2) src/Crypto/EncryptionTraitV2.php:116 — src/Crypto/EncryptionTraitV2.php:116-137 | src/Crypto/EncryptionTraitV3.php:172-195 — before extracting anything, compare `src/Crypto/EncryptionTraitV2.php` and `src/Crypto/EncryptionTraitV3.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Crypto/EncryptionTraitV2.php:116` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) src/Arn/S3/OutpostsAccessPointArn.php:74 — src/Arn/S3/OutpostsAccessPointArn.php:74-95 | src/Arn/S3/OutpostsBucketArn.php:71-92 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Arn/S3/OutpostsAccessPointArn.php:74` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17–21 lines × 3) · ×1
  • Duplicated block (17–21 lines × 3) src/Crypto/EncryptionTrait.php:161 — src/Crypto/EncryptionTrait.php:161-177 | src/Crypto/EncryptionTraitV2.php:172-188 | src/Crypto/EncryptionTraitV3.php:316-336 — before extracting anything, compare `src/Crypto/EncryptionTraitV2.php` and `src/Crypto/EncryptionTraitV3.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Crypto/EncryptionTrait.php:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) src/ClientResolver.php:572 — src/ClientResolver.php:572-590 | src/Sts/StsClient.php:228-247 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) src/Crypto/KmsMaterialsProviderV2.php:46 — src/Crypto/KmsMaterialsProviderV2.php:46-62 | src/Crypto/KmsMaterialsProviderV3.php:95-113 — before extracting anything, compare `src/Crypto/KmsMaterialsProviderV2.php` and `src/Crypto/KmsMaterialsProviderV3.php` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16–18 lines × 5) · ×1
  • Duplicated block (16–18 lines × 5) src/ClientSideMonitoring/ConfigurationProvider.php:80 — src/ClientSideMonitoring/ConfigurationProvider.php:80-95 | src/DefaultsMode/ConfigurationProvider.php:75-92 | src/S3/RegionalEndpoint/ConfigurationProvider.php:73-90 | src/S3/UseArnRegion/ConfigurationProvider.php:73-90 | src/Sts/RegionalEndpoints/ConfigurationProvider.php:75-92 — before extracting anything, compare `src/ClientSideMonitoring/ConfigurationProvider.php` and `src/S3/RegionalEndpoint/ConfigurationProvider.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) src/S3/S3Transfer/DirectoryDownloader.php:330 — src/S3/S3Transfer/DirectoryDownloader.php:330-347 | src/S3/Transfer.php:266-282 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×1
  • Duplicated block (17 lines × 4) src/Api/Cbor/CborDecoder.php:118 — src/Api/Cbor/CborDecoder.php:118-134 | src/Api/Cbor/CborDecoder.php:488-504 | src/Cbor/CborDecoder.php:118-134 | src/Cbor/CborDecoder.php:488-504 — before extracting anything, compare `src/Api/Cbor/CborDecoder.php` and `src/Cbor/CborDecoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 624 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Api/Cbor/CborDecoder.php:118` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `CborException` names `Aws\Api\Cbor\Exception\CborException` in one and `Aws\Cbor\Exception\CborException` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Api/Cbor/CborDecoder.php:507` calls `CborException` and `src/Api/Cbor/CborDecoder.php:136` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) src/Crypto/DecryptionTrait.php:146 — src/Crypto/DecryptionTrait.php:146-161 | src/Crypto/DecryptionTraitV2.php:328-343 | src/Crypto/DecryptionTraitV3.php:413-428 — before extracting anything, compare `src/Crypto/DecryptionTrait.php` and `src/Crypto/DecryptionTraitV2.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Crypto/DecryptionTrait.php:146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) src/Api/Cbor/CborEncoder.php:72 — src/Api/Cbor/CborEncoder.php:72-86 | src/Cbor/CborEncoder.php:73-88 — before extracting anything, compare `src/Api/Cbor/CborEncoder.php` and `src/Cbor/CborEncoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Api/Cbor/CborEncoder.php:72` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/Api/Cbor/CborEncoder.php:87` calls `pack`, `isset` and `src/Cbor/CborEncoder.php:89` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×1
  • Duplicated block (14–16 lines × 2) src/S3/Crypto/S3EncryptionClientV3.php:216 — src/S3/Crypto/S3EncryptionClientV3.php:216-231 | src/S3/Crypto/S3EncryptionClientV3.php:435-448 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) src/S3/Crypto/S3EncryptionMultipartUploader.php:153 — src/S3/Crypto/S3EncryptionMultipartUploader.php:153-167 | src/S3/Crypto/S3EncryptionMultipartUploaderV2.php:160-174 | src/S3/Crypto/S3EncryptionMultipartUploaderV3.php:201-215 — before extracting anything, compare `src/S3/Crypto/S3EncryptionMultipartUploader.php` and `src/S3/Crypto/S3EncryptionMultipartUploaderV2.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/S3/Crypto/S3EncryptionMultipartUploader.php:153` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) src/S3/S3Transfer/Progress/DirectoryProgressTracker.php:86 — src/S3/S3Transfer/Progress/DirectoryProgressTracker.php:86-98 | src/S3/S3Transfer/Progress/SingleProgressTracker.php:217-231 — before extracting anything, compare `src/S3/S3Transfer/Progress/DirectoryProgressTracker.php` and `src/S3/S3Transfer/Progress/SingleProgressTracker.php` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 6) · ×1
  • Duplicated block (13 lines × 6) src/Api/Cbor/CborEncoder.php:131 — src/Api/Cbor/CborEncoder.php:131-143 | src/Api/Cbor/CborEncoder.php:190-202 | src/Api/Cbor/CborEncoder.php:211-223 | src/Cbor/CborEncoder.php:128-140 | src/Cbor/CborEncoder.php:202-214 | src/Cbor/CborEncoder.php:223-235 — before extracting anything, compare `src/Api/Cbor/CborEncoder.php` and `src/Cbor/CborEncoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12–13 lines × 4) · ×1
  • Duplicated block (12–13 lines × 4) src/Api/Cbor/CborEncoder.php:93 — src/Api/Cbor/CborEncoder.php:93-104 | src/Api/Cbor/CborEncoder.php:234-246 | src/Cbor/CborEncoder.php:90-101 | src/Cbor/CborEncoder.php:246-258 — before extracting anything, compare `src/Api/Cbor/CborEncoder.php` and `src/Cbor/CborEncoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) src/Api/Cbor/CborEncoder.php:263 — src/Api/Cbor/CborEncoder.php:263-275 | src/Api/Cbor/CborEncoder.php:292-304 | src/Cbor/CborEncoder.php:275-287 | src/Cbor/CborEncoder.php:304-316 — before extracting anything, compare `src/Api/Cbor/CborEncoder.php` and `src/Cbor/CborEncoder.php` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) src/Api/Parser/DecodingEventStreamIterator.php:153 — src/Api/Parser/DecodingEventStreamIterator.php:153-165 | src/Api/Parser/NonSeekableStreamDecodingEventStreamIterator.php:42-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×1
  • Duplicated block (11 lines × 4) src/Crypto/AlgorithmSuite.php:196 — src/Crypto/AlgorithmSuite.php:196-207 | src/Crypto/EncryptionTrait.php:71-81 | src/Crypto/EncryptionTraitV2.php:76-86 | src/Crypto/EncryptionTraitV3.php:87-98 — before extracting anything, compare `src/Crypto/EncryptionTraitV2.php` and `src/Crypto/EncryptionTraitV3.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Crypto/AlgorithmSuite.php:196` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) src/ClientSideMonitoring/ConfigurationProvider.php:161 — src/ClientSideMonitoring/ConfigurationProvider.php:161-170 | src/Retry/ConfigurationProvider.php:210-219 | src/S3/RegionalEndpoint/ConfigurationProvider.php:128-137 | src/Sts/RegionalEndpoints/ConfigurationProvider.php:149-158 — before extracting anything, compare `src/ClientSideMonitoring/ConfigurationProvider.php` and `src/S3/RegionalEndpoint/ConfigurationProvider.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ClientSideMonitoring/ConfigurationProvider.php:161` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×1
  • Duplicated block (9 lines × 6) src/ClientSideMonitoring/ConfigurationProvider.php:165 — src/ClientSideMonitoring/ConfigurationProvider.php:165-173 | src/DefaultsMode/ConfigurationProvider.php:153-161 | src/EndpointDiscovery/ConfigurationProvider.php:183-191 | src/Retry/ConfigurationProvider.php:214-222 | src/S3/RegionalEndpoint/ConfigurationProvider.php:132-140 | src/Sts/RegionalEndpoints/ConfigurationProvider.php:153-161 — before extracting anything, compare `src/ClientSideMonitoring/ConfigurationProvider.php` and `src/S3/RegionalEndpoint/ConfigurationProvider.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ClientSideMonitoring/ConfigurationProvider.php:165` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) src/ClientSideMonitoring/ConfigurationProvider.php:160 — src/ClientSideMonitoring/ConfigurationProvider.php:160-166 | src/Endpoint/UseFipsEndpoint/ConfigurationProvider.php:129-135 | src/Retry/ConfigurationProvider.php:209-215 | src/S3/RegionalEndpoint/ConfigurationProvider.php:127-133 | src/S3/UseArnRegion/ConfigurationProvider.php:130-136 | src/Sts/RegionalEndpoints/ConfigurationProvider.php:148-154 — before extracting anything, compare `src/ClientSideMonitoring/ConfigurationProvider.php` and `src/S3/RegionalEndpoint/ConfigurationProvider.php` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ClientSideMonitoring/ConfigurationProvider.php:160` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) src/Api/Parser/AbstractRestParser.php:258 — src/Api/Parser/AbstractRestParser.php:258-266 | src/Api/Parser/AbstractRestParser.php:367-372 | src/Api/Parser/MetadataParserTrait.php:77-82 — before extracting anything, compare `src/Api/Parser/AbstractRestParser.php` and `src/Api/Parser/MetadataParserTrait.php` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/Api/Parser/AbstractRestParser.php:258` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (2–6 lines × 5) · ×1
  • Duplicated block (2–6 lines × 5) src/Glacier/GlacierClient.php:386 — src/Glacier/GlacierClient.php:386-391 | src/Rds/RdsClient.php:3720-3725 | src/S3/S3Client.php:3290-3295 | src/S3/S3Client.php:3296-3297 | src/S3/S3Client.php:3303-3308 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) src/S3/RegionalEndpoint/Configuration.php:11 — src/S3/RegionalEndpoint/Configuration.php:11-40 | src/Sts/RegionalEndpoints/Configuration.php:11-40 — before extracting anything, compare `src/S3/RegionalEndpoint/Configuration.php` and `src/Sts/RegionalEndpoints/Configuration.php` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/S3/RegionalEndpoint/Configuration.php:11` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) src/AbstractConfigurationProvider.php:89 — src/AbstractConfigurationProvider.php:89-97 | src/Configuration/ConfigurationResolver.php:269-277 | src/Credentials/CredentialProvider.php:849-857 | src/Token/ParsesIniTrait.php:34-42 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18 lines × 4) · ×1
  • Duplicated block (18 lines × 4) src/DocDB/DocDBClient.php:897 — src/DocDB/DocDBClient.php:897-919 | src/Ec2/Ec2Client.php:1678-1695 | src/Neptune/NeptuneClient.php:1223-1245 | src/Rds/RdsClient.php:3678-3707 — before extracting anything, compare `src/DocDB/DocDBClient.php` and `src/Neptune/NeptuneClient.php` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
P12 · CI test-gate honesty · Coverage reaches no merge · ×1
  • Coverage reaches no merge .github/workflows/coverage.yml:46 — `codecov/codecov-action` uploads coverage, but the workflow runs only on pushes to named branches or tags — after the merge: no pull request ever reports coverage for `.`, and nothing that runs on one enforces a floor — the number can fall and every change still merges. Upload (or enforce the floor) on pull requests too.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×1
  • Outbound HTTP without resilience src/Handler/Guzzle/GuzzleHandler.php:35 — `new Client(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
X27 · Collection changed while being enumerated · Collection is structurally changed while it is being enumerated · ×1
  • Collection is structurally changed while it is being enumerated build/docs/js/combined.js:43 — `n` is walked by `n.forEach(…)` at line 43, and line 43 reassigns `n`. The walk keeps the iterator of the collection it started with, while the body from here on reads and writes another one.
Minor — 126 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×97
  • Orphaned file src/Api/Service.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/S3/Crypto/S3EncryptionClient.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/S3/BucketEndpointArnMiddleware.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/HandlerList.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/S3Control/EndpointArnMiddleware.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/CloudTrail/LogFileIterator.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/S3/S3EndpointMiddleware.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/Multipart/AbstractUploadManager.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/Crypto/MetadataEnvelope.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/Endpoint/Partition.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/S3/S3ClientTrait.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/Api/Validator.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/Glacier/MultipartUploader.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/S3/Crypto/InstructionFileMetadataStrategy.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/DynamoDb/WriteRequestBatch.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/S3/Crypto/S3EncryptionMultipartUploaderV3.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/Waiter.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/MultiRegionClient.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/Api/Parser/DecodingEventStreamIterator.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/EndpointDiscovery/ConfigurationProvider.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/ClientSideMonitoring/ConfigurationProvider.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/ClientSideMonitoring/AbstractMonitoringMiddleware.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/Token/TokenProvider.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/ClientSideMonitoring/ApiCallAttemptMonitoringMiddleware.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/DynamoDb/SessionHandler.php:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 72 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×18
  • Duplicated predicate src/ClientSideMonitoring/ConfigurationProvider.php:82 — `!isset($config['use_aws_shared_config_files']) || $config['use_aws_shared_config_files'] != false` appears character-identically in 8 files — src/ClientSideMonitoring/ConfigurationProvider.php, src/DefaultsMode/ConfigurationProvider.php, src/Endpoint/UseDualstackEndpoint/ConfigurationProvider.php, src/Endpoint/UseFipsEndpoint/ConfigurationProvider.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Credentials/CredentialProvider.php:99 — `!isset($config['use_aws_shared_config_files']) || $config['use_aws_shared_config_files'] !== false` appears character-identically in 2 files — src/Credentials/CredentialProvider.php, src/Token/TokenProvider.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Crypto/KmsMaterialsProviderV2.php:76 — `!isset($options['@kmsencryptioncontext']) || !is_array($options['@kmsencryptioncontext'])` appears character-identically in 2 files — src/Crypto/KmsMaterialsProviderV2.php, src/Crypto/KmsMaterialsProviderV3.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Crypto/DecryptionTrait.php:99 — `$cipherTextSize == null || $cipherTextSize <= 0` appears character-identically in 3 files — src/Crypto/DecryptionTrait.php, src/Crypto/DecryptionTraitV2.php, src/Crypto/DecryptionTraitV3.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/S3/S3Transfer/DirectoryDownloader.php:87 — `$progressTracker === null && $config['track_progress']` appears character-identically in 2 files — src/S3/S3Transfer/DirectoryDownloader.php, src/S3/S3Transfer/S3TransferManager.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Api/ErrorParser/AbstractRpcV2ErrorParser.php:126 — `count($parts) === 2 && $parts[0] && $parts[1]` appears character-identically in 2 files — src/Api/ErrorParser/AbstractRpcV2ErrorParser.php, src/Api/ErrorParser/JsonParserTrait.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/S3/S3Transfer/DirectoryDownloader.php:339 — `empty($resolved) || $resolved[0] !== $targetDirectory` appears character-identically in 2 files — src/S3/S3Transfer/DirectoryDownloader.php, src/S3/Transfer.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/S3/PostObject.php:131 — `getConfig('use_path_style_endpoint') === true || ($uri->getScheme() === 'https' && strpos($this->bucket, '.') !== false)` appears character-identically in 2 files — src/S3/PostObject.php, src/S3/PostObjectV4.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/ClientSideMonitoring/ConfigurationProvider.php:223 — `is_array($config) && isset($config['enabled'])` appears character-identically in 2 files — src/ClientSideMonitoring/ConfigurationProvider.php, src/EndpointDiscovery/ConfigurationProvider.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/S3/RegionalEndpoint/ConfigurationProvider.php:188 — `is_array($config) && isset($config['endpoints_type'])` appears character-identically in 2 files — src/S3/RegionalEndpoint/ConfigurationProvider.php, src/Sts/RegionalEndpoints/ConfigurationProvider.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Credentials/EcsCredentialProvider.php:66 — `is_string($timeout) && is_numeric($timeout)` appears character-identically in 2 files — src/Credentials/EcsCredentialProvider.php, src/Credentials/InstanceProfileProvider.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Multipart/AbstractUploadManager.php:66 — `isset($config['display_progress']) && is_bool($config['display_progress'])` appears character-identically in 2 files — src/Multipart/AbstractUploadManager.php, src/Multipart/UploadState.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Crypto/DecryptionTraitV2.php:295 — `isset($matdesc['aws:x-amz-cek-alg']) && ($envelope[MetadataEnvelope::CONTENT_CRYPTO_SCHEME_HEADER] !== $matdesc['aws:x-amz-cek-alg'])` appears character-identically in 2 files — src/Crypto/DecryptionTraitV2.php, src/Crypto/DecryptionTraitV3.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/S3/ObjectUploader.php:64 — `isset($options['add_content_md5']) && $options['add_content_md5'] === true` appears character-identically in 2 files — src/S3/ObjectUploader.php, src/S3/Transfer.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Api/Parser/XmlParser.php:169 — `mapKeyType >= XmlShapeType::STRUCTURE && $plan` appears character-identically in 2 files — src/Api/Parser/XmlParser.php, src/Api/Serializer/XmlBody.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Api/Parser/XmlParser.php:176 — `mapValueType >= XmlShapeType::STRUCTURE && $plan` appears character-identically in 2 files — src/Api/Parser/XmlParser.php, src/Api/Serializer/XmlBody.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Api/ErrorParser/AbstractRpcV2ErrorParser.php:145 — `str_contains($rawErrorCode, ':') && str_contains($rawErrorCode, '#')` appears character-identically in 2 files — src/Api/ErrorParser/AbstractRpcV2ErrorParser.php, src/Api/ErrorParser/JsonParserTrait.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/Endpoint/UseFipsEndpoint/ConfigurationProvider.php:169 — `strpos($region, 'fips-') !== false || strpos($region, '-fips') !== false` appears character-identically in 2 files — src/Endpoint/UseFipsEndpoint/ConfigurationProvider.php, src/functions.php. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
D16 · Bus Factor · Off-boarding risk · ×2
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 31 significant file(s) lose their only recent owner: src/SageMaker/SageMakerClient.php, src/QuickSight/QuickSightClient.php, src/Connect/ConnectClient.php, src/Glue/GlueClient.php, src/Ec2/Ec2Client.php, src/DataZone/DataZoneClient.php, src/BedrockAgentCoreControl/BedrockAgentCoreControlClient.php, src/SecurityHub/SecurityHubClient.php (+23 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 5 significant file(s) lose their only recent owner: src/DynamoDb/Marshaler.php, src/S3/Parser/ValidateResponseChecksumResultMutator.php, src/S3/ObjectUploader.php, src/Identity/S3/S3ExpressIdentityProvider.php, src/Command.php. Pair on, review, or document these before any departure.
AX6 · Interface segregation · Fat interface · ×1
  • Fat interface: S3ClientInterface (20 methods) src/S3/S3ClientInterface.php:2355 — `S3ClientInterface` declares 20 methods: `createPresignedRequest`, `getObjectUrl`, `doesBucketExist`, `doesBucketExistV2`, `doesObjectExist`, `doesObjectExistV2`, `registerStreamWrapper`, `registerStreamWrapperV2`, `deleteMatchingObjects`, `deleteMatchingObjectsAsync`, `upload`, `uploadAsync`, `copy`, `copyAsync`, `uploadDirectory`, `uploadDirectoryAsync`, `downloadBucket`, `downloadBucketAsync`, `determineBucketRegion`, `determineBucketRegionAsync`. Counted over its public instance methods, once per name; constants and static methods are not counted. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 6 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (43 single-owned of 608 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 608 of the 1293 production source files in this repository met that bar). They are anonymized user #3 (2 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: src/S3/S3Transfer/Models/ResumableDownload.php, src/TraceMiddleware.php, src/EndpointDiscovery/EndpointDiscoveryMiddleware.php, src/ResultPaginator.php, src/Handler/Guzzle/GuzzleHandler.php, src/SocketTimeout/Configuration.php, src/Api/TimestampShape.php.
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 97 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: src/S3/Crypto/S3EncryptionClient.php, src/S3/BucketEndpointArnMiddleware.php, src/HandlerList.php, src/S3Control/EndpointArnMiddleware.php, src/CloudTrail/LogFileIterator.php, src/S3/S3EndpointMiddleware.php, src/Multipart/AbstractUploadManager.php, src/Crypto/MetadataEnvelope.php (and 89 more) (101 orphaned of 631 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 631 of the 1293 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
P3 · Security & performance tooling · Dependabot does not watch composer · ×1
  • Dependabot does not watch composer .github/dependabot.yml:2 — `.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `composer`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list.
X5 · Nullable reference types · PHP static analysis does not check null everywhere · ×1
  • PHP static analysis does not check null everywhere — 0/1 of this repository's PHPStan/Psalm configuration(s) run at a level that checks null — PHPStan level 8 or above (`max` included), or Psalm `errorLevel` 3 or below (Psalm's default, with none stated, is 1). A PHPStan level written neither in the file nor in an include inside the repository is 0, PHPStan's own default. Below those levels the checker removes `null` from a union before any rule looks, so `$order->customer()->name()` on a `?Customer` passes, and the first null reaching it is an `Error: Call to a member function name() on null` in production.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×1
  • Hand-rolled JSON/XML parsing via regex src/S3/GetBucketLocationParser.php:33 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This PHP code already uses a real parser in the same package; use it here too.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×1
  • Silent fallback default on parse failure build/docs/classes/DocsBuilder.php:454 — `loadExamples` returns `[]` when `InvalidArgumentException` is thrown, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the docblock, and the row stops firing.
Minor — 16 finding(s)
D10 · Test Quality · Skipped (documented) · ×12
  • Skipped (documented): testResolvesAuthSchemeWithoutCRT tests/Auth/AuthSelectionMiddlewareTest.php:26 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
  • Skipped (documented): testResolvesAuthSchemeWithCRT tests/Auth/AuthSelectionMiddlewareTest.php:94 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
  • Skipped (documented): testAuthSelectionBasedOnUserPreference tests/Auth/AuthSelectionMiddlewareTest.php:303 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
  • Skipped (documented): testCanBuildCodeExamples tests/Build/Docs/CodeSnippetGeneratorTest.php:15 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
  • Skipped (documented): testChecksumValidation tests/S3/Parser/ValidateResponseChecksumResultMutatorTest.php:31 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
  • Skipped (documented): testFromFileRejectsSymbolicLinkTemporaryFile tests/S3/S3Transfer/Models/ResumableDownloadTest.php:364 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
  • Skipped (documented): testUploadDirectoryFollowsSymbolicLink tests/S3/S3Transfer/S3TransferManagerTest.php:953 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
  • Skipped (documented): testUploadDirectoryFailsOnCircularSymbolicLinkTraversal tests/S3/S3Transfer/S3TransferManagerTest.php:1049 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
  • Skipped (documented): testModeledCasesForDownload tests/S3/S3Transfer/S3TransferManagerTest.php:2940 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
  • Skipped (documented): testModeledCasesForUpload tests/S3/S3Transfer/S3TransferManagerTest.php:3112 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
  • Skipped (documented): testModeledCasesForUploadDirectory tests/S3/S3Transfer/S3TransferManagerTest.php:3258 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
  • Skipped (documented): testModeledCasesForDownloadDirectory tests/S3/S3Transfer/S3TransferManagerTest.php:3424 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by markTestSkipped()
D10 · Test Quality · No assertions (declared) · ×4
  • No assertions (declared): testVerifyDotChangesFolder tests/Build/Changelog/CurrentChangesTest.php:17 — This test performs no assertions and its author said so, with the test framework's own declaration for exactly that (PHPUnit `#[DoesNotPerformAssertions]`, which switches off PHPUnit's "This test did not perform any assertions" warning). It is reported for visibility and is NOT counted against this dimension's score: D10 looks for tests that verify nothing unintentionally. Worth a read anyway — such a test passes as long as the code under it does not throw, so if it was meant to check something, the declaration is now hiding that it does not.
  • No assertions (declared): testVerifyNextreleaseContents tests/Build/Changelog/CurrentChangesTest.php:36 — This test performs no assertions and its author said so, with the test framework's own declaration for exactly that (PHPUnit `#[DoesNotPerformAssertions]`, which switches off PHPUnit's "This test did not perform any assertions" warning). It is reported for visibility and is NOT counted against this dimension's score: D10 looks for tests that verify nothing unintentionally. Worth a read anyway — such a test passes as long as the code under it does not throw, so if it was meant to check something, the declaration is now hiding that it does not.
  • No assertions (declared): testRulesetCreationWithValidTypes tests/EndpointV2/RulesetParameterTest.php:89 — This test performs no assertions and its author said so, with the test framework's own declaration for exactly that (PHPUnit `#[DoesNotPerformAssertions]`, which switches off PHPUnit's "This test did not perform any assertions" warning). It is reported for visibility and is NOT counted against this dimension's score: D10 looks for tests that verify nothing unintentionally. Worth a read anyway — such a test passes as long as the code under it does not throw, so if it was meant to check something, the declaration is now hiding that it does not.
  • No assertions (declared): testIgnoreWhenNameNotFound tests/HandlerListTest.php:62 — This test performs no assertions and its author said so, with the test framework's own declaration for exactly that (PHPUnit `#[DoesNotPerformAssertions]`, which switches off PHPUnit's "This test did not perform any assertions" warning). It is reported for visibility and is NOT counted against this dimension's score: D10 looks for tests that verify nothing unintentionally. Worth a read anyway — such a test passes as long as the code under it does not throw, so if it was meant to check something, the declaration is now hiding that it does not.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-7e6adcc4a7cb4b379178d01cfefe4b2f/tree.json --exit-code 0 --source .0—
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .3artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesnone (dependency manifest found, not scanned for vulnerabilities here)—none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (composer.json — not scanned yet).0—
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .0artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 14 file(s) — `src/Crypto/DecryptionTraitV2.php`, `src/Crypto/DecryptionTraitV3.php`, `src/EndpointV2/Bdd/BddEvaluator.php`, `src/EndpointV2/Bdd/BddResultResolver.php`, `src/EndpointV2/Bdd/BddRuleset.php`, … (+9 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D36 · Supply-chain Provenance & Signingprovenance—provenance: not applicable — The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files).0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesnone (dependency manifest found, not scanned for vulnerabilities here)—none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (composer.json — not scanned yet).0—

Run 01a1ec0f-9aa4-70bd-8af3-4fa3cbafd616 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md