anthropics / anthropic-sdk-php
Source Code Overview

Analysis scope, overview of main, test, generated, deployment, build, and other code.

Source Code Analysis Scope
Files includes and excluded from analyses
gitattributes
  • 7 extensions are included in analyses: php, yaml, md, json, gitignore, gitattributes, txt
Overview of Analyzed Files
Basic stats on analyzed files
Intro
For analysis purposes we separate files in scope into several categories: main, test, generated, deployment and build, and other.

  • The main category contains all manually created source code files that are being used in the production.
  • Files in the main category are used as input for other analyses: logical decomposition, concerns, duplication, file size, unit size, and conditional complexity.
  • Test source code files are used only for testing of the product. These files are normally not deployed to production.
  • Build and deployment source code files are used to configure or support build and deployment process.
  • Generated source code files are automatically generated files that have not been manually changed after generation.
  • While a source code folder may contain a number of files, we are primarily interested in the source code files that are being written and maintained by developers.
  • Files containing binaries, documentation, or third-party libraries, for instance, are excluded from analysis. The exception are third-party libraries that have been changed by developers.

main64603 LOC (88%) 1,538 files
test6607 LOC (9%) 51 files
generated0 LOC (0%) 0 files
build and deployment27 LOC (<1%) 2 files
other1649 LOC (2%) 31 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1538 files match defined criteria (64,603 LOC, 100.0% vs. main code). All matches are in *.php files.


*.php64603 LOC (100%) 1,538 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
  • 51 files match defined criteria (6,607 LOC, 10.2% vs. main code). All matches are in *.php files.


*.php6607 LOC (100%) 51 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
gitattributes
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/composer[.]json".
    • files with paths like ".*/[.]gitattributes".
  • 2 files match defined criteria (27 LOC, 0.0% vs. main code):
    • 1 *.gitattributes files (14 LOC)
    • 1 *.gitignore files (13 LOC)
  • " *.gitattributes" is biggest, containing 51.85% of LOC.
  • " *.gitignore" is smallest, containing 48.15% of LOC.


*.gitattributes14 LOC (51%) 1 file
*.gitignore13 LOC (48%) 1 file
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]json".
    • files with paths like ".*/README[.][a-z0-9]+".
  • 31 files match defined criteria (1,649 LOC, 2.6% vs. main code):
    • 23 *.php files (852 LOC)
    • 4 *.md files (656 LOC)
    • 4 *.json files (141 LOC)
  • " *.php" is biggest, containing 51.67% of LOC.
  • " *.json" is smallest, containing 8.55% of LOC.


*.php852 LOC (51%) 23 files
*.md656 LOC (39%) 4 files
*.json141 LOC (8%) 4 files
Analyzers
Info about analyzers used for source code examinations.
  • *.php files are analyzed with PhpAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Basic heuristic dependency analysis


2026-06-24 10:46