Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
- Implemented the PhpAnalyzerPlugin to analyze PHP projects. - Created ComposerLockData class to represent data from composer.lock files. - Developed ComposerLockReader to load and parse composer.lock files asynchronously. - Introduced ComposerPackage class to encapsulate package details. - Added PhpPackage class to represent PHP packages with metadata and evidence. - Implemented PhpPackageCollector to gather packages from ComposerLockData. - Created PhpLanguageAnalyzer to perform analysis and emit results. - Added capability signals for known PHP frameworks and CMS. - Developed unit tests for the PHP language analyzer and its components. - Included sample composer.lock and expected output for testing. - Updated project files for the new PHP analyzer library and tests.
17 lines
491 B
C#
17 lines
491 B
C#
using StellaOps.Scanner.Analyzers.Lang.Plugin;
|
|
|
|
namespace StellaOps.Scanner.Analyzers.Lang.Php;
|
|
|
|
public sealed class PhpAnalyzerPlugin : ILanguageAnalyzerPlugin
|
|
{
|
|
public string Name => "StellaOps.Scanner.Analyzers.Lang.Php";
|
|
|
|
public bool IsAvailable(IServiceProvider services) => services is not null;
|
|
|
|
public ILanguageAnalyzer CreateAnalyzer(IServiceProvider services)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(services);
|
|
return new PhpLanguageAnalyzer();
|
|
}
|
|
}
|