🧪 Tests ok
continuous-integration/drone/push Build is passing Details

clean_web
Antoine PEREDERII 1 year ago
parent 19f37061e0
commit a13036b9de

546
Sources/composer.lock generated

File diff suppressed because it is too large Load Diff

@ -2,7 +2,7 @@
require_once __DIR__ . '/../vendor/autoload.php'; require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../config/config.php'; require_once __DIR__ . '/../config/config.php';
echo "hello";
use App\AppCreator; use App\AppCreator;
use App\Router\Middleware\LoggingMiddleware; use App\Router\Middleware\LoggingMiddleware;
use App\Router\Request\RequestFactory; use App\Router\Request\RequestFactory;
@ -49,10 +49,6 @@ $appFactory->registerService(INotificationRepository::class, NotificationReposit
$appFactory->registerService(IUserRepository::class, UserRepository::class); $appFactory->registerService(IUserRepository::class, UserRepository::class);
echo "hallo";
$appFactory->registerService(\Twig\Loader\LoaderInterface::class, function() { $appFactory->registerService(\Twig\Loader\LoaderInterface::class, function() {
return new FilesystemLoader(__DIR__ . '/../src/app/views/Templates'); return new FilesystemLoader(__DIR__ . '/../src/app/views/Templates');
}); });
@ -64,10 +60,8 @@ $appFactory->registerService(\Twig\Environment::class,\Twig\Environment::class);
$appFactory->AddControllers(); $appFactory->AddControllers();
echo "holla";
$app = $appFactory->create(); $app = $appFactory->create();
if (!is_null($app)){ if (!is_null($app)){
echo "va bien te faire ...";
// Ajout des Middleware // Ajout des Middleware
/*$app->use(new LoggingMiddleware());*/ /*$app->use(new LoggingMiddleware());*/
$app->use(new AuthMiddleware($appFactory->getDicontainer()->get(IAuthService::class) )); $app->use(new AuthMiddleware($appFactory->getDicontainer()->get(IAuthService::class) ));
@ -75,5 +69,3 @@ if (!is_null($app)){
$app->run(RequestFactory::createFromGlobals()); $app->run(RequestFactory::createFromGlobals());
} }
echo "meerde";

@ -1,5 +1,4 @@
<?php <?php
use Shared\Log;
class AltoRouter { class AltoRouter {
@ -101,8 +100,6 @@ class AltoRouter {
public function generate($routeName, array $params = array()) { public function generate($routeName, array $params = array()) {
// Check if named route exists // Check if named route exists
if(!isset($this->namedRoutes[$routeName])) { if(!isset($this->namedRoutes[$routeName])) {
throw new \Exception("Route '{$routeName}' does not exist."); throw new \Exception("Route '{$routeName}' does not exist.");
} }

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit1887e85fc3cfddacf8d7e17588dae6f1::getLoader(); return ComposerAutoloaderInit4c2287070574f70d470b239b224aef76::getLoader();

@ -70,7 +70,6 @@ return array(
'PHPUnit\\Event\\Telemetry\\SystemStopWatchWithOffset' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatchWithOffset.php', 'PHPUnit\\Event\\Telemetry\\SystemStopWatchWithOffset' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatchWithOffset.php',
'PHPUnit\\Event\\TestData\\DataFromDataProvider' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromDataProvider.php', 'PHPUnit\\Event\\TestData\\DataFromDataProvider' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromDataProvider.php',
'PHPUnit\\Event\\TestData\\DataFromTestDependency' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromTestDependency.php', 'PHPUnit\\Event\\TestData\\DataFromTestDependency' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromTestDependency.php',
'PHPUnit\\Event\\TestData\\MoreThanOneDataSetFromDataProviderException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/MoreThanOneDataSetFromDataProviderException.php',
'PHPUnit\\Event\\TestData\\NoDataSetFromDataProviderException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/NoDataSetFromDataProviderException.php', 'PHPUnit\\Event\\TestData\\NoDataSetFromDataProviderException' => $vendorDir . '/phpunit/phpunit/src/Event/Exception/NoDataSetFromDataProviderException.php',
'PHPUnit\\Event\\TestData\\TestData' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestData/TestData.php', 'PHPUnit\\Event\\TestData\\TestData' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestData/TestData.php',
'PHPUnit\\Event\\TestData\\TestDataCollection' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestData/TestDataCollection.php', 'PHPUnit\\Event\\TestData\\TestDataCollection' => $vendorDir . '/phpunit/phpunit/src/Event/Value/Test/TestData/TestDataCollection.php',
@ -130,10 +129,6 @@ return array(
'PHPUnit\\Event\\Test\\AfterTestMethodCalledSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodCalledSubscriber.php', 'PHPUnit\\Event\\Test\\AfterTestMethodCalledSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodCalledSubscriber.php',
'PHPUnit\\Event\\Test\\AfterTestMethodFinished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinished.php', 'PHPUnit\\Event\\Test\\AfterTestMethodFinished' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinished.php',
'PHPUnit\\Event\\Test\\AfterTestMethodFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinishedSubscriber.php', 'PHPUnit\\Event\\Test\\AfterTestMethodFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinishedSubscriber.php',
'PHPUnit\\Event\\Test\\AssertionFailed' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Assertion/AssertionFailed.php',
'PHPUnit\\Event\\Test\\AssertionFailedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Assertion/AssertionFailedSubscriber.php',
'PHPUnit\\Event\\Test\\AssertionSucceeded' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Assertion/AssertionSucceeded.php',
'PHPUnit\\Event\\Test\\AssertionSucceededSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/Assertion/AssertionSucceededSubscriber.php',
'PHPUnit\\Event\\Test\\BeforeFirstTestMethodCalled' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalled.php', 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodCalled' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalled.php',
'PHPUnit\\Event\\Test\\BeforeFirstTestMethodCalledSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalledSubscriber.php', 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodCalledSubscriber' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalledSubscriber.php',
'PHPUnit\\Event\\Test\\BeforeFirstTestMethodErrored' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodErrored.php', 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodErrored' => $vendorDir . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodErrored.php',
@ -235,7 +230,6 @@ return array(
'PHPUnit\\Framework\\Attributes\\BackupStaticProperties' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/BackupStaticProperties.php', 'PHPUnit\\Framework\\Attributes\\BackupStaticProperties' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/BackupStaticProperties.php',
'PHPUnit\\Framework\\Attributes\\Before' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Before.php', 'PHPUnit\\Framework\\Attributes\\Before' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Before.php',
'PHPUnit\\Framework\\Attributes\\BeforeClass' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/BeforeClass.php', 'PHPUnit\\Framework\\Attributes\\BeforeClass' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/BeforeClass.php',
'PHPUnit\\Framework\\Attributes\\CodeCoverageIgnore' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CodeCoverageIgnore.php',
'PHPUnit\\Framework\\Attributes\\CoversClass' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversClass.php', 'PHPUnit\\Framework\\Attributes\\CoversClass' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversClass.php',
'PHPUnit\\Framework\\Attributes\\CoversFunction' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversFunction.php', 'PHPUnit\\Framework\\Attributes\\CoversFunction' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversFunction.php',
'PHPUnit\\Framework\\Attributes\\CoversNothing' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversNothing.php', 'PHPUnit\\Framework\\Attributes\\CoversNothing' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/CoversNothing.php',
@ -254,10 +248,8 @@ return array(
'PHPUnit\\Framework\\Attributes\\ExcludeGlobalVariableFromBackup' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/ExcludeGlobalVariableFromBackup.php', 'PHPUnit\\Framework\\Attributes\\ExcludeGlobalVariableFromBackup' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/ExcludeGlobalVariableFromBackup.php',
'PHPUnit\\Framework\\Attributes\\ExcludeStaticPropertyFromBackup' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/ExcludeStaticPropertyFromBackup.php', 'PHPUnit\\Framework\\Attributes\\ExcludeStaticPropertyFromBackup' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/ExcludeStaticPropertyFromBackup.php',
'PHPUnit\\Framework\\Attributes\\Group' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Group.php', 'PHPUnit\\Framework\\Attributes\\Group' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Group.php',
'PHPUnit\\Framework\\Attributes\\IgnoreClassForCodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/IgnoreClassForCodeCoverage.php',
'PHPUnit\\Framework\\Attributes\\IgnoreDeprecations' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/IgnoreDeprecations.php', 'PHPUnit\\Framework\\Attributes\\IgnoreDeprecations' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/IgnoreDeprecations.php',
'PHPUnit\\Framework\\Attributes\\IgnoreFunctionForCodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/IgnoreFunctionForCodeCoverage.php', 'PHPUnit\\Framework\\Attributes\\IgnorePhpunitDeprecations' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/IgnorePhpunitDeprecations.php',
'PHPUnit\\Framework\\Attributes\\IgnoreMethodForCodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/IgnoreMethodForCodeCoverage.php',
'PHPUnit\\Framework\\Attributes\\Large' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Large.php', 'PHPUnit\\Framework\\Attributes\\Large' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Large.php',
'PHPUnit\\Framework\\Attributes\\Medium' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Medium.php', 'PHPUnit\\Framework\\Attributes\\Medium' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/Medium.php',
'PHPUnit\\Framework\\Attributes\\PostCondition' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/PostCondition.php', 'PHPUnit\\Framework\\Attributes\\PostCondition' => $vendorDir . '/phpunit/phpunit/src/Framework/Attributes/PostCondition.php',
@ -365,6 +357,8 @@ return array(
'PHPUnit\\Framework\\MockObject\\ConfigurableMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php', 'PHPUnit\\Framework\\MockObject\\ConfigurableMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php',
'PHPUnit\\Framework\\MockObject\\DoubledCloneMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/DoubledCloneMethod.php', 'PHPUnit\\Framework\\MockObject\\DoubledCloneMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/DoubledCloneMethod.php',
'PHPUnit\\Framework\\MockObject\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php', 'PHPUnit\\Framework\\MockObject\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php',
'PHPUnit\\Framework\\MockObject\\GeneratedAsMockObject' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/GeneratedAsMockObject.php',
'PHPUnit\\Framework\\MockObject\\GeneratedAsTestStub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/GeneratedAsTestStub.php',
'PHPUnit\\Framework\\MockObject\\Generator\\ClassAlreadyExistsException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassAlreadyExistsException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\ClassAlreadyExistsException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassAlreadyExistsException.php',
'PHPUnit\\Framework\\MockObject\\Generator\\ClassIsEnumerationException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsEnumerationException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\ClassIsEnumerationException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsEnumerationException.php',
'PHPUnit\\Framework\\MockObject\\Generator\\ClassIsFinalException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsFinalException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\ClassIsFinalException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsFinalException.php',
@ -507,6 +501,15 @@ return array(
'PHPUnit\\Logging\\TestDox\\TestResultCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollectionIterator.php', 'PHPUnit\\Logging\\TestDox\\TestResultCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollectionIterator.php',
'PHPUnit\\Logging\\TestDox\\TestResultCollector' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php', 'PHPUnit\\Logging\\TestDox\\TestResultCollector' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php',
'PHPUnit\\Logging\\TestDox\\TestSkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestSkippedSubscriber.php', 'PHPUnit\\Logging\\TestDox\\TestSkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestSkippedSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredDeprecationSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredNoticeSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredNoticeSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpDeprecationSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpNoticeSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpNoticeSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpWarningSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitErrorSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitErrorSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitWarningSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredWarningSubscriber.php',
'PHPUnit\\Metadata\\After' => $vendorDir . '/phpunit/phpunit/src/Metadata/After.php', 'PHPUnit\\Metadata\\After' => $vendorDir . '/phpunit/phpunit/src/Metadata/After.php',
'PHPUnit\\Metadata\\AfterClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/AfterClass.php', 'PHPUnit\\Metadata\\AfterClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/AfterClass.php',
'PHPUnit\\Metadata\\Annotation\\Parser\\DocBlock' => $vendorDir . '/phpunit/phpunit/src/Metadata/Parser/Annotation/DocBlock.php', 'PHPUnit\\Metadata\\Annotation\\Parser\\DocBlock' => $vendorDir . '/phpunit/phpunit/src/Metadata/Parser/Annotation/DocBlock.php',
@ -535,10 +538,8 @@ return array(
'PHPUnit\\Metadata\\ExcludeGlobalVariableFromBackup' => $vendorDir . '/phpunit/phpunit/src/Metadata/ExcludeGlobalVariableFromBackup.php', 'PHPUnit\\Metadata\\ExcludeGlobalVariableFromBackup' => $vendorDir . '/phpunit/phpunit/src/Metadata/ExcludeGlobalVariableFromBackup.php',
'PHPUnit\\Metadata\\ExcludeStaticPropertyFromBackup' => $vendorDir . '/phpunit/phpunit/src/Metadata/ExcludeStaticPropertyFromBackup.php', 'PHPUnit\\Metadata\\ExcludeStaticPropertyFromBackup' => $vendorDir . '/phpunit/phpunit/src/Metadata/ExcludeStaticPropertyFromBackup.php',
'PHPUnit\\Metadata\\Group' => $vendorDir . '/phpunit/phpunit/src/Metadata/Group.php', 'PHPUnit\\Metadata\\Group' => $vendorDir . '/phpunit/phpunit/src/Metadata/Group.php',
'PHPUnit\\Metadata\\IgnoreClassForCodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Metadata/IgnoreClassForCodeCoverage.php',
'PHPUnit\\Metadata\\IgnoreDeprecations' => $vendorDir . '/phpunit/phpunit/src/Metadata/IgnoreDeprecations.php', 'PHPUnit\\Metadata\\IgnoreDeprecations' => $vendorDir . '/phpunit/phpunit/src/Metadata/IgnoreDeprecations.php',
'PHPUnit\\Metadata\\IgnoreFunctionForCodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Metadata/IgnoreFunctionForCodeCoverage.php', 'PHPUnit\\Metadata\\IgnorePhpunitDeprecations' => $vendorDir . '/phpunit/phpunit/src/Metadata/IgnorePhpunitDeprecations.php',
'PHPUnit\\Metadata\\IgnoreMethodForCodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Metadata/IgnoreMethodForCodeCoverage.php',
'PHPUnit\\Metadata\\InvalidVersionRequirementException' => $vendorDir . '/phpunit/phpunit/src/Metadata/Exception/InvalidVersionRequirementException.php', 'PHPUnit\\Metadata\\InvalidVersionRequirementException' => $vendorDir . '/phpunit/phpunit/src/Metadata/Exception/InvalidVersionRequirementException.php',
'PHPUnit\\Metadata\\Metadata' => $vendorDir . '/phpunit/phpunit/src/Metadata/Metadata.php', 'PHPUnit\\Metadata\\Metadata' => $vendorDir . '/phpunit/phpunit/src/Metadata/Metadata.php',
'PHPUnit\\Metadata\\MetadataCollection' => $vendorDir . '/phpunit/phpunit/src/Metadata/MetadataCollection.php', 'PHPUnit\\Metadata\\MetadataCollection' => $vendorDir . '/phpunit/phpunit/src/Metadata/MetadataCollection.php',
@ -595,6 +596,11 @@ return array(
'PHPUnit\\Runner\\ClassDoesNotExtendTestCaseException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/ClassDoesNotExtendTestCaseException.php', 'PHPUnit\\Runner\\ClassDoesNotExtendTestCaseException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/ClassDoesNotExtendTestCaseException.php',
'PHPUnit\\Runner\\ClassIsAbstractException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/ClassIsAbstractException.php', 'PHPUnit\\Runner\\ClassIsAbstractException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/ClassIsAbstractException.php',
'PHPUnit\\Runner\\CodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Runner/CodeCoverage.php', 'PHPUnit\\Runner\\CodeCoverage' => $vendorDir . '/phpunit/phpunit/src/Runner/CodeCoverage.php',
'PHPUnit\\Runner\\DeprecationCollector\\Collector' => $vendorDir . '/phpunit/phpunit/src/Runner/DeprecationCollector/Collector.php',
'PHPUnit\\Runner\\DeprecationCollector\\Facade' => $vendorDir . '/phpunit/phpunit/src/Runner/DeprecationCollector/Facade.php',
'PHPUnit\\Runner\\DeprecationCollector\\Subscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/Subscriber.php',
'PHPUnit\\Runner\\DeprecationCollector\\TestPreparedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/TestPreparedSubscriber.php',
'PHPUnit\\Runner\\DeprecationCollector\\TestTriggeredDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/TestTriggeredDeprecationSubscriber.php',
'PHPUnit\\Runner\\DirectoryCannotBeCreatedException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/DirectoryCannotBeCreatedException.php', 'PHPUnit\\Runner\\DirectoryCannotBeCreatedException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/DirectoryCannotBeCreatedException.php',
'PHPUnit\\Runner\\ErrorException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/ErrorException.php', 'PHPUnit\\Runner\\ErrorException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/ErrorException.php',
'PHPUnit\\Runner\\ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Runner/ErrorHandler.php', 'PHPUnit\\Runner\\ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Runner/ErrorHandler.php',
@ -606,9 +612,11 @@ return array(
'PHPUnit\\Runner\\Extension\\PharLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/Extension/PharLoader.php', 'PHPUnit\\Runner\\Extension\\PharLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/Extension/PharLoader.php',
'PHPUnit\\Runner\\FileDoesNotExistException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/FileDoesNotExistException.php', 'PHPUnit\\Runner\\FileDoesNotExistException' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception/FileDoesNotExistException.php',
'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php', 'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\ExcludeNameFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/ExcludeNameFilterIterator.php',
'PHPUnit\\Runner\\Filter\\Factory' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Factory.php', 'PHPUnit\\Runner\\Filter\\Factory' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Factory.php',
'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php', 'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php', 'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\IncludeNameFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/IncludeNameFilterIterator.php',
'PHPUnit\\Runner\\Filter\\NameFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php', 'PHPUnit\\Runner\\Filter\\NameFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php',
'PHPUnit\\Runner\\Filter\\TestIdFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/TestIdFilterIterator.php', 'PHPUnit\\Runner\\Filter\\TestIdFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/TestIdFilterIterator.php',
'PHPUnit\\Runner\\GarbageCollection\\ExecutionFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/ExecutionFinishedSubscriber.php', 'PHPUnit\\Runner\\GarbageCollection\\ExecutionFinishedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/ExecutionFinishedSubscriber.php',
@ -680,6 +688,7 @@ return array(
'PHPUnit\\TextUI\\Command\\Command' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Command.php', 'PHPUnit\\TextUI\\Command\\Command' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Command.php',
'PHPUnit\\TextUI\\Command\\GenerateConfigurationCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/GenerateConfigurationCommand.php', 'PHPUnit\\TextUI\\Command\\GenerateConfigurationCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/GenerateConfigurationCommand.php',
'PHPUnit\\TextUI\\Command\\ListGroupsCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/ListGroupsCommand.php', 'PHPUnit\\TextUI\\Command\\ListGroupsCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/ListGroupsCommand.php',
'PHPUnit\\TextUI\\Command\\ListTestFilesCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestFilesCommand.php',
'PHPUnit\\TextUI\\Command\\ListTestSuitesCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestSuitesCommand.php', 'PHPUnit\\TextUI\\Command\\ListTestSuitesCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestSuitesCommand.php',
'PHPUnit\\TextUI\\Command\\ListTestsAsTextCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsTextCommand.php', 'PHPUnit\\TextUI\\Command\\ListTestsAsTextCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsTextCommand.php',
'PHPUnit\\TextUI\\Command\\ListTestsAsXmlCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsXmlCommand.php', 'PHPUnit\\TextUI\\Command\\ListTestsAsXmlCommand' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsXmlCommand.php',
@ -844,6 +853,7 @@ return array(
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveLoggingElements' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveLoggingElements.php', 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveLoggingElements' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveLoggingElements.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveNoInteractionAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveNoInteractionAttribute.php', 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveNoInteractionAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveNoInteractionAttribute.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemovePrinterAttributes' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemovePrinterAttributes.php', 'PHPUnit\\TextUI\\XmlConfiguration\\RemovePrinterAttributes' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemovePrinterAttributes.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveRegisterMockObjectsFromTestArgumentsRecursivelyAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveRegisterMockObjectsFromTestArgumentsRecursivelyAttribute.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveTestDoxGroupsElement' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestDoxGroupsElement.php', 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveTestDoxGroupsElement' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestDoxGroupsElement.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveTestSuiteLoaderAttributes' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestSuiteLoaderAttributes.php', 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveTestSuiteLoaderAttributes' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestSuiteLoaderAttributes.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveVerboseAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveVerboseAttribute.php', 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveVerboseAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveVerboseAttribute.php',
@ -863,7 +873,6 @@ return array(
'PHPUnit\\Util\\Color' => $vendorDir . '/phpunit/phpunit/src/Util/Color.php', 'PHPUnit\\Util\\Color' => $vendorDir . '/phpunit/phpunit/src/Util/Color.php',
'PHPUnit\\Util\\Exception' => $vendorDir . '/phpunit/phpunit/src/Util/Exception/Exception.php', 'PHPUnit\\Util\\Exception' => $vendorDir . '/phpunit/phpunit/src/Util/Exception/Exception.php',
'PHPUnit\\Util\\ExcludeList' => $vendorDir . '/phpunit/phpunit/src/Util/ExcludeList.php', 'PHPUnit\\Util\\ExcludeList' => $vendorDir . '/phpunit/phpunit/src/Util/ExcludeList.php',
'PHPUnit\\Util\\Exporter' => $vendorDir . '/phpunit/phpunit/src/Util/Exporter.php',
'PHPUnit\\Util\\Filesystem' => $vendorDir . '/phpunit/phpunit/src/Util/Filesystem.php', 'PHPUnit\\Util\\Filesystem' => $vendorDir . '/phpunit/phpunit/src/Util/Filesystem.php',
'PHPUnit\\Util\\Filter' => $vendorDir . '/phpunit/phpunit/src/Util/Filter.php', 'PHPUnit\\Util\\Filter' => $vendorDir . '/phpunit/phpunit/src/Util/Filter.php',
'PHPUnit\\Util\\GlobalState' => $vendorDir . '/phpunit/phpunit/src/Util/GlobalState.php', 'PHPUnit\\Util\\GlobalState' => $vendorDir . '/phpunit/phpunit/src/Util/GlobalState.php',
@ -923,6 +932,7 @@ return array(
'PharIo\\Manifest\\ManifestLoader' => $vendorDir . '/phar-io/manifest/src/ManifestLoader.php', 'PharIo\\Manifest\\ManifestLoader' => $vendorDir . '/phar-io/manifest/src/ManifestLoader.php',
'PharIo\\Manifest\\ManifestLoaderException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php', 'PharIo\\Manifest\\ManifestLoaderException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php',
'PharIo\\Manifest\\ManifestSerializer' => $vendorDir . '/phar-io/manifest/src/ManifestSerializer.php', 'PharIo\\Manifest\\ManifestSerializer' => $vendorDir . '/phar-io/manifest/src/ManifestSerializer.php',
'PharIo\\Manifest\\NoEmailAddressException' => $vendorDir . '/phar-io/manifest/src/exceptions/NoEmailAddressException.php',
'PharIo\\Manifest\\PhpElement' => $vendorDir . '/phar-io/manifest/src/xml/PhpElement.php', 'PharIo\\Manifest\\PhpElement' => $vendorDir . '/phar-io/manifest/src/xml/PhpElement.php',
'PharIo\\Manifest\\PhpExtensionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpExtensionRequirement.php', 'PharIo\\Manifest\\PhpExtensionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpExtensionRequirement.php',
'PharIo\\Manifest\\PhpVersionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpVersionRequirement.php', 'PharIo\\Manifest\\PhpVersionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpVersionRequirement.php',

@ -22,7 +22,6 @@ return array(
'Network\\' => array($baseDir . '/src/data/core/network'), 'Network\\' => array($baseDir . '/src/data/core/network'),
'Model\\' => array($baseDir . '/src/data/model'), 'Model\\' => array($baseDir . '/src/data/model'),
'Manager\\' => array($baseDir . '/src/data/model/manager'), 'Manager\\' => array($baseDir . '/src/data/model/manager'),
'Json\\' => array($baseDir . '/src/data/core/json'),
'Hearttrack\\' => array($baseDir . '/src'), 'Hearttrack\\' => array($baseDir . '/src'),
'GrahamCampbell\\ResultType\\' => array($vendorDir . '/graham-campbell/result-type/src'), 'GrahamCampbell\\ResultType\\' => array($vendorDir . '/graham-campbell/result-type/src'),
'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'), 'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'),

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInit1887e85fc3cfddacf8d7e17588dae6f1 class ComposerAutoloaderInit4c2287070574f70d470b239b224aef76
{ {
private static $loader; private static $loader;
@ -24,16 +24,16 @@ class ComposerAutoloaderInit1887e85fc3cfddacf8d7e17588dae6f1
require __DIR__ . '/platform_check.php'; require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit1887e85fc3cfddacf8d7e17588dae6f1', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInit4c2287070574f70d470b239b224aef76', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit1887e85fc3cfddacf8d7e17588dae6f1', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInit4c2287070574f70d470b239b224aef76', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php'; require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInit4c2287070574f70d470b239b224aef76::getInitializer($loader));
$loader->register(true); $loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1::$files; $filesToLoad = \Composer\Autoload\ComposerStaticInit4c2287070574f70d470b239b224aef76::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) { $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

@ -4,7 +4,7 @@
namespace Composer\Autoload; namespace Composer\Autoload;
class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1 class ComposerStaticInit4c2287070574f70d470b239b224aef76
{ {
public static $files = array ( public static $files = array (
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
@ -52,10 +52,6 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'Model\\' => 6, 'Model\\' => 6,
'Manager\\' => 8, 'Manager\\' => 8,
), ),
'J' =>
array (
'Json\\' => 5,
),
'H' => 'H' =>
array ( array (
'Hearttrack\\' => 11, 'Hearttrack\\' => 11,
@ -155,10 +151,6 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
array ( array (
0 => __DIR__ . '/../..' . '/src/data/model/manager', 0 => __DIR__ . '/../..' . '/src/data/model/manager',
), ),
'Json\\' =>
array (
0 => __DIR__ . '/../..' . '/src/data/core/json',
),
'Hearttrack\\' => 'Hearttrack\\' =>
array ( array (
0 => __DIR__ . '/../..' . '/src', 0 => __DIR__ . '/../..' . '/src',
@ -286,7 +278,6 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PHPUnit\\Event\\Telemetry\\SystemStopWatchWithOffset' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatchWithOffset.php', 'PHPUnit\\Event\\Telemetry\\SystemStopWatchWithOffset' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatchWithOffset.php',
'PHPUnit\\Event\\TestData\\DataFromDataProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromDataProvider.php', 'PHPUnit\\Event\\TestData\\DataFromDataProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromDataProvider.php',
'PHPUnit\\Event\\TestData\\DataFromTestDependency' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromTestDependency.php', 'PHPUnit\\Event\\TestData\\DataFromTestDependency' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestData/DataFromTestDependency.php',
'PHPUnit\\Event\\TestData\\MoreThanOneDataSetFromDataProviderException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/MoreThanOneDataSetFromDataProviderException.php',
'PHPUnit\\Event\\TestData\\NoDataSetFromDataProviderException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/NoDataSetFromDataProviderException.php', 'PHPUnit\\Event\\TestData\\NoDataSetFromDataProviderException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Exception/NoDataSetFromDataProviderException.php',
'PHPUnit\\Event\\TestData\\TestData' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestData/TestData.php', 'PHPUnit\\Event\\TestData\\TestData' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestData/TestData.php',
'PHPUnit\\Event\\TestData\\TestDataCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestData/TestDataCollection.php', 'PHPUnit\\Event\\TestData\\TestDataCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Value/Test/TestData/TestDataCollection.php',
@ -346,10 +337,6 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PHPUnit\\Event\\Test\\AfterTestMethodCalledSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodCalledSubscriber.php', 'PHPUnit\\Event\\Test\\AfterTestMethodCalledSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodCalledSubscriber.php',
'PHPUnit\\Event\\Test\\AfterTestMethodFinished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinished.php', 'PHPUnit\\Event\\Test\\AfterTestMethodFinished' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinished.php',
'PHPUnit\\Event\\Test\\AfterTestMethodFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinishedSubscriber.php', 'PHPUnit\\Event\\Test\\AfterTestMethodFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/AfterTestMethodFinishedSubscriber.php',
'PHPUnit\\Event\\Test\\AssertionFailed' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Assertion/AssertionFailed.php',
'PHPUnit\\Event\\Test\\AssertionFailedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Assertion/AssertionFailedSubscriber.php',
'PHPUnit\\Event\\Test\\AssertionSucceeded' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Assertion/AssertionSucceeded.php',
'PHPUnit\\Event\\Test\\AssertionSucceededSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/Assertion/AssertionSucceededSubscriber.php',
'PHPUnit\\Event\\Test\\BeforeFirstTestMethodCalled' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalled.php', 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodCalled' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalled.php',
'PHPUnit\\Event\\Test\\BeforeFirstTestMethodCalledSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalledSubscriber.php', 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodCalledSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodCalledSubscriber.php',
'PHPUnit\\Event\\Test\\BeforeFirstTestMethodErrored' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodErrored.php', 'PHPUnit\\Event\\Test\\BeforeFirstTestMethodErrored' => __DIR__ . '/..' . '/phpunit/phpunit/src/Event/Events/Test/HookMethod/BeforeFirstTestMethodErrored.php',
@ -451,7 +438,6 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PHPUnit\\Framework\\Attributes\\BackupStaticProperties' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/BackupStaticProperties.php', 'PHPUnit\\Framework\\Attributes\\BackupStaticProperties' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/BackupStaticProperties.php',
'PHPUnit\\Framework\\Attributes\\Before' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Before.php', 'PHPUnit\\Framework\\Attributes\\Before' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Before.php',
'PHPUnit\\Framework\\Attributes\\BeforeClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/BeforeClass.php', 'PHPUnit\\Framework\\Attributes\\BeforeClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/BeforeClass.php',
'PHPUnit\\Framework\\Attributes\\CodeCoverageIgnore' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CodeCoverageIgnore.php',
'PHPUnit\\Framework\\Attributes\\CoversClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversClass.php', 'PHPUnit\\Framework\\Attributes\\CoversClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversClass.php',
'PHPUnit\\Framework\\Attributes\\CoversFunction' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversFunction.php', 'PHPUnit\\Framework\\Attributes\\CoversFunction' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversFunction.php',
'PHPUnit\\Framework\\Attributes\\CoversNothing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversNothing.php', 'PHPUnit\\Framework\\Attributes\\CoversNothing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/CoversNothing.php',
@ -470,10 +456,8 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PHPUnit\\Framework\\Attributes\\ExcludeGlobalVariableFromBackup' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/ExcludeGlobalVariableFromBackup.php', 'PHPUnit\\Framework\\Attributes\\ExcludeGlobalVariableFromBackup' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/ExcludeGlobalVariableFromBackup.php',
'PHPUnit\\Framework\\Attributes\\ExcludeStaticPropertyFromBackup' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/ExcludeStaticPropertyFromBackup.php', 'PHPUnit\\Framework\\Attributes\\ExcludeStaticPropertyFromBackup' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/ExcludeStaticPropertyFromBackup.php',
'PHPUnit\\Framework\\Attributes\\Group' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Group.php', 'PHPUnit\\Framework\\Attributes\\Group' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Group.php',
'PHPUnit\\Framework\\Attributes\\IgnoreClassForCodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/IgnoreClassForCodeCoverage.php',
'PHPUnit\\Framework\\Attributes\\IgnoreDeprecations' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/IgnoreDeprecations.php', 'PHPUnit\\Framework\\Attributes\\IgnoreDeprecations' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/IgnoreDeprecations.php',
'PHPUnit\\Framework\\Attributes\\IgnoreFunctionForCodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/IgnoreFunctionForCodeCoverage.php', 'PHPUnit\\Framework\\Attributes\\IgnorePhpunitDeprecations' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/IgnorePhpunitDeprecations.php',
'PHPUnit\\Framework\\Attributes\\IgnoreMethodForCodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/IgnoreMethodForCodeCoverage.php',
'PHPUnit\\Framework\\Attributes\\Large' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Large.php', 'PHPUnit\\Framework\\Attributes\\Large' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Large.php',
'PHPUnit\\Framework\\Attributes\\Medium' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Medium.php', 'PHPUnit\\Framework\\Attributes\\Medium' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/Medium.php',
'PHPUnit\\Framework\\Attributes\\PostCondition' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/PostCondition.php', 'PHPUnit\\Framework\\Attributes\\PostCondition' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Attributes/PostCondition.php',
@ -581,6 +565,8 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PHPUnit\\Framework\\MockObject\\ConfigurableMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php', 'PHPUnit\\Framework\\MockObject\\ConfigurableMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php',
'PHPUnit\\Framework\\MockObject\\DoubledCloneMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/DoubledCloneMethod.php', 'PHPUnit\\Framework\\MockObject\\DoubledCloneMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/DoubledCloneMethod.php',
'PHPUnit\\Framework\\MockObject\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php', 'PHPUnit\\Framework\\MockObject\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php',
'PHPUnit\\Framework\\MockObject\\GeneratedAsMockObject' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/GeneratedAsMockObject.php',
'PHPUnit\\Framework\\MockObject\\GeneratedAsTestStub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Runtime/Api/GeneratedAsTestStub.php',
'PHPUnit\\Framework\\MockObject\\Generator\\ClassAlreadyExistsException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassAlreadyExistsException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\ClassAlreadyExistsException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassAlreadyExistsException.php',
'PHPUnit\\Framework\\MockObject\\Generator\\ClassIsEnumerationException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsEnumerationException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\ClassIsEnumerationException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsEnumerationException.php',
'PHPUnit\\Framework\\MockObject\\Generator\\ClassIsFinalException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsFinalException.php', 'PHPUnit\\Framework\\MockObject\\Generator\\ClassIsFinalException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator/Exception/ClassIsFinalException.php',
@ -723,6 +709,15 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PHPUnit\\Logging\\TestDox\\TestResultCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollectionIterator.php', 'PHPUnit\\Logging\\TestDox\\TestResultCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollectionIterator.php',
'PHPUnit\\Logging\\TestDox\\TestResultCollector' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php', 'PHPUnit\\Logging\\TestDox\\TestResultCollector' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php',
'PHPUnit\\Logging\\TestDox\\TestSkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestSkippedSubscriber.php', 'PHPUnit\\Logging\\TestDox\\TestSkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestSkippedSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredDeprecationSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredNoticeSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredNoticeSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpDeprecationSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpNoticeSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpNoticeSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpWarningSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitErrorSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitErrorSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitWarningSubscriber.php',
'PHPUnit\\Logging\\TestDox\\TestTriggeredWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredWarningSubscriber.php',
'PHPUnit\\Metadata\\After' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/After.php', 'PHPUnit\\Metadata\\After' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/After.php',
'PHPUnit\\Metadata\\AfterClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/AfterClass.php', 'PHPUnit\\Metadata\\AfterClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/AfterClass.php',
'PHPUnit\\Metadata\\Annotation\\Parser\\DocBlock' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Parser/Annotation/DocBlock.php', 'PHPUnit\\Metadata\\Annotation\\Parser\\DocBlock' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Parser/Annotation/DocBlock.php',
@ -751,10 +746,8 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PHPUnit\\Metadata\\ExcludeGlobalVariableFromBackup' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/ExcludeGlobalVariableFromBackup.php', 'PHPUnit\\Metadata\\ExcludeGlobalVariableFromBackup' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/ExcludeGlobalVariableFromBackup.php',
'PHPUnit\\Metadata\\ExcludeStaticPropertyFromBackup' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/ExcludeStaticPropertyFromBackup.php', 'PHPUnit\\Metadata\\ExcludeStaticPropertyFromBackup' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/ExcludeStaticPropertyFromBackup.php',
'PHPUnit\\Metadata\\Group' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Group.php', 'PHPUnit\\Metadata\\Group' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Group.php',
'PHPUnit\\Metadata\\IgnoreClassForCodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/IgnoreClassForCodeCoverage.php',
'PHPUnit\\Metadata\\IgnoreDeprecations' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/IgnoreDeprecations.php', 'PHPUnit\\Metadata\\IgnoreDeprecations' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/IgnoreDeprecations.php',
'PHPUnit\\Metadata\\IgnoreFunctionForCodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/IgnoreFunctionForCodeCoverage.php', 'PHPUnit\\Metadata\\IgnorePhpunitDeprecations' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/IgnorePhpunitDeprecations.php',
'PHPUnit\\Metadata\\IgnoreMethodForCodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/IgnoreMethodForCodeCoverage.php',
'PHPUnit\\Metadata\\InvalidVersionRequirementException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Exception/InvalidVersionRequirementException.php', 'PHPUnit\\Metadata\\InvalidVersionRequirementException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Exception/InvalidVersionRequirementException.php',
'PHPUnit\\Metadata\\Metadata' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Metadata.php', 'PHPUnit\\Metadata\\Metadata' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Metadata.php',
'PHPUnit\\Metadata\\MetadataCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/MetadataCollection.php', 'PHPUnit\\Metadata\\MetadataCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/MetadataCollection.php',
@ -811,6 +804,11 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PHPUnit\\Runner\\ClassDoesNotExtendTestCaseException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/ClassDoesNotExtendTestCaseException.php', 'PHPUnit\\Runner\\ClassDoesNotExtendTestCaseException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/ClassDoesNotExtendTestCaseException.php',
'PHPUnit\\Runner\\ClassIsAbstractException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/ClassIsAbstractException.php', 'PHPUnit\\Runner\\ClassIsAbstractException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/ClassIsAbstractException.php',
'PHPUnit\\Runner\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/CodeCoverage.php', 'PHPUnit\\Runner\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/CodeCoverage.php',
'PHPUnit\\Runner\\DeprecationCollector\\Collector' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/DeprecationCollector/Collector.php',
'PHPUnit\\Runner\\DeprecationCollector\\Facade' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/DeprecationCollector/Facade.php',
'PHPUnit\\Runner\\DeprecationCollector\\Subscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/Subscriber.php',
'PHPUnit\\Runner\\DeprecationCollector\\TestPreparedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/TestPreparedSubscriber.php',
'PHPUnit\\Runner\\DeprecationCollector\\TestTriggeredDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/DeprecationCollector/Subscriber/TestTriggeredDeprecationSubscriber.php',
'PHPUnit\\Runner\\DirectoryCannotBeCreatedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/DirectoryCannotBeCreatedException.php', 'PHPUnit\\Runner\\DirectoryCannotBeCreatedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/DirectoryCannotBeCreatedException.php',
'PHPUnit\\Runner\\ErrorException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/ErrorException.php', 'PHPUnit\\Runner\\ErrorException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/ErrorException.php',
'PHPUnit\\Runner\\ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ErrorHandler.php', 'PHPUnit\\Runner\\ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ErrorHandler.php',
@ -822,9 +820,11 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PHPUnit\\Runner\\Extension\\PharLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Extension/PharLoader.php', 'PHPUnit\\Runner\\Extension\\PharLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Extension/PharLoader.php',
'PHPUnit\\Runner\\FileDoesNotExistException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/FileDoesNotExistException.php', 'PHPUnit\\Runner\\FileDoesNotExistException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception/FileDoesNotExistException.php',
'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php', 'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\ExcludeNameFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/ExcludeNameFilterIterator.php',
'PHPUnit\\Runner\\Filter\\Factory' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Factory.php', 'PHPUnit\\Runner\\Filter\\Factory' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Factory.php',
'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php', 'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php', 'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\IncludeNameFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/IncludeNameFilterIterator.php',
'PHPUnit\\Runner\\Filter\\NameFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php', 'PHPUnit\\Runner\\Filter\\NameFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php',
'PHPUnit\\Runner\\Filter\\TestIdFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/TestIdFilterIterator.php', 'PHPUnit\\Runner\\Filter\\TestIdFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/TestIdFilterIterator.php',
'PHPUnit\\Runner\\GarbageCollection\\ExecutionFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/ExecutionFinishedSubscriber.php', 'PHPUnit\\Runner\\GarbageCollection\\ExecutionFinishedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/GarbageCollection/Subscriber/ExecutionFinishedSubscriber.php',
@ -896,6 +896,7 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PHPUnit\\TextUI\\Command\\Command' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Command.php', 'PHPUnit\\TextUI\\Command\\Command' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Command.php',
'PHPUnit\\TextUI\\Command\\GenerateConfigurationCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/GenerateConfigurationCommand.php', 'PHPUnit\\TextUI\\Command\\GenerateConfigurationCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/GenerateConfigurationCommand.php',
'PHPUnit\\TextUI\\Command\\ListGroupsCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/ListGroupsCommand.php', 'PHPUnit\\TextUI\\Command\\ListGroupsCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/ListGroupsCommand.php',
'PHPUnit\\TextUI\\Command\\ListTestFilesCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestFilesCommand.php',
'PHPUnit\\TextUI\\Command\\ListTestSuitesCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestSuitesCommand.php', 'PHPUnit\\TextUI\\Command\\ListTestSuitesCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestSuitesCommand.php',
'PHPUnit\\TextUI\\Command\\ListTestsAsTextCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsTextCommand.php', 'PHPUnit\\TextUI\\Command\\ListTestsAsTextCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsTextCommand.php',
'PHPUnit\\TextUI\\Command\\ListTestsAsXmlCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsXmlCommand.php', 'PHPUnit\\TextUI\\Command\\ListTestsAsXmlCommand' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command/Commands/ListTestsAsXmlCommand.php',
@ -1060,6 +1061,7 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveLoggingElements' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveLoggingElements.php', 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveLoggingElements' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveLoggingElements.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveNoInteractionAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveNoInteractionAttribute.php', 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveNoInteractionAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveNoInteractionAttribute.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemovePrinterAttributes' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemovePrinterAttributes.php', 'PHPUnit\\TextUI\\XmlConfiguration\\RemovePrinterAttributes' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemovePrinterAttributes.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveRegisterMockObjectsFromTestArgumentsRecursivelyAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveRegisterMockObjectsFromTestArgumentsRecursivelyAttribute.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveTestDoxGroupsElement' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestDoxGroupsElement.php', 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveTestDoxGroupsElement' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestDoxGroupsElement.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveTestSuiteLoaderAttributes' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestSuiteLoaderAttributes.php', 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveTestSuiteLoaderAttributes' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveTestSuiteLoaderAttributes.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveVerboseAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveVerboseAttribute.php', 'PHPUnit\\TextUI\\XmlConfiguration\\RemoveVerboseAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrations/RemoveVerboseAttribute.php',
@ -1079,7 +1081,6 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PHPUnit\\Util\\Color' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Color.php', 'PHPUnit\\Util\\Color' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Color.php',
'PHPUnit\\Util\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Exception/Exception.php', 'PHPUnit\\Util\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Exception/Exception.php',
'PHPUnit\\Util\\ExcludeList' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ExcludeList.php', 'PHPUnit\\Util\\ExcludeList' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ExcludeList.php',
'PHPUnit\\Util\\Exporter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Exporter.php',
'PHPUnit\\Util\\Filesystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filesystem.php', 'PHPUnit\\Util\\Filesystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filesystem.php',
'PHPUnit\\Util\\Filter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filter.php', 'PHPUnit\\Util\\Filter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filter.php',
'PHPUnit\\Util\\GlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/GlobalState.php', 'PHPUnit\\Util\\GlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/GlobalState.php',
@ -1139,6 +1140,7 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
'PharIo\\Manifest\\ManifestLoader' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestLoader.php', 'PharIo\\Manifest\\ManifestLoader' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestLoader.php',
'PharIo\\Manifest\\ManifestLoaderException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php', 'PharIo\\Manifest\\ManifestLoaderException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php',
'PharIo\\Manifest\\ManifestSerializer' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestSerializer.php', 'PharIo\\Manifest\\ManifestSerializer' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestSerializer.php',
'PharIo\\Manifest\\NoEmailAddressException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/NoEmailAddressException.php',
'PharIo\\Manifest\\PhpElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/PhpElement.php', 'PharIo\\Manifest\\PhpElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/PhpElement.php',
'PharIo\\Manifest\\PhpExtensionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpExtensionRequirement.php', 'PharIo\\Manifest\\PhpExtensionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpExtensionRequirement.php',
'PharIo\\Manifest\\PhpVersionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpVersionRequirement.php', 'PharIo\\Manifest\\PhpVersionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpVersionRequirement.php',
@ -1389,9 +1391,9 @@ class ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1
public static function getInitializer(ClassLoader $loader) public static function getInitializer(ClassLoader $loader)
{ {
return \Closure::bind(function () use ($loader) { return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1::$prefixLengthsPsr4; $loader->prefixLengthsPsr4 = ComposerStaticInit4c2287070574f70d470b239b224aef76::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1::$prefixDirsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInit4c2287070574f70d470b239b224aef76::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit1887e85fc3cfddacf8d7e17588dae6f1::$classMap; $loader->classMap = ComposerStaticInit4c2287070574f70d470b239b224aef76::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }

File diff suppressed because it is too large Load Diff

@ -3,7 +3,7 @@
'name' => 'hearttrack/package', 'name' => 'hearttrack/package',
'pretty_version' => 'dev-master', 'pretty_version' => 'dev-master',
'version' => 'dev-master', 'version' => 'dev-master',
'reference' => 'e86b3f7b002e2852b5084d5448b98251eec6e846', 'reference' => '19f37061e0fd9cc55f51b54a788cb4e7949be3d1',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
@ -40,7 +40,7 @@
'hearttrack/package' => array( 'hearttrack/package' => array(
'pretty_version' => 'dev-master', 'pretty_version' => 'dev-master',
'version' => 'dev-master', 'version' => 'dev-master',
'reference' => 'e86b3f7b002e2852b5084d5448b98251eec6e846', 'reference' => '19f37061e0fd9cc55f51b54a788cb4e7949be3d1',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
@ -56,18 +56,18 @@
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'nikic/php-parser' => array( 'nikic/php-parser' => array(
'pretty_version' => 'v5.0.0', 'pretty_version' => 'v5.0.2',
'version' => '5.0.0.0', 'version' => '5.0.2.0',
'reference' => '4a21235f7e56e713259a6f76bf4b5ea08502b9dc', 'reference' => '139676794dc1e9231bf7bcd123cfc0c99182cb13',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../nikic/php-parser', 'install_path' => __DIR__ . '/../nikic/php-parser',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'phar-io/manifest' => array( 'phar-io/manifest' => array(
'pretty_version' => '2.0.3', 'pretty_version' => '2.0.4',
'version' => '2.0.3.0', 'version' => '2.0.4.0',
'reference' => '97803eca37d319dfa7826cc2437fc020857acb53', 'reference' => '54750ef60c58e43759730615a392c31c80e23176',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../phar-io/manifest', 'install_path' => __DIR__ . '/../phar-io/manifest',
'aliases' => array(), 'aliases' => array(),
@ -92,54 +92,54 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'phpunit/php-code-coverage' => array( 'phpunit/php-code-coverage' => array(
'pretty_version' => '10.1.11', 'pretty_version' => '11.0.3',
'version' => '10.1.11.0', 'version' => '11.0.3.0',
'reference' => '78c3b7625965c2513ee96569a4dbb62601784145', 'reference' => '7e35a2cbcabac0e6865fd373742ea432a3c34f92',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-code-coverage', 'install_path' => __DIR__ . '/../phpunit/php-code-coverage',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'phpunit/php-file-iterator' => array( 'phpunit/php-file-iterator' => array(
'pretty_version' => '4.1.0', 'pretty_version' => '5.0.0',
'version' => '4.1.0.0', 'version' => '5.0.0.0',
'reference' => 'a95037b6d9e608ba092da1b23931e537cadc3c3c', 'reference' => '99e95c94ad9500daca992354fa09d7b99abe2210',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-file-iterator', 'install_path' => __DIR__ . '/../phpunit/php-file-iterator',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'phpunit/php-invoker' => array( 'phpunit/php-invoker' => array(
'pretty_version' => '4.0.0', 'pretty_version' => '5.0.0',
'version' => '4.0.0.0', 'version' => '5.0.0.0',
'reference' => 'f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7', 'reference' => '5d8d9355a16d8cc5a1305b0a85342cfa420612be',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-invoker', 'install_path' => __DIR__ . '/../phpunit/php-invoker',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'phpunit/php-text-template' => array( 'phpunit/php-text-template' => array(
'pretty_version' => '3.0.1', 'pretty_version' => '4.0.0',
'version' => '3.0.1.0', 'version' => '4.0.0.0',
'reference' => '0c7b06ff49e3d5072f057eb1fa59258bf287a748', 'reference' => 'd38f6cbff1cdb6f40b03c9811421561668cc133e',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-text-template', 'install_path' => __DIR__ . '/../phpunit/php-text-template',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'phpunit/php-timer' => array( 'phpunit/php-timer' => array(
'pretty_version' => '6.0.0', 'pretty_version' => '7.0.0',
'version' => '6.0.0.0', 'version' => '7.0.0.0',
'reference' => 'e2a2d67966e740530f4a3343fe2e030ffdc1161d', 'reference' => '8a59d9e25720482ee7fcdf296595e08795b84dc5',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-timer', 'install_path' => __DIR__ . '/../phpunit/php-timer',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'phpunit/phpunit' => array( 'phpunit/phpunit' => array(
'pretty_version' => '10.5.5', 'pretty_version' => '11.0.8',
'version' => '10.5.5.0', 'version' => '11.0.8.0',
'reference' => 'ed21115d505b4b4f7dc7b5651464e19a2c7f7856', 'reference' => '48ea58408879a9aad630022186398364051482fc',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/phpunit', 'install_path' => __DIR__ . '/../phpunit/phpunit',
'aliases' => array(), 'aliases' => array(),
@ -155,171 +155,171 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'sebastian/cli-parser' => array( 'sebastian/cli-parser' => array(
'pretty_version' => '2.0.0', 'pretty_version' => '3.0.1',
'version' => '2.0.0.0', 'version' => '3.0.1.0',
'reference' => 'efdc130dbbbb8ef0b545a994fd811725c5282cae', 'reference' => '00a74d5568694711f0222e54fb281e1d15fdf04a',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/cli-parser', 'install_path' => __DIR__ . '/../sebastian/cli-parser',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'sebastian/code-unit' => array( 'sebastian/code-unit' => array(
'pretty_version' => '2.0.0', 'pretty_version' => '3.0.0',
'version' => '2.0.0.0', 'version' => '3.0.0.0',
'reference' => 'a81fee9eef0b7a76af11d121767abc44c104e503', 'reference' => '6634549cb8d702282a04a774e36a7477d2bd9015',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/code-unit', 'install_path' => __DIR__ . '/../sebastian/code-unit',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'sebastian/code-unit-reverse-lookup' => array( 'sebastian/code-unit-reverse-lookup' => array(
'pretty_version' => '3.0.0', 'pretty_version' => '4.0.0',
'version' => '3.0.0.0', 'version' => '4.0.0.0',
'reference' => '5e3a687f7d8ae33fb362c5c0743794bbb2420a1d', 'reference' => 'df80c875d3e459b45c6039e4d9b71d4fbccae25d',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/code-unit-reverse-lookup', 'install_path' => __DIR__ . '/../sebastian/code-unit-reverse-lookup',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'sebastian/comparator' => array( 'sebastian/comparator' => array(
'pretty_version' => '5.0.1', 'pretty_version' => '6.0.0',
'version' => '5.0.1.0', 'version' => '6.0.0.0',
'reference' => '2db5010a484d53ebf536087a70b4a5423c102372', 'reference' => 'bd0f2fa5b9257c69903537b266ccb80fcf940db8',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/comparator', 'install_path' => __DIR__ . '/../sebastian/comparator',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'sebastian/complexity' => array( 'sebastian/complexity' => array(
'pretty_version' => '3.2.0', 'pretty_version' => '4.0.0',
'version' => '3.2.0.0', 'version' => '4.0.0.0',
'reference' => '68ff824baeae169ec9f2137158ee529584553799', 'reference' => '88a434ad86150e11a606ac4866b09130712671f0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/complexity', 'install_path' => __DIR__ . '/../sebastian/complexity',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'sebastian/diff' => array( 'sebastian/diff' => array(
'pretty_version' => '5.1.0', 'pretty_version' => '6.0.1',
'version' => '5.1.0.0', 'version' => '6.0.1.0',
'reference' => 'fbf413a49e54f6b9b17e12d900ac7f6101591b7f', 'reference' => 'ab83243ecc233de5655b76f577711de9f842e712',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/diff', 'install_path' => __DIR__ . '/../sebastian/diff',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'sebastian/environment' => array( 'sebastian/environment' => array(
'pretty_version' => '6.0.1', 'pretty_version' => '7.1.0',
'version' => '6.0.1.0', 'version' => '7.1.0.0',
'reference' => '43c751b41d74f96cbbd4e07b7aec9675651e2951', 'reference' => '4eb3a442574d0e9d141aab209cd4aaf25701b09a',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/environment', 'install_path' => __DIR__ . '/../sebastian/environment',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'sebastian/exporter' => array( 'sebastian/exporter' => array(
'pretty_version' => '5.1.1', 'pretty_version' => '6.0.1',
'version' => '5.1.1.0', 'version' => '6.0.1.0',
'reference' => '64f51654862e0f5e318db7e9dcc2292c63cdbddc', 'reference' => 'f291e5a317c321c0381fa9ecc796fa2d21b186da',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/exporter', 'install_path' => __DIR__ . '/../sebastian/exporter',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'sebastian/global-state' => array( 'sebastian/global-state' => array(
'pretty_version' => '6.0.1', 'pretty_version' => '7.0.1',
'version' => '6.0.1.0', 'version' => '7.0.1.0',
'reference' => '7ea9ead78f6d380d2a667864c132c2f7b83055e4', 'reference' => 'c3a307e832f2e69c7ef869e31fc644fde0e7cb3e',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/global-state', 'install_path' => __DIR__ . '/../sebastian/global-state',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'sebastian/lines-of-code' => array( 'sebastian/lines-of-code' => array(
'pretty_version' => '2.0.2', 'pretty_version' => '3.0.0',
'version' => '2.0.2.0', 'version' => '3.0.0.0',
'reference' => '856e7f6a75a84e339195d48c556f23be2ebf75d0', 'reference' => '376c5b3f6b43c78fdc049740bca76a7c846706c0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/lines-of-code', 'install_path' => __DIR__ . '/../sebastian/lines-of-code',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'sebastian/object-enumerator' => array( 'sebastian/object-enumerator' => array(
'pretty_version' => '5.0.0', 'pretty_version' => '6.0.0',
'version' => '5.0.0.0', 'version' => '6.0.0.0',
'reference' => '202d0e344a580d7f7d04b3fafce6933e59dae906', 'reference' => 'f75f6c460da0bbd9668f43a3dde0ec0ba7faa678',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/object-enumerator', 'install_path' => __DIR__ . '/../sebastian/object-enumerator',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'sebastian/object-reflector' => array( 'sebastian/object-reflector' => array(
'pretty_version' => '3.0.0', 'pretty_version' => '4.0.0',
'version' => '3.0.0.0', 'version' => '4.0.0.0',
'reference' => '24ed13d98130f0e7122df55d06c5c4942a577957', 'reference' => 'bb2a6255d30853425fd38f032eb64ced9f7f132d',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/object-reflector', 'install_path' => __DIR__ . '/../sebastian/object-reflector',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'sebastian/recursion-context' => array( 'sebastian/recursion-context' => array(
'pretty_version' => '5.0.0', 'pretty_version' => '6.0.0',
'version' => '5.0.0.0', 'version' => '6.0.0.0',
'reference' => '05909fb5bc7df4c52992396d0116aed689f93712', 'reference' => 'b75224967b5a466925c6d54e68edd0edf8dd4ed4',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/recursion-context', 'install_path' => __DIR__ . '/../sebastian/recursion-context',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'sebastian/type' => array( 'sebastian/type' => array(
'pretty_version' => '4.0.0', 'pretty_version' => '5.0.0',
'version' => '4.0.0.0', 'version' => '5.0.0.0',
'reference' => '462699a16464c3944eefc02ebdd77882bd3925bf', 'reference' => 'b8502785eb3523ca0dd4afe9ca62235590020f3f',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/type', 'install_path' => __DIR__ . '/../sebastian/type',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'sebastian/version' => array( 'sebastian/version' => array(
'pretty_version' => '4.0.1', 'pretty_version' => '5.0.0',
'version' => '4.0.1.0', 'version' => '5.0.0.0',
'reference' => 'c51fa83a5d8f43f1402e3f32a005e6262244ef17', 'reference' => '13999475d2cb1ab33cb73403ba356a814fdbb001',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/version', 'install_path' => __DIR__ . '/../sebastian/version',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'symfony/polyfill-ctype' => array( 'symfony/polyfill-ctype' => array(
'pretty_version' => 'v1.28.0', 'pretty_version' => 'v1.29.0',
'version' => '1.28.0.0', 'version' => '1.29.0.0',
'reference' => 'ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb', 'reference' => 'ef4d7e442ca910c4764bce785146269b30cb5fc4',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/polyfill-mbstring' => array( 'symfony/polyfill-mbstring' => array(
'pretty_version' => 'v1.28.0', 'pretty_version' => 'v1.29.0',
'version' => '1.28.0.0', 'version' => '1.29.0.0',
'reference' => '42292d99c55abe617799667f454222c54c60e229', 'reference' => '9773676c8a1bb1f8d4340a62efe641cf76eda7ec',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/polyfill-php80' => array( 'symfony/polyfill-php80' => array(
'pretty_version' => 'v1.28.0', 'pretty_version' => 'v1.29.0',
'version' => '1.28.0.0', 'version' => '1.29.0.0',
'reference' => '6caa57379c4aec19c0a12a38b59b26487dcfe4b5', 'reference' => '87b68208d5c1188808dd7839ee1e6c8ec3b02f1b',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'install_path' => __DIR__ . '/../symfony/polyfill-php80',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'theseer/tokenizer' => array( 'theseer/tokenizer' => array(
'pretty_version' => '1.2.2', 'pretty_version' => '1.2.3',
'version' => '1.2.2.0', 'version' => '1.2.3.0',
'reference' => 'b2ad5003ca10d4ee50a12da31de12a5774ba6b96', 'reference' => '737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../theseer/tokenizer', 'install_path' => __DIR__ . '/../theseer/tokenizer',
'aliases' => array(), 'aliases' => array(),

@ -1,31 +0,0 @@
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('PhpParser/Parser')
->in(__DIR__ . '/lib')
->in(__DIR__ . '/test')
->in(__DIR__ . '/grammar')
;
$config = new PhpCsFixer\Config();
return $config->setRiskyAllowed(true)
->setRules([
'@PSR12' => true,
// We use PSR12 with consistent brace placement.
'curly_braces_position' => [
'functions_opening_brace' => 'same_line',
'classes_opening_brace' => 'same_line',
],
// declare(strict_types=1) on the same line as <?php.
'blank_line_after_opening_tag' => false,
'declare_strict_types' => true,
// Keep argument formatting for now.
'method_argument_space' => ['on_multiline' => 'ignore'],
'phpdoc_align' => ['align' => 'left'],
'phpdoc_trim' => true,
'no_empty_phpdoc' => true,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
'no_extra_blank_lines' => true,
])
->setFinder($finder)
;

@ -1,10 +0,0 @@
.PHONY: phpstan php-cs-fixer
tools/vendor:
composer install -d tools
phpstan: tools/vendor
tools/vendor/bin/phpstan
php-cs-fixer: tools/vendor
tools/vendor/bin/php-cs-fixer fix

@ -251,7 +251,7 @@ class TokenStream {
private function calcIndentMap(): array { private function calcIndentMap(): array {
$indentMap = []; $indentMap = [];
$indent = 0; $indent = 0;
foreach ($this->tokens as $token) { foreach ($this->tokens as $i => $token) {
$indentMap[] = $indent; $indentMap[] = $indent;
if ($token->id === \T_WHITESPACE) { if ($token->id === \T_WHITESPACE) {
@ -259,6 +259,10 @@ class TokenStream {
$newlinePos = \strrpos($content, "\n"); $newlinePos = \strrpos($content, "\n");
if (false !== $newlinePos) { if (false !== $newlinePos) {
$indent = \strlen($content) - $newlinePos - 1; $indent = \strlen($content) - $newlinePos - 1;
} elseif ($i === 1 && $this->tokens[0]->id === \T_OPEN_TAG &&
$this->tokens[0]->text[\strlen($this->tokens[0]->text) - 1] === "\n") {
// Special case: Newline at the end of opening tag followed by whitespace.
$indent = \strlen($content);
} }
} }
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -318,7 +318,7 @@ abstract class ParserAbstract implements Parser {
try { try {
$callback = $this->reduceCallbacks[$rule]; $callback = $this->reduceCallbacks[$rule];
if ($callback !== null) { if ($callback !== null) {
$callback($stackPos); $callback($this, $stackPos);
} elseif ($ruleLength > 0) { } elseif ($ruleLength > 0) {
$this->semValue = $this->semStack[$stackPos - $ruleLength + 1]; $this->semValue = $this->semStack[$stackPos - $ruleLength + 1];
} }

@ -43,7 +43,7 @@ class PhpVersion {
* if it is still under development. * if it is still under development.
*/ */
public static function getNewestSupported(): self { public static function getNewestSupported(): self {
return self::fromComponents(8, 2); return self::fromComponents(8, 3);
} }
/** /**

@ -26,6 +26,13 @@ if (!\function_exists('PhpParser\defineCompatibilityTokens')) {
foreach ($compatTokens as $token) { foreach ($compatTokens as $token) {
if (\defined($token)) { if (\defined($token)) {
$tokenId = \constant($token); $tokenId = \constant($token);
if (!\is_int($tokenId)) {
throw new \Error(sprintf(
'Token %s has ID of type %s, should be int. ' .
'You may be using a library with broken token emulation',
$token, \gettype($tokenId)
));
}
$clashingToken = $usedTokenIds[$tokenId] ?? null; $clashingToken = $usedTokenIds[$tokenId] ?? null;
if ($clashingToken !== null) { if ($clashingToken !== null) {
throw new \Error(sprintf( throw new \Error(sprintf(

@ -1,236 +0,0 @@
parameters:
ignoreErrors:
-
message: "#^Method PhpParser\\\\Builder\\\\ClassConst\\:\\:__construct\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/Builder/ClassConst.php
-
message: "#^Method PhpParser\\\\Builder\\\\ClassConst\\:\\:addConst\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/Builder/ClassConst.php
-
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:args\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/BuilderFactory.php
-
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:attribute\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/BuilderFactory.php
-
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:classConst\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/BuilderFactory.php
-
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:funcCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/BuilderFactory.php
-
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:methodCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/BuilderFactory.php
-
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:new\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/BuilderFactory.php
-
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:staticCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/BuilderFactory.php
-
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:val\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/BuilderFactory.php
-
message: "#^Method PhpParser\\\\BuilderHelpers\\:\\:normalizeValue\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/BuilderHelpers.php
-
message: "#^Method PhpParser\\\\ConstExprEvaluator\\:\\:evaluateArray\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/ConstExprEvaluator.php
-
message: "#^Unary operation \"~\" on mixed results in an error\\.$#"
count: 1
path: lib/PhpParser/ConstExprEvaluator.php
-
message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeArray\\(\\) has parameter \\$array with no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/JsonDecoder.php
-
message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeArray\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/JsonDecoder.php
-
message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeComment\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/JsonDecoder.php
-
message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeNode\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/JsonDecoder.php
-
message: "#^Call to function assert\\(\\) with false will always evaluate to false\\.$#"
count: 1
path: lib/PhpParser/Lexer/Emulative.php
-
message: "#^Method PhpParser\\\\NodeDumper\\:\\:__construct\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/NodeDumper.php
-
message: "#^Method PhpParser\\\\NodeDumper\\:\\:dump\\(\\) has parameter \\$node with no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/NodeDumper.php
-
message: "#^Method PhpParser\\\\NodeTraverser\\:\\:traverseArray\\(\\) has parameter \\$nodes with no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/NodeTraverser.php
-
message: "#^Method PhpParser\\\\NodeTraverser\\:\\:traverseArray\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: lib/PhpParser/NodeTraverser.php
-
message: "#^Access to an undefined property PhpParser\\\\Node\\:\\:\\$attrGroups\\.$#"
count: 1
path: lib/PhpParser/NodeVisitor/NameResolver.php
-
message: "#^Access to an undefined property PhpParser\\\\Node\\:\\:\\$name\\.$#"
count: 1
path: lib/PhpParser/NodeVisitor/NameResolver.php
-
message: "#^Access to an undefined property PhpParser\\\\Node\\:\\:\\$namespacedName\\.$#"
count: 1
path: lib/PhpParser/NodeVisitor/NameResolver.php
-
message: "#^Method PhpParser\\\\NodeVisitor\\\\NodeConnectingVisitor\\:\\:beforeTraverse\\(\\) should return array\\<PhpParser\\\\Node\\>\\|null but return statement is missing\\.$#"
count: 1
path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php
-
message: "#^Method PhpParser\\\\NodeVisitor\\\\NodeConnectingVisitor\\:\\:enterNode\\(\\) should return array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#"
count: 1
path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php
-
message: "#^Method PhpParser\\\\NodeVisitor\\\\NodeConnectingVisitor\\:\\:leaveNode\\(\\) should return array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#"
count: 1
path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php
-
message: "#^Method PhpParser\\\\NodeVisitor\\\\ParentConnectingVisitor\\:\\:beforeTraverse\\(\\) should return array\\<PhpParser\\\\Node\\>\\|null but return statement is missing\\.$#"
count: 1
path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php
-
message: "#^Method PhpParser\\\\NodeVisitor\\\\ParentConnectingVisitor\\:\\:enterNode\\(\\) should return array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#"
count: 1
path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php
-
message: "#^Method PhpParser\\\\NodeVisitor\\\\ParentConnectingVisitor\\:\\:leaveNode\\(\\) should return array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#"
count: 1
path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php
-
message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG\\.$#"
count: 1
path: lib/PhpParser/ParserAbstract.php
-
message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG\\.$#"
count: 1
path: lib/PhpParser/ParserAbstract.php
-
message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_ATTRIBUTE\\.$#"
count: 1
path: lib/PhpParser/ParserAbstract.php
-
message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_COALESCE_EQUAL\\.$#"
count: 1
path: lib/PhpParser/ParserAbstract.php
-
message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_ECHO\\.$#"
count: 1
path: lib/PhpParser/ParserAbstract.php
-
message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_ENUM\\.$#"
count: 1
path: lib/PhpParser/ParserAbstract.php
-
message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_FN\\.$#"
count: 1
path: lib/PhpParser/ParserAbstract.php
-
message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_MATCH\\.$#"
count: 1
path: lib/PhpParser/ParserAbstract.php
-
message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_NAME_FULLY_QUALIFIED\\.$#"
count: 1
path: lib/PhpParser/ParserAbstract.php
-
message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_NAME_QUALIFIED\\.$#"
count: 1
path: lib/PhpParser/ParserAbstract.php
-
message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_NAME_RELATIVE\\.$#"
count: 1
path: lib/PhpParser/ParserAbstract.php
-
message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_NULLSAFE_OBJECT_OPERATOR\\.$#"
count: 1
path: lib/PhpParser/ParserAbstract.php
-
message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_PAAMAYIM_NEKUDOTAYIM\\.$#"
count: 1
path: lib/PhpParser/ParserAbstract.php
-
message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_READONLY\\.$#"
count: 1
path: lib/PhpParser/ParserAbstract.php
-
message: "#^Unary operation \"\\+\" on string results in an error\\.$#"
count: 1
path: lib/PhpParser/ParserAbstract.php
-
message: "#^Variable \\$action might not be defined\\.$#"
count: 1
path: lib/PhpParser/ParserAbstract.php

@ -1,8 +0,0 @@
includes:
- phpstan-baseline.neon
parameters:
level: 6
paths:
- lib
treatPhpDocTypesAsCertain: false

@ -2,6 +2,14 @@
All notable changes to phar-io/manifest are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. All notable changes to phar-io/manifest are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
## [2.0.4] - 03-03-2024
### Changed
- Make `EMail` an optional attribute for author
- Stick with PHP 7.2 compatibilty
- Do not use implict nullable type (thanks @sebastianbergmann), this should make things work on PHP 8.4
## [2.0.3] - 20.07.2021 ## [2.0.3] - 20.07.2021
- Fixed PHP 7.2 / PHP 7.3 incompatibility introduced in previous release - Fixed PHP 7.2 / PHP 7.3 incompatibility introduced in previous release
@ -26,7 +34,8 @@ This release now requires PHP 7.2+
### Unreleased ### Unreleased
[Unreleased]: https://github.com/phar-io/manifest/compare/2.0.3...HEAD [Unreleased]: https://github.com/phar-io/manifest/compare/2.1.0...HEAD
[2.1.0]: https://github.com/phar-io/manifest/compare/2.0.3...2.1.0
[2.0.3]: https://github.com/phar-io/manifest/compare/2.0.2...2.0.3 [2.0.3]: https://github.com/phar-io/manifest/compare/2.0.2...2.0.3
[2.0.2]: https://github.com/phar-io/manifest/compare/2.0.1...2.0.2 [2.0.2]: https://github.com/phar-io/manifest/compare/2.0.1...2.0.2
[2.0.1]: https://github.com/phar-io/manifest/compare/2.0.0...2.0.1 [2.0.1]: https://github.com/phar-io/manifest/compare/2.0.0...2.0.1

@ -2,10 +2,6 @@
Component for reading [phar.io](https://phar.io/) manifest information from a [PHP Archive (PHAR)](http://php.net/phar). Component for reading [phar.io](https://phar.io/) manifest information from a [PHP Archive (PHAR)](http://php.net/phar).
[![Build Status](https://travis-ci.org/phar-io/manifest.svg?branch=master)](https://travis-ci.org/phar-io/manifest)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/phar-io/manifest/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/phar-io/manifest/?branch=master)
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/d8cc6035-69ad-477d-bd1a-ccc605480fd7/mini.png)](https://insight.sensiolabs.com/projects/d8cc6035-69ad-477d-bd1a-ccc605480fd7)
## Installation ## Installation
You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
@ -16,8 +12,9 @@ If you only need this library during development, for instance to run your proje
composer require --dev phar-io/manifest composer require --dev phar-io/manifest
## Usage ## Usage Examples
### Read from `manifest.xml`
```php ```php
use PharIo\Manifest\ManifestLoader; use PharIo\Manifest\ManifestLoader;
use PharIo\Manifest\ManifestSerializer; use PharIo\Manifest\ManifestSerializer;
@ -28,3 +25,154 @@ var_dump($manifest);
echo (new ManifestSerializer)->serializeToString($manifest); echo (new ManifestSerializer)->serializeToString($manifest);
``` ```
<details>
<summary>Output</summary>
```shell
object(PharIo\Manifest\Manifest)#14 (6) {
["name":"PharIo\Manifest\Manifest":private]=>
object(PharIo\Manifest\ApplicationName)#10 (1) {
["name":"PharIo\Manifest\ApplicationName":private]=>
string(12) "some/library"
}
["version":"PharIo\Manifest\Manifest":private]=>
object(PharIo\Version\Version)#12 (5) {
["originalVersionString":"PharIo\Version\Version":private]=>
string(5) "1.0.0"
["major":"PharIo\Version\Version":private]=>
object(PharIo\Version\VersionNumber)#13 (1) {
["value":"PharIo\Version\VersionNumber":private]=>
int(1)
}
["minor":"PharIo\Version\Version":private]=>
object(PharIo\Version\VersionNumber)#23 (1) {
["value":"PharIo\Version\VersionNumber":private]=>
int(0)
}
["patch":"PharIo\Version\Version":private]=>
object(PharIo\Version\VersionNumber)#22 (1) {
["value":"PharIo\Version\VersionNumber":private]=>
int(0)
}
["preReleaseSuffix":"PharIo\Version\Version":private]=>
NULL
}
["type":"PharIo\Manifest\Manifest":private]=>
object(PharIo\Manifest\Library)#6 (0) {
}
["copyrightInformation":"PharIo\Manifest\Manifest":private]=>
object(PharIo\Manifest\CopyrightInformation)#19 (2) {
["authors":"PharIo\Manifest\CopyrightInformation":private]=>
object(PharIo\Manifest\AuthorCollection)#9 (1) {
["authors":"PharIo\Manifest\AuthorCollection":private]=>
array(1) {
[0]=>
object(PharIo\Manifest\Author)#15 (2) {
["name":"PharIo\Manifest\Author":private]=>
string(13) "Reiner Zufall"
["email":"PharIo\Manifest\Author":private]=>
object(PharIo\Manifest\Email)#16 (1) {
["email":"PharIo\Manifest\Email":private]=>
string(16) "reiner@zufall.de"
}
}
}
}
["license":"PharIo\Manifest\CopyrightInformation":private]=>
object(PharIo\Manifest\License)#11 (2) {
["name":"PharIo\Manifest\License":private]=>
string(12) "BSD-3-Clause"
["url":"PharIo\Manifest\License":private]=>
object(PharIo\Manifest\Url)#18 (1) {
["url":"PharIo\Manifest\Url":private]=>
string(26) "https://domain.tld/LICENSE"
}
}
}
["requirements":"PharIo\Manifest\Manifest":private]=>
object(PharIo\Manifest\RequirementCollection)#17 (1) {
["requirements":"PharIo\Manifest\RequirementCollection":private]=>
array(1) {
[0]=>
object(PharIo\Manifest\PhpVersionRequirement)#20 (1) {
["versionConstraint":"PharIo\Manifest\PhpVersionRequirement":private]=>
object(PharIo\Version\SpecificMajorAndMinorVersionConstraint)#24 (3) {
["originalValue":"PharIo\Version\AbstractVersionConstraint":private]=>
string(3) "7.0"
["major":"PharIo\Version\SpecificMajorAndMinorVersionConstraint":private]=>
int(7)
["minor":"PharIo\Version\SpecificMajorAndMinorVersionConstraint":private]=>
int(0)
}
}
}
}
["bundledComponents":"PharIo\Manifest\Manifest":private]=>
object(PharIo\Manifest\BundledComponentCollection)#8 (1) {
["bundledComponents":"PharIo\Manifest\BundledComponentCollection":private]=>
array(0) {
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<phar xmlns="https://phar.io/xml/manifest/1.0">
<contains name="some/library" version="1.0.0" type="library"/>
<copyright>
<author name="Reiner Zufall" email="reiner@zufall.de"/>
<license type="BSD-3-Clause" url="https://domain.tld/LICENSE"/>
</copyright>
<requires>
<php version="7.0"/>
</requires>
</phar>
```
</details>
### Create via API
```php
$bundled = new \PharIo\Manifest\BundledComponentCollection();
$bundled->add(
new \PharIo\Manifest\BundledComponent('vendor/packageA', new \PharIo\Version\Version('1.2.3-dev')
)
);
$manifest = new PharIo\Manifest\Manifest(
new \PharIo\Manifest\ApplicationName('vendor/package'),
new \PharIo\Version\Version('1.0.0'),
new \PharIo\Manifest\Library(),
new \PharIo\Manifest\CopyrightInformation(
new \PharIo\Manifest\AuthorCollection(),
new \PharIo\Manifest\License(
'BSD-3-Clause',
new \PharIo\Manifest\Url('https://spdx.org/licenses/BSD-3-Clause.html')
)
),
new \PharIo\Manifest\RequirementCollection(),
$bundled
);
echo (new ManifestSerializer)->serializeToString($manifest);
```
<details>
<summary>Output</summary>
```xml
<?xml version="1.0" encoding="UTF-8"?>
<phar xmlns="https://phar.io/xml/manifest/1.0">
<contains name="vendor/package" version="1.0.0" type="library"/>
<copyright>
<license type="BSD-3-Clause" url="https://spdx.org/licenses/BSD-3-Clause.html"/>
</copyright>
<requires>
<php version="*"/>
</requires>
<bundles>
<component name="vendor/packageA" version="1.2.3-dev"/>
</bundles>
</phar>
```
</details>

@ -26,6 +26,7 @@
"php": "^7.2 || ^8.0", "php": "^7.2 || ^8.0",
"ext-dom": "*", "ext-dom": "*",
"ext-phar": "*", "ext-phar": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*", "ext-xmlwriter": "*",
"phar-io/version": "^3.0.1" "phar-io/version": "^3.0.1"
}, },

@ -4,24 +4,24 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "f2ac4614ce4f7273fd54a64b65fd047a", "content-hash": "279b3c4fe44357abd924fdcc0cfa5664",
"packages": [ "packages": [
{ {
"name": "phar-io/version", "name": "phar-io/version",
"version": "3.0.1", "version": "3.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phar-io/version.git", "url": "https://github.com/phar-io/version.git",
"reference": "d06a5000ac1a258a7d035295f0bd4ae7c859bc4f" "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phar-io/version/zipball/d06a5000ac1a258a7d035295f0bd4ae7c859bc4f", "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
"reference": "d06a5000ac1a258a7d035295f0bd4ae7c859bc4f", "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.2" "php": "^7.2 || ^8.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -51,7 +51,11 @@
} }
], ],
"description": "Library for handling version information and constraints", "description": "Library for handling version information and constraints",
"time": "2020-05-09T21:27:55+00:00" "support": {
"issues": "https://github.com/phar-io/version/issues",
"source": "https://github.com/phar-io/version/tree/3.2.1"
},
"time": "2022-02-21T01:04:05+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],
@ -61,10 +65,12 @@
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {
"php": "^7.2", "php": "^7.2 || ^8.0",
"ext-dom": "*", "ext-dom": "*",
"ext-phar": "*", "ext-phar": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*" "ext-xmlwriter": "*"
}, },
"platform-dev": [] "platform-dev": [],
"plugin-api-version": "2.3.0"
} }

@ -2,16 +2,19 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
use PharIo\Version\Exception as VersionException; use PharIo\Version\Exception as VersionException;
use PharIo\Version\Version; use PharIo\Version\Version;
use PharIo\Version\VersionConstraintParser; use PharIo\Version\VersionConstraintParser;
use Throwable;
use function sprintf;
class ManifestDocumentMapper { class ManifestDocumentMapper {
public function map(ManifestDocument $document): Manifest { public function map(ManifestDocument $document): Manifest {
@ -30,9 +33,7 @@ class ManifestDocumentMapper {
$requirements, $requirements,
$bundledComponents $bundledComponents
); );
} catch (VersionException $e) { } catch (Throwable $e) {
throw new ManifestDocumentMapperException($e->getMessage(), (int)$e->getCode(), $e);
} catch (Exception $e) {
throw new ManifestDocumentMapperException($e->getMessage(), (int)$e->getCode(), $e); throw new ManifestDocumentMapperException($e->getMessage(), (int)$e->getCode(), $e);
} }
} }
@ -48,7 +49,7 @@ class ManifestDocumentMapper {
} }
throw new ManifestDocumentMapperException( throw new ManifestDocumentMapperException(
\sprintf('Unsupported type %s', $contains->getType()) sprintf('Unsupported type %s', $contains->getType())
); );
} }
@ -59,7 +60,7 @@ class ManifestDocumentMapper {
$authors->add( $authors->add(
new Author( new Author(
$authorElement->getName(), $authorElement->getName(),
new Email($authorElement->getEmail()) $authorElement->hasEMail() ? new Email($authorElement->getEmail()) : null
) )
); );
} }
@ -85,7 +86,7 @@ class ManifestDocumentMapper {
$versionConstraint = $parser->parse($phpElement->getVersion()); $versionConstraint = $parser->parse($phpElement->getVersion());
} catch (VersionException $e) { } catch (VersionException $e) {
throw new ManifestDocumentMapperException( throw new ManifestDocumentMapperException(
\sprintf('Unsupported version constraint - %s', $e->getMessage()), sprintf('Unsupported version constraint - %s', $e->getMessage()),
(int)$e->getCode(), (int)$e->getCode(),
$e $e
); );
@ -141,7 +142,7 @@ class ManifestDocumentMapper {
); );
} catch (VersionException $e) { } catch (VersionException $e) {
throw new ManifestDocumentMapperException( throw new ManifestDocumentMapperException(
\sprintf('Unsupported version constraint - %s', $e->getMessage()), sprintf('Unsupported version constraint - %s', $e->getMessage()),
(int)$e->getCode(), (int)$e->getCode(),
$e $e
); );

@ -2,13 +2,16 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
use function sprintf;
class ManifestLoader { class ManifestLoader {
public static function fromFile(string $filename): Manifest { public static function fromFile(string $filename): Manifest {
try { try {
@ -17,7 +20,7 @@ class ManifestLoader {
); );
} catch (Exception $e) { } catch (Exception $e) {
throw new ManifestLoaderException( throw new ManifestLoaderException(
\sprintf('Loading %s failed.', $filename), sprintf('Loading %s failed.', $filename),
(int)$e->getCode(), (int)$e->getCode(),
$e $e
); );

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
@ -13,6 +14,9 @@ use PharIo\Version\AnyVersionConstraint;
use PharIo\Version\Version; use PharIo\Version\Version;
use PharIo\Version\VersionConstraint; use PharIo\Version\VersionConstraint;
use XMLWriter; use XMLWriter;
use function count;
use function file_put_contents;
use function str_repeat;
/** @psalm-suppress MissingConstructor */ /** @psalm-suppress MissingConstructor */
class ManifestSerializer { class ManifestSerializer {
@ -20,7 +24,7 @@ class ManifestSerializer {
private $xmlWriter; private $xmlWriter;
public function serializeToFile(Manifest $manifest, string $filename): void { public function serializeToFile(Manifest $manifest, string $filename): void {
\file_put_contents( file_put_contents(
$filename, $filename,
$this->serializeToString($manifest) $this->serializeToString($manifest)
); );
@ -41,7 +45,7 @@ class ManifestSerializer {
$xmlWriter = new XMLWriter(); $xmlWriter = new XMLWriter();
$xmlWriter->openMemory(); $xmlWriter->openMemory();
$xmlWriter->setIndent(true); $xmlWriter->setIndent(true);
$xmlWriter->setIndentString(\str_repeat(' ', 4)); $xmlWriter->setIndentString(str_repeat(' ', 4));
$xmlWriter->startDocument('1.0', 'UTF-8'); $xmlWriter->startDocument('1.0', 'UTF-8');
$xmlWriter->startElement('phar'); $xmlWriter->startElement('phar');
$xmlWriter->writeAttribute('xmlns', 'https://phar.io/xml/manifest/1.0'); $xmlWriter->writeAttribute('xmlns', 'https://phar.io/xml/manifest/1.0');
@ -144,7 +148,7 @@ class ManifestSerializer {
} }
private function addBundles(BundledComponentCollection $bundledComponentCollection): void { private function addBundles(BundledComponentCollection $bundledComponentCollection): void {
if (\count($bundledComponentCollection) === 0) { if (count($bundledComponentCollection) === 0) {
return; return;
} }
$this->xmlWriter->startElement('bundles'); $this->xmlWriter->startElement('bundles');

@ -2,12 +2,15 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
class ElementCollectionException extends \InvalidArgumentException implements Exception { use InvalidArgumentException;
class ElementCollectionException extends InvalidArgumentException implements Exception {
} }

@ -2,12 +2,15 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
interface Exception extends \Throwable { use Throwable;
interface Exception extends Throwable {
} }

@ -2,13 +2,16 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
class InvalidApplicationNameException extends \InvalidArgumentException implements Exception { use InvalidArgumentException;
class InvalidApplicationNameException extends InvalidArgumentException implements Exception {
public const InvalidFormat = 2; public const InvalidFormat = 2;
} }

@ -2,12 +2,15 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
class InvalidEmailException extends \InvalidArgumentException implements Exception { use InvalidArgumentException;
class InvalidEmailException extends InvalidArgumentException implements Exception {
} }

@ -2,12 +2,15 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
class InvalidUrlException extends \InvalidArgumentException implements Exception { use InvalidArgumentException;
class InvalidUrlException extends InvalidArgumentException implements Exception {
} }

@ -1,5 +1,16 @@
<?php declare(strict_types = 1); <?php declare(strict_types = 1);
/*
* This file is part of PharIo\Manifest.
*
* Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
*/
namespace PharIo\Manifest; namespace PharIo\Manifest;
class ManifestDocumentException extends \RuntimeException implements Exception { use RuntimeException;
class ManifestDocumentException extends RuntimeException implements Exception {
} }

@ -2,14 +2,16 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
use LibXMLError; use LibXMLError;
use function sprintf;
class ManifestDocumentLoadingException extends \Exception implements Exception { class ManifestDocumentLoadingException extends \Exception implements Exception {
/** @var LibXMLError[] */ /** @var LibXMLError[] */
@ -25,7 +27,7 @@ class ManifestDocumentLoadingException extends \Exception implements Exception {
$first = $this->libxmlErrors[0]; $first = $this->libxmlErrors[0];
parent::__construct( parent::__construct(
\sprintf( sprintf(
'%s (Line: %d / Column: %d / File: %s)', '%s (Line: %d / Column: %d / File: %s)',
$first->message, $first->message,
$first->line, $first->line,

@ -1,5 +1,16 @@
<?php declare(strict_types = 1); <?php declare(strict_types = 1);
/*
* This file is part of PharIo\Manifest.
*
* Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
*/
namespace PharIo\Manifest; namespace PharIo\Manifest;
class ManifestDocumentMapperException extends \RuntimeException implements Exception { use RuntimeException;
class ManifestDocumentMapperException extends RuntimeException implements Exception {
} }

@ -1,5 +1,16 @@
<?php declare(strict_types = 1); <?php declare(strict_types = 1);
/*
* This file is part of PharIo\Manifest.
*
* Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
*/
namespace PharIo\Manifest; namespace PharIo\Manifest;
class ManifestElementException extends \RuntimeException implements Exception { use RuntimeException;
class ManifestElementException extends RuntimeException implements Exception {
} }

@ -1,4 +1,13 @@
<?php declare(strict_types = 1); <?php declare(strict_types = 1);
/*
* This file is part of PharIo\Manifest.
*
* Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
*/
namespace PharIo\Manifest; namespace PharIo\Manifest;
class ManifestLoaderException extends \Exception implements Exception { class ManifestLoaderException extends \Exception implements Exception {

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,13 +2,17 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
use function preg_match;
use function sprintf;
class ApplicationName { class ApplicationName {
/** @var string */ /** @var string */
private $name; private $name;
@ -27,9 +31,9 @@ class ApplicationName {
} }
private function ensureValidFormat(string $name): void { private function ensureValidFormat(string $name): void {
if (!\preg_match('#\w/\w#', $name)) { if (!preg_match('#\w/\w#', $name)) {
throw new InvalidApplicationNameException( throw new InvalidApplicationNameException(
\sprintf('Format of name "%s" is not valid - expected: vendor/packagename', $name), sprintf('Format of name "%s" is not valid - expected: vendor/packagename', $name),
InvalidApplicationNameException::InvalidFormat InvalidApplicationNameException::InvalidFormat
); );
} }

@ -2,27 +2,34 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
use function sprintf;
class Author { class Author {
/** @var string */ /** @var string */
private $name; private $name;
/** @var Email */ /** @var null|Email */
private $email; private $email;
public function __construct(string $name, Email $email) { public function __construct(string $name, ?Email $email = null) {
$this->name = $name; $this->name = $name;
$this->email = $email; $this->email = $email;
} }
public function asString(): string { public function asString(): string {
return \sprintf( if (!$this->hasEmail()) {
return $this->name;
}
return sprintf(
'%s <%s>', '%s <%s>',
$this->name, $this->name,
$this->email->asString() $this->email->asString()
@ -33,7 +40,18 @@ class Author {
return $this->name; return $this->name;
} }
/**
* @psalm-assert-if-true Email $this->email
*/
public function hasEmail(): bool {
return $this->email !== null;
}
public function getEmail(): Email { public function getEmail(): Email {
if (!$this->hasEmail()) {
throw new NoEmailAddressException();
}
return $this->email; return $this->email;
} }
} }

@ -2,14 +2,20 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
class AuthorCollection implements \Countable, \IteratorAggregate { use Countable;
use IteratorAggregate;
use function count;
/** @template-implements IteratorAggregate<int,Author> */
class AuthorCollection implements Countable, IteratorAggregate {
/** @var Author[] */ /** @var Author[] */
private $authors = []; private $authors = [];
@ -25,7 +31,7 @@ class AuthorCollection implements \Countable, \IteratorAggregate {
} }
public function count(): int { public function count(): int {
return \count($this->authors); return count($this->authors);
} }
public function getIterator(): AuthorCollectionIterator { public function getIterator(): AuthorCollectionIterator {

@ -2,14 +2,19 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
class AuthorCollectionIterator implements \Iterator { use Iterator;
use function count;
/** @template-implements Iterator<int,Author> */
class AuthorCollectionIterator implements Iterator {
/** @var Author[] */ /** @var Author[] */
private $authors; private $authors;
@ -25,7 +30,7 @@ class AuthorCollectionIterator implements \Iterator {
} }
public function valid(): bool { public function valid(): bool {
return $this->position < \count($this->authors); return $this->position < count($this->authors);
} }
public function key(): int { public function key(): int {

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,14 +2,20 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
class BundledComponentCollection implements \Countable, \IteratorAggregate { use Countable;
use IteratorAggregate;
use function count;
/** @template-implements IteratorAggregate<int,BundledComponent> */
class BundledComponentCollection implements Countable, IteratorAggregate {
/** @var BundledComponent[] */ /** @var BundledComponent[] */
private $bundledComponents = []; private $bundledComponents = [];
@ -25,7 +31,7 @@ class BundledComponentCollection implements \Countable, \IteratorAggregate {
} }
public function count(): int { public function count(): int {
return \count($this->bundledComponents); return count($this->bundledComponents);
} }
public function getIterator(): BundledComponentCollectionIterator { public function getIterator(): BundledComponentCollectionIterator {

@ -2,14 +2,19 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
class BundledComponentCollectionIterator implements \Iterator { use Iterator;
use function count;
/** @template-implements Iterator<int,BundledComponent> */
class BundledComponentCollectionIterator implements Iterator {
/** @var BundledComponent[] */ /** @var BundledComponent[] */
private $bundledComponents; private $bundledComponents;
@ -25,7 +30,7 @@ class BundledComponentCollectionIterator implements \Iterator {
} }
public function valid(): bool { public function valid(): bool {
return $this->position < \count($this->bundledComponents); return $this->position < count($this->bundledComponents);
} }
public function key(): int { public function key(): int {

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,13 +2,17 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
use const FILTER_VALIDATE_EMAIL;
use function filter_var;
class Email { class Email {
/** @var string */ /** @var string */
private $email; private $email;
@ -24,7 +28,7 @@ class Email {
} }
private function ensureEmailIsValid(string $url): void { private function ensureEmailIsValid(string $url): void {
if (\filter_var($url, \FILTER_VALIDATE_EMAIL) === false) { if (filter_var($url, FILTER_VALIDATE_EMAIL) === false) {
throw new InvalidEmailException; throw new InvalidEmailException;
} }
} }

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
@ -75,7 +76,7 @@ class Manifest {
return $this->type->isExtension(); return $this->type->isExtension();
} }
public function isExtensionFor(ApplicationName $application, Version $version = null): bool { public function isExtensionFor(ApplicationName $application, ?Version $version = null): bool {
if (!$this->isExtension()) { if (!$this->isExtension()) {
return false; return false;
} }

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,14 +2,20 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
class RequirementCollection implements \Countable, \IteratorAggregate { use Countable;
use IteratorAggregate;
use function count;
/** @template-implements IteratorAggregate<int,Requirement> */
class RequirementCollection implements Countable, IteratorAggregate {
/** @var Requirement[] */ /** @var Requirement[] */
private $requirements = []; private $requirements = [];
@ -25,7 +31,7 @@ class RequirementCollection implements \Countable, \IteratorAggregate {
} }
public function count(): int { public function count(): int {
return \count($this->requirements); return count($this->requirements);
} }
public function getIterator(): RequirementCollectionIterator { public function getIterator(): RequirementCollectionIterator {

@ -2,14 +2,19 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
class RequirementCollectionIterator implements \Iterator { use Iterator;
use function count;
/** @template-implements Iterator<int,Requirement> */
class RequirementCollectionIterator implements Iterator {
/** @var Requirement[] */ /** @var Requirement[] */
private $requirements; private $requirements;
@ -25,7 +30,7 @@ class RequirementCollectionIterator implements \Iterator {
} }
public function valid(): bool { public function valid(): bool {
return $this->position < \count($this->requirements); return $this->position < count($this->requirements);
} }
public function key(): int { public function key(): int {

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,13 +2,17 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
use const FILTER_VALIDATE_URL;
use function filter_var;
class Url { class Url {
/** @var string */ /** @var string */
private $url; private $url;
@ -24,12 +28,10 @@ class Url {
} }
/** /**
* @param string $url
*
* @throws InvalidUrlException * @throws InvalidUrlException
*/ */
private function ensureUrlIsValid($url): void { private function ensureUrlIsValid(string $url): void {
if (\filter_var($url, \FILTER_VALIDATE_URL) === false) { if (filter_var($url, FILTER_VALIDATE_URL) === false) {
throw new InvalidUrlException; throw new InvalidUrlException;
} }
} }

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
@ -17,4 +18,8 @@ class AuthorElement extends ManifestElement {
public function getEmail(): string { public function getEmail(): string {
return $this->getAttributeValue('email'); return $this->getAttributeValue('email');
} }
public function hasEMail(): bool {
return $this->hasAttribute('email');
}
} }

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,17 +2,24 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
use DOMElement; use DOMElement;
use DOMNodeList; use DOMNodeList;
use Iterator;
use ReturnTypeWillChange;
use function count;
use function get_class;
use function sprintf;
abstract class ElementCollection implements \Iterator { /** @template-implements Iterator<int,DOMElement> */
abstract class ElementCollection implements Iterator {
/** @var DOMElement[] */ /** @var DOMElement[] */
private $nodes = []; private $nodes = [];
@ -24,7 +31,7 @@ abstract class ElementCollection implements \Iterator {
$this->importNodes($nodeList); $this->importNodes($nodeList);
} }
#[\ReturnTypeWillChange] #[ReturnTypeWillChange]
abstract public function current(); abstract public function current();
public function next(): void { public function next(): void {
@ -36,7 +43,7 @@ abstract class ElementCollection implements \Iterator {
} }
public function valid(): bool { public function valid(): bool {
return $this->position < \count($this->nodes); return $this->position < count($this->nodes);
} }
public function rewind(): void { public function rewind(): void {
@ -51,7 +58,7 @@ abstract class ElementCollection implements \Iterator {
foreach ($nodeList as $node) { foreach ($nodeList as $node) {
if (!$node instanceof DOMElement) { if (!$node instanceof DOMElement) {
throw new ElementCollectionException( throw new ElementCollectionException(
\sprintf('\DOMElement expected, got \%s', \get_class($node)) sprintf('\DOMElement expected, got \%s', get_class($node))
); );
} }

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,15 +2,24 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
use DOMDocument; use DOMDocument;
use DOMElement; use DOMElement;
use Throwable;
use function count;
use function file_get_contents;
use function is_file;
use function libxml_clear_errors;
use function libxml_get_errors;
use function libxml_use_internal_errors;
use function sprintf;
class ManifestDocument { class ManifestDocument {
public const XMLNS = 'https://phar.io/xml/manifest/1.0'; public const XMLNS = 'https://phar.io/xml/manifest/1.0';
@ -19,28 +28,31 @@ class ManifestDocument {
private $dom; private $dom;
public static function fromFile(string $filename): ManifestDocument { public static function fromFile(string $filename): ManifestDocument {
if (!\file_exists($filename)) { if (!is_file($filename)) {
throw new ManifestDocumentException( throw new ManifestDocumentException(
\sprintf('File "%s" not found', $filename) sprintf('File "%s" not found', $filename)
); );
} }
return self::fromString( return self::fromString(
\file_get_contents($filename) file_get_contents($filename)
); );
} }
public static function fromString(string $xmlString): ManifestDocument { public static function fromString(string $xmlString): ManifestDocument {
$prev = \libxml_use_internal_errors(true); $prev = libxml_use_internal_errors(true);
\libxml_clear_errors(); libxml_clear_errors();
$dom = new DOMDocument(); try {
$dom->loadXML($xmlString); $dom = new DOMDocument();
$dom->loadXML($xmlString);
$errors = \libxml_get_errors(); $errors = libxml_get_errors();
\libxml_use_internal_errors($prev); libxml_use_internal_errors($prev);
} catch (Throwable $t) {
throw new ManifestDocumentException($t->getMessage(), 0, $t);
}
if (\count($errors) !== 0) { if (count($errors) !== 0) {
throw new ManifestDocumentLoadingException($errors); throw new ManifestDocumentLoadingException($errors);
} }
@ -94,7 +106,7 @@ class ManifestDocument {
if (!$element instanceof DOMElement) { if (!$element instanceof DOMElement) {
throw new ManifestDocumentException( throw new ManifestDocumentException(
\sprintf('Element %s missing', $elementName) sprintf('Element %s missing', $elementName)
); );
} }

@ -2,15 +2,17 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;
use DOMElement; use DOMElement;
use DOMNodeList; use DOMNodeList;
use function sprintf;
class ManifestElement { class ManifestElement {
public const XMLNS = 'https://phar.io/xml/manifest/1.0'; public const XMLNS = 'https://phar.io/xml/manifest/1.0';
@ -25,7 +27,7 @@ class ManifestElement {
protected function getAttributeValue(string $name): string { protected function getAttributeValue(string $name): string {
if (!$this->element->hasAttribute($name)) { if (!$this->element->hasAttribute($name)) {
throw new ManifestElementException( throw new ManifestElementException(
\sprintf( sprintf(
'Attribute %s not set on element %s', 'Attribute %s not set on element %s',
$name, $name,
$this->element->localName $this->element->localName
@ -36,12 +38,16 @@ class ManifestElement {
return $this->element->getAttribute($name); return $this->element->getAttribute($name);
} }
protected function hasAttribute(string $name): bool {
return $this->element->hasAttribute($name);
}
protected function getChildByName(string $elementName): DOMElement { protected function getChildByName(string $elementName): DOMElement {
$element = $this->element->getElementsByTagNameNS(self::XMLNS, $elementName)->item(0); $element = $this->element->getElementsByTagNameNS(self::XMLNS, $elementName)->item(0);
if (!$element instanceof DOMElement) { if (!$element instanceof DOMElement) {
throw new ManifestElementException( throw new ManifestElementException(
\sprintf('Element %s missing', $elementName) sprintf('Element %s missing', $elementName)
); );
} }
@ -53,7 +59,7 @@ class ManifestElement {
if ($elementList->length === 0) { if ($elementList->length === 0) {
throw new ManifestElementException( throw new ManifestElementException(
\sprintf('Element(s) %s missing', $elementName) sprintf('Element(s) %s missing', $elementName)
); );
} }

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -2,10 +2,11 @@
/* /*
* This file is part of PharIo\Manifest. * This file is part of PharIo\Manifest.
* *
* (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> * Copyright (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de> and contributors
* *
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*
*/ */
namespace PharIo\Manifest; namespace PharIo\Manifest;

@ -1,97 +0,0 @@
# ChangeLog
All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
## [10.1.11] - 2023-12-21
### Changed
* This component is now compatible with `nikic/php-parser` 5.0
## [10.1.10] - 2023-12-11
### Fixed
* [#1023](https://github.com/sebastianbergmann/php-code-coverage/issues/1023): Branch Coverage and Path Coverage are not correctly reported for traits
## [10.1.9] - 2023-11-23
### Fixed
* [#1020](https://github.com/sebastianbergmann/php-code-coverage/issues/1020): Single line method is ignored
## [10.1.8] - 2023-11-15
### Fixed
* [#1018](https://github.com/sebastianbergmann/php-code-coverage/issues/1018): Interface methods are not ignored when their signature is split over multiple lines
## [10.1.7] - 2023-10-04
### Fixed
* [#1014](https://github.com/sebastianbergmann/php-code-coverage/issues/1014): Incorrect statement count in coverage report for constructor property promotion
## [10.1.6] - 2023-09-19
### Fixed
* [#1012](https://github.com/sebastianbergmann/php-code-coverage/issues/1012): Cobertura report pulls functions from report scope, not the individual element
## [10.1.5] - 2023-09-12
### Changed
* [#1011](https://github.com/sebastianbergmann/php-code-coverage/pull/1011): Avoid serialization of cache data in PHP report
## [10.1.4] - 2023-08-31
### Fixed
* Exceptions of type `SebastianBergmann\Template\Exception` are now properly handled
## [10.1.3] - 2023-07-26
### Changed
* The result of `CodeCoverage::getReport()` is now cached
### Fixed
* Static analysis cache keys do not include configuration settings that affect source code parsing
* The Clover, Cobertura, Crap4j, and PHP report writers no longer create a `php:` directory when they should write to `php://stdout`, for instance
## [10.1.2] - 2023-05-22
### Fixed
* [#998](https://github.com/sebastianbergmann/php-code-coverage/pull/998): Group Use Declarations are not handled properly
## [10.1.1] - 2023-04-17
### Fixed
* [#994](https://github.com/sebastianbergmann/php-code-coverage/issues/994): Argument `$linesToBeIgnored` of `CodeCoverage::stop()` has no effect for files that are not executed at all
## [10.1.0] - 2023-04-13
### Added
* [#982](https://github.com/sebastianbergmann/php-code-coverage/issues/982): Add option to ignore lines from code coverage
### Deprecated
* The `SebastianBergmann\CodeCoverage\Filter::includeDirectory()`, `SebastianBergmann\CodeCoverage\Filter::excludeDirectory()`, and `SebastianBergmann\CodeCoverage\Filter::excludeFile()` methods are now deprecated
[10.1.11]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.1.10...10.1.11
[10.1.10]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.1.9...10.1.10
[10.1.9]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.1.8...10.1.9
[10.1.8]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.1.7...10.1.8
[10.1.7]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.1.6...10.1.7
[10.1.6]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.1.5...10.1.6
[10.1.5]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.1.4...10.1.5
[10.1.4]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.1.3...10.1.4
[10.1.3]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.1.2...10.1.3
[10.1.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.1.1...10.1.2
[10.1.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.1.0...10.1.1
[10.1.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/10.0.2...10.1.0

@ -1,6 +1,6 @@
BSD 3-Clause License BSD 3-Clause License
Copyright (c) 2009-2023, Sebastian Bergmann Copyright (c) 2009-2024, Sebastian Bergmann
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

@ -22,29 +22,29 @@
}, },
"config": { "config": {
"platform": { "platform": {
"php": "8.1.0" "php": "8.2.0"
}, },
"optimize-autoloader": true, "optimize-autoloader": true,
"sort-packages": true "sort-packages": true
}, },
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"php": ">=8.1", "php": ">=8.2",
"ext-dom": "*", "ext-dom": "*",
"ext-libxml": "*", "ext-libxml": "*",
"ext-xmlwriter": "*", "ext-xmlwriter": "*",
"nikic/php-parser": "^4.18 || ^5.0", "nikic/php-parser": "^5.0",
"phpunit/php-file-iterator": "^4.0", "phpunit/php-file-iterator": "^5.0",
"phpunit/php-text-template": "^3.0", "phpunit/php-text-template": "^4.0",
"sebastian/code-unit-reverse-lookup": "^3.0", "sebastian/code-unit-reverse-lookup": "^4.0",
"sebastian/complexity": "^3.0", "sebastian/complexity": "^4.0",
"sebastian/environment": "^6.0", "sebastian/environment": "^7.0",
"sebastian/lines-of-code": "^2.0", "sebastian/lines-of-code": "^3.0",
"sebastian/version": "^4.0", "sebastian/version": "^5.0",
"theseer/tokenizer": "^1.2.0" "theseer/tokenizer": "^1.2.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^10.1" "phpunit/phpunit": "^11.0"
}, },
"suggest": { "suggest": {
"ext-pcov": "PHP extension that provides line coverage", "ext-pcov": "PHP extension that provides line coverage",
@ -63,7 +63,7 @@
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "10.1-dev" "dev-main": "11.0-dev"
} }
} }
} }

@ -160,7 +160,7 @@ final class CodeCoverage
$this->tests = $tests; $this->tests = $tests;
} }
public function start(string $id, TestSize $size = null, bool $clear = false): void public function start(string $id, ?TestSize $size = null, bool $clear = false): void
{ {
if ($clear) { if ($clear) {
$this->clear(); $this->clear();
@ -177,13 +177,13 @@ final class CodeCoverage
/** /**
* @psalm-param array<string,list<int>> $linesToBeIgnored * @psalm-param array<string,list<int>> $linesToBeIgnored
*/ */
public function stop(bool $append = true, TestStatus $status = null, array|false $linesToBeCovered = [], array $linesToBeUsed = [], array $linesToBeIgnored = []): RawCodeCoverageData public function stop(bool $append = true, ?TestStatus $status = null, array|false $linesToBeCovered = [], array $linesToBeUsed = [], array $linesToBeIgnored = []): RawCodeCoverageData
{ {
$data = $this->driver->stop(); $data = $this->driver->stop();
$this->linesToBeIgnored = array_merge_recursive( $this->linesToBeIgnored = array_merge_recursive(
$this->linesToBeIgnored, $this->linesToBeIgnored,
$linesToBeIgnored $linesToBeIgnored,
); );
$this->append($data, null, $append, $status, $linesToBeCovered, $linesToBeUsed, $linesToBeIgnored); $this->append($data, null, $append, $status, $linesToBeCovered, $linesToBeUsed, $linesToBeIgnored);
@ -202,7 +202,7 @@ final class CodeCoverage
* @throws TestIdMissingException * @throws TestIdMissingException
* @throws UnintentionallyCoveredCodeException * @throws UnintentionallyCoveredCodeException
*/ */
public function append(RawCodeCoverageData $rawData, string $id = null, bool $append = true, TestStatus $status = null, array|false $linesToBeCovered = [], array $linesToBeUsed = [], array $linesToBeIgnored = []): void public function append(RawCodeCoverageData $rawData, ?string $id = null, bool $append = true, ?TestStatus $status = null, array|false $linesToBeCovered = [], array $linesToBeUsed = [], array $linesToBeIgnored = []): void
{ {
if ($id === null) { if ($id === null) {
$id = $this->currentId; $id = $this->currentId;
@ -246,7 +246,7 @@ final class CodeCoverage
$rawData, $rawData,
$linesToBeCovered, $linesToBeCovered,
$linesToBeUsed, $linesToBeUsed,
$size $size,
); );
if (empty($rawData->lineCoverage())) { if (empty($rawData->lineCoverage())) {
@ -267,7 +267,7 @@ final class CodeCoverage
public function merge(self $that): void public function merge(self $that): void
{ {
$this->filter->includeFiles( $this->filter->includeFiles(
$that->filter()->files() $that->filter()->files(),
); );
$this->data->merge($that->data); $this->data->merge($that->data);
@ -342,7 +342,7 @@ final class CodeCoverage
{ {
if (!$this->cachesStaticAnalysis()) { if (!$this->cachesStaticAnalysis()) {
throw new StaticAnalysisCacheNotConfiguredException( throw new StaticAnalysisCacheNotConfiguredException(
'The static analysis cache is not configured' 'The static analysis cache is not configured',
); );
} }
@ -436,12 +436,12 @@ final class CodeCoverage
$data->keepLineCoverageDataOnlyForLines( $data->keepLineCoverageDataOnlyForLines(
$filename, $filename,
array_keys($linesToBranchMap) array_keys($linesToBranchMap),
); );
$data->markExecutableLineByBranch( $data->markExecutableLineByBranch(
$filename, $filename,
$linesToBranchMap $linesToBranchMap,
); );
} }
} }
@ -459,13 +459,13 @@ final class CodeCoverage
if (isset($linesToBeIgnored[$filename])) { if (isset($linesToBeIgnored[$filename])) {
$data->removeCoverageDataForLines( $data->removeCoverageDataForLines(
$filename, $filename,
$linesToBeIgnored[$filename] $linesToBeIgnored[$filename],
); );
} }
$data->removeCoverageDataForLines( $data->removeCoverageDataForLines(
$filename, $filename,
$this->analyser()->ignoredLinesFor($filename) $this->analyser()->ignoredLinesFor($filename),
); );
} }
} }
@ -477,7 +477,7 @@ final class CodeCoverage
{ {
$uncoveredFiles = array_diff( $uncoveredFiles = array_diff(
$this->filter->files(), $this->filter->files(),
$this->data->coveredFiles() $this->data->coveredFiles(),
); );
foreach ($uncoveredFiles as $uncoveredFile) { foreach ($uncoveredFiles as $uncoveredFile) {
@ -485,10 +485,10 @@ final class CodeCoverage
$this->append( $this->append(
RawCodeCoverageData::fromUncoveredFile( RawCodeCoverageData::fromUncoveredFile(
$uncoveredFile, $uncoveredFile,
$this->analyser() $this->analyser(),
), ),
self::UNCOVERED_FILES, self::UNCOVERED_FILES,
linesToBeIgnored: $this->linesToBeIgnored linesToBeIgnored: $this->linesToBeIgnored,
); );
} }
} }
@ -502,7 +502,7 @@ final class CodeCoverage
{ {
$allowedLines = $this->getAllowedLines( $allowedLines = $this->getAllowedLines(
$linesToBeCovered, $linesToBeCovered,
$linesToBeUsed $linesToBeUsed,
); );
$unintentionallyCoveredUnits = []; $unintentionallyCoveredUnits = [];
@ -519,7 +519,7 @@ final class CodeCoverage
if (!empty($unintentionallyCoveredUnits)) { if (!empty($unintentionallyCoveredUnits)) {
throw new UnintentionallyCoveredCodeException( throw new UnintentionallyCoveredCodeException(
$unintentionallyCoveredUnits $unintentionallyCoveredUnits,
); );
} }
} }
@ -535,7 +535,7 @@ final class CodeCoverage
$allowedLines[$file] = array_merge( $allowedLines[$file] = array_merge(
$allowedLines[$file], $allowedLines[$file],
$linesToBeCovered[$file] $linesToBeCovered[$file],
); );
} }
@ -546,13 +546,13 @@ final class CodeCoverage
$allowedLines[$file] = array_merge( $allowedLines[$file] = array_merge(
$allowedLines[$file], $allowedLines[$file],
$linesToBeUsed[$file] $linesToBeUsed[$file],
); );
} }
foreach (array_keys($allowedLines) as $file) { foreach (array_keys($allowedLines) as $file) {
$allowedLines[$file] = array_flip( $allowedLines[$file] = array_flip(
array_unique($allowedLines[$file]) array_unique($allowedLines[$file]),
); );
} }
@ -592,7 +592,7 @@ final class CodeCoverage
throw new ReflectionException( throw new ReflectionException(
$e->getMessage(), $e->getMessage(),
$e->getCode(), $e->getCode(),
$e $e,
); );
} }
@ -614,7 +614,7 @@ final class CodeCoverage
$this->analyser = new ParsingFileAnalyser( $this->analyser = new ParsingFileAnalyser(
$this->useAnnotationsForIgnoringCode, $this->useAnnotationsForIgnoringCode,
$this->ignoreDeprecatedCode $this->ignoreDeprecatedCode,
); );
if ($this->cachesStaticAnalysis()) { if ($this->cachesStaticAnalysis()) {
@ -622,7 +622,7 @@ final class CodeCoverage
$this->cacheDirectory, $this->cacheDirectory,
$this->analyser, $this->analyser,
$this->useAnnotationsForIgnoringCode, $this->useAnnotationsForIgnoringCode,
$this->ignoreDeprecatedCode $this->ignoreDeprecatedCode,
); );
} }

@ -164,8 +164,8 @@ final class ProcessedCodeCoverageData
$compareLineNumbers = array_unique( $compareLineNumbers = array_unique(
array_merge( array_merge(
array_keys($this->lineCoverage[$file]), array_keys($this->lineCoverage[$file]),
array_keys($newData->lineCoverage[$file]) array_keys($newData->lineCoverage[$file]),
) ),
); );
foreach ($compareLineNumbers as $line) { foreach ($compareLineNumbers as $line) {
@ -176,7 +176,7 @@ final class ProcessedCodeCoverageData
$this->lineCoverage[$file][$line] = $newData->lineCoverage[$file][$line]; $this->lineCoverage[$file][$line] = $newData->lineCoverage[$file][$line];
} elseif ($thatPriority === $thisPriority && is_array($this->lineCoverage[$file][$line])) { } elseif ($thatPriority === $thisPriority && is_array($this->lineCoverage[$file][$line])) {
$this->lineCoverage[$file][$line] = array_unique( $this->lineCoverage[$file][$line] = array_unique(
array_merge($this->lineCoverage[$file][$line], $newData->lineCoverage[$file][$line]) array_merge($this->lineCoverage[$file][$line], $newData->lineCoverage[$file][$line]),
); );
} }
} }

@ -144,7 +144,7 @@ final class RawCodeCoverageData
$this->lineCoverage[$filename] = array_intersect_key( $this->lineCoverage[$filename] = array_intersect_key(
$this->lineCoverage[$filename], $this->lineCoverage[$filename],
array_flip($lines) array_flip($lines),
); );
} }
@ -223,7 +223,7 @@ final class RawCodeCoverageData
$this->lineCoverage[$filename] = array_diff_key( $this->lineCoverage[$filename] = array_diff_key(
$this->lineCoverage[$filename], $this->lineCoverage[$filename],
array_flip($lines) array_flip($lines),
); );
if (isset($this->functionCoverage[$filename])) { if (isset($this->functionCoverage[$filename])) {

@ -75,8 +75,8 @@ abstract class Driver
throw new BranchAndPathCoverageNotSupportedException( throw new BranchAndPathCoverageNotSupportedException(
sprintf( sprintf(
'%s does not support branch and path coverage', '%s does not support branch and path coverage',
$this->nameAndVersion() $this->nameAndVersion(),
) ),
); );
} }
@ -107,8 +107,8 @@ abstract class Driver
throw new DeadCodeDetectionNotSupportedException( throw new DeadCodeDetectionNotSupportedException(
sprintf( sprintf(
'%s does not support dead code detection', '%s does not support dead code detection',
$this->nameAndVersion() $this->nameAndVersion(),
) ),
); );
} }

@ -75,7 +75,7 @@ final class XdebugDriver extends Driver
xdebug_set_filter( xdebug_set_filter(
XDEBUG_FILTER_CODE_COVERAGE, XDEBUG_FILTER_CODE_COVERAGE,
XDEBUG_PATH_INCLUDE, XDEBUG_PATH_INCLUDE,
$filter->files() $filter->files(),
); );
} }
} }

@ -14,7 +14,6 @@ use function is_file;
use function realpath; use function realpath;
use function str_contains; use function str_contains;
use function str_starts_with; use function str_starts_with;
use SebastianBergmann\FileIterator\Facade as FileIteratorFacade;
final class Filter final class Filter
{ {
@ -28,16 +27,6 @@ final class Filter
*/ */
private array $isFileCache = []; private array $isFileCache = [];
/**
* @deprecated
*/
public function includeDirectory(string $directory, string $suffix = '.php', string $prefix = ''): void
{
foreach ((new FileIteratorFacade)->getFilesAsArray($directory, $suffix, $prefix) as $file) {
$this->includeFile($file);
}
}
/** /**
* @psalm-param list<string> $files * @psalm-param list<string> $files
*/ */
@ -59,30 +48,6 @@ final class Filter
$this->files[$filename] = true; $this->files[$filename] = true;
} }
/**
* @deprecated
*/
public function excludeDirectory(string $directory, string $suffix = '.php', string $prefix = ''): void
{
foreach ((new FileIteratorFacade)->getFilesAsArray($directory, $suffix, $prefix) as $file) {
$this->excludeFile($file);
}
}
/**
* @deprecated
*/
public function excludeFile(string $filename): void
{
$filename = realpath($filename);
if (!$filename || !isset($this->files[$filename])) {
return;
}
unset($this->files[$filename]);
}
public function isFile(string $filename): bool public function isFile(string $filename): bool
{ {
if (isset($this->isFileCache[$filename])) { if (isset($this->isFileCache[$filename])) {

@ -33,7 +33,7 @@ abstract class AbstractNode implements Countable
private readonly ?AbstractNode $parent; private readonly ?AbstractNode $parent;
private string $id; private string $id;
public function __construct(string $name, self $parent = null) public function __construct(string $name, ?self $parent = null)
{ {
if (str_ends_with($name, DIRECTORY_SEPARATOR)) { if (str_ends_with($name, DIRECTORY_SEPARATOR)) {
$name = substr($name, 0, -1); $name = substr($name, 0, -1);
@ -131,7 +131,7 @@ abstract class AbstractNode implements Countable
{ {
return Percentage::fromFractionAndTotal( return Percentage::fromFractionAndTotal(
$this->numberOfExecutedBranches(), $this->numberOfExecutedBranches(),
$this->numberOfExecutableBranches() $this->numberOfExecutableBranches(),
); );
} }
@ -139,7 +139,7 @@ abstract class AbstractNode implements Countable
{ {
return Percentage::fromFractionAndTotal( return Percentage::fromFractionAndTotal(
$this->numberOfExecutedPaths(), $this->numberOfExecutedPaths(),
$this->numberOfExecutablePaths() $this->numberOfExecutablePaths(),
); );
} }

@ -45,13 +45,13 @@ final class Builder
$commonPath = $this->reducePaths($data); $commonPath = $this->reducePaths($data);
$root = new Directory( $root = new Directory(
$commonPath, $commonPath,
null null,
); );
$this->addItems( $this->addItems(
$root, $root,
$this->buildDirectoryStructure($data), $this->buildDirectoryStructure($data),
$coverage->getTests() $coverage->getTests(),
); );
return $root; return $root;
@ -80,8 +80,8 @@ final class Builder
$this->analyser->classesIn($filename), $this->analyser->classesIn($filename),
$this->analyser->traitsIn($filename), $this->analyser->traitsIn($filename),
$this->analyser->functionsIn($filename), $this->analyser->functionsIn($filename),
$this->analyser->linesOfCodeFor($filename) $this->analyser->linesOfCodeFor($filename),
) ),
); );
} }
} else { } else {

@ -37,7 +37,7 @@ final class CrapIndex
return sprintf( return sprintf(
'%01.2F', '%01.2F',
$this->cyclomaticComplexity ** 2 * (1 - $this->codeCoverage / 100) ** 3 + $this->cyclomaticComplexity $this->cyclomaticComplexity ** 2 * (1 - $this->codeCoverage / 100) ** 3 + $this->cyclomaticComplexity,
); );
} }
} }

@ -76,7 +76,7 @@ final class Directory extends AbstractNode implements IteratorAggregate
{ {
return new RecursiveIteratorIterator( return new RecursiveIteratorIterator(
new Iterator($this), new Iterator($this),
RecursiveIteratorIterator::SELF_FIRST RecursiveIteratorIterator::SELF_FIRST,
); );
} }
@ -122,7 +122,7 @@ final class Directory extends AbstractNode implements IteratorAggregate
foreach ($this->children as $child) { foreach ($this->children as $child) {
$this->classes = array_merge( $this->classes = array_merge(
$this->classes, $this->classes,
$child->classes() $child->classes(),
); );
} }
} }
@ -138,7 +138,7 @@ final class Directory extends AbstractNode implements IteratorAggregate
foreach ($this->children as $child) { foreach ($this->children as $child) {
$this->traits = array_merge( $this->traits = array_merge(
$this->traits, $this->traits,
$child->traits() $child->traits(),
); );
} }
} }
@ -154,7 +154,7 @@ final class Directory extends AbstractNode implements IteratorAggregate
foreach ($this->children as $child) { foreach ($this->children as $child) {
$this->functions = array_merge( $this->functions = array_merge(
$this->functions, $this->functions,
$child->functions() $child->functions(),
); );
} }
} }
@ -177,8 +177,8 @@ final class Directory extends AbstractNode implements IteratorAggregate
foreach ($this->children as $child) { foreach ($this->children as $child) {
$childLinesOfCode = $child->linesOfCode(); $childLinesOfCode = $child->linesOfCode();
$this->linesOfCode['linesOfCode'] += $childLinesOfCode['linesOfCode']; $this->linesOfCode['linesOfCode'] += $childLinesOfCode['linesOfCode'];
$this->linesOfCode['commentLinesOfCode'] += $childLinesOfCode['commentLinesOfCode']; $this->linesOfCode['commentLinesOfCode'] += $childLinesOfCode['commentLinesOfCode'];
$this->linesOfCode['nonCommentLinesOfCode'] += $childLinesOfCode['nonCommentLinesOfCode']; $this->linesOfCode['nonCommentLinesOfCode'] += $childLinesOfCode['nonCommentLinesOfCode'];
} }
} }

@ -487,14 +487,14 @@ final class File extends AbstractNode
$this->classes[$className]['methods'][$methodName] = $methodData; $this->classes[$className]['methods'][$methodName] = $methodData;
$this->classes[$className]['executableBranches'] += $methodData['executableBranches']; $this->classes[$className]['executableBranches'] += $methodData['executableBranches'];
$this->classes[$className]['executedBranches'] += $methodData['executedBranches']; $this->classes[$className]['executedBranches'] += $methodData['executedBranches'];
$this->classes[$className]['executablePaths'] += $methodData['executablePaths']; $this->classes[$className]['executablePaths'] += $methodData['executablePaths'];
$this->classes[$className]['executedPaths'] += $methodData['executedPaths']; $this->classes[$className]['executedPaths'] += $methodData['executedPaths'];
$this->numExecutableBranches += $methodData['executableBranches']; $this->numExecutableBranches += $methodData['executableBranches'];
$this->numExecutedBranches += $methodData['executedBranches']; $this->numExecutedBranches += $methodData['executedBranches'];
$this->numExecutablePaths += $methodData['executablePaths']; $this->numExecutablePaths += $methodData['executablePaths'];
$this->numExecutedPaths += $methodData['executedPaths']; $this->numExecutedPaths += $methodData['executedPaths'];
foreach (range($method['startLine'], $method['endLine']) as $lineNumber) { foreach (range($method['startLine'], $method['endLine']) as $lineNumber) {
$this->codeUnitsByLine[$lineNumber] = [ $this->codeUnitsByLine[$lineNumber] = [
@ -536,14 +536,14 @@ final class File extends AbstractNode
$this->traits[$traitName]['methods'][$methodName] = $methodData; $this->traits[$traitName]['methods'][$methodName] = $methodData;
$this->traits[$traitName]['executableBranches'] += $methodData['executableBranches']; $this->traits[$traitName]['executableBranches'] += $methodData['executableBranches'];
$this->traits[$traitName]['executedBranches'] += $methodData['executedBranches']; $this->traits[$traitName]['executedBranches'] += $methodData['executedBranches'];
$this->traits[$traitName]['executablePaths'] += $methodData['executablePaths']; $this->traits[$traitName]['executablePaths'] += $methodData['executablePaths'];
$this->traits[$traitName]['executedPaths'] += $methodData['executedPaths']; $this->traits[$traitName]['executedPaths'] += $methodData['executedPaths'];
$this->numExecutableBranches += $methodData['executableBranches']; $this->numExecutableBranches += $methodData['executableBranches'];
$this->numExecutedBranches += $methodData['executedBranches']; $this->numExecutedBranches += $methodData['executedBranches'];
$this->numExecutablePaths += $methodData['executablePaths']; $this->numExecutablePaths += $methodData['executablePaths'];
$this->numExecutedPaths += $methodData['executedPaths']; $this->numExecutedPaths += $methodData['executedPaths'];
foreach (range($method['startLine'], $method['endLine']) as $lineNumber) { foreach (range($method['startLine'], $method['endLine']) as $lineNumber) {
$this->codeUnitsByLine[$lineNumber] = [ $this->codeUnitsByLine[$lineNumber] = [
@ -587,7 +587,7 @@ final class File extends AbstractNode
if (isset($this->functionCoverageData[$functionName]['branches'])) { if (isset($this->functionCoverageData[$functionName]['branches'])) {
$this->functions[$functionName]['executableBranches'] = count( $this->functions[$functionName]['executableBranches'] = count(
$this->functionCoverageData[$functionName]['branches'] $this->functionCoverageData[$functionName]['branches'],
); );
$this->functions[$functionName]['executedBranches'] = count( $this->functions[$functionName]['executedBranches'] = count(
@ -596,14 +596,14 @@ final class File extends AbstractNode
static function (array $branch) static function (array $branch)
{ {
return (bool) $branch['hit']; return (bool) $branch['hit'];
} },
) ),
); );
} }
if (isset($this->functionCoverageData[$functionName]['paths'])) { if (isset($this->functionCoverageData[$functionName]['paths'])) {
$this->functions[$functionName]['executablePaths'] = count( $this->functions[$functionName]['executablePaths'] = count(
$this->functionCoverageData[$functionName]['paths'] $this->functionCoverageData[$functionName]['paths'],
); );
$this->functions[$functionName]['executedPaths'] = count( $this->functions[$functionName]['executedPaths'] = count(
@ -612,15 +612,15 @@ final class File extends AbstractNode
static function (array $path) static function (array $path)
{ {
return (bool) $path['hit']; return (bool) $path['hit'];
} },
) ),
); );
} }
$this->numExecutableBranches += $this->functions[$functionName]['executableBranches']; $this->numExecutableBranches += $this->functions[$functionName]['executableBranches'];
$this->numExecutedBranches += $this->functions[$functionName]['executedBranches']; $this->numExecutedBranches += $this->functions[$functionName]['executedBranches'];
$this->numExecutablePaths += $this->functions[$functionName]['executablePaths']; $this->numExecutablePaths += $this->functions[$functionName]['executablePaths'];
$this->numExecutedPaths += $this->functions[$functionName]['executedPaths']; $this->numExecutedPaths += $this->functions[$functionName]['executedPaths'];
} }
} }
@ -653,7 +653,7 @@ final class File extends AbstractNode
if (isset($this->functionCoverageData[$key]['branches'])) { if (isset($this->functionCoverageData[$key]['branches'])) {
$methodData['executableBranches'] = count( $methodData['executableBranches'] = count(
$this->functionCoverageData[$key]['branches'] $this->functionCoverageData[$key]['branches'],
); );
$methodData['executedBranches'] = count( $methodData['executedBranches'] = count(
@ -662,14 +662,14 @@ final class File extends AbstractNode
static function (array $branch) static function (array $branch)
{ {
return (bool) $branch['hit']; return (bool) $branch['hit'];
} },
) ),
); );
} }
if (isset($this->functionCoverageData[$key]['paths'])) { if (isset($this->functionCoverageData[$key]['paths'])) {
$methodData['executablePaths'] = count( $methodData['executablePaths'] = count(
$this->functionCoverageData[$key]['paths'] $this->functionCoverageData[$key]['paths'],
); );
$methodData['executedPaths'] = count( $methodData['executedPaths'] = count(
@ -678,8 +678,8 @@ final class File extends AbstractNode
static function (array $path) static function (array $path)
{ {
return (bool) $path['hit']; return (bool) $path['hit'];
} },
) ),
); );
} }

@ -16,7 +16,7 @@ use function is_string;
use function ksort; use function ksort;
use function max; use function max;
use function range; use function range;
use function strpos; use function str_contains;
use function time; use function time;
use DOMDocument; use DOMDocument;
use SebastianBergmann\CodeCoverage\CodeCoverage; use SebastianBergmann\CodeCoverage\CodeCoverage;
@ -79,7 +79,7 @@ final class Clover
} }
$classMethods++; $classMethods++;
$classStatements += $method['executableLines']; $classStatements += $method['executableLines'];
$coveredClassStatements += $method['executedLines']; $coveredClassStatements += $method['executedLines'];
if ($method['coverage'] == 100) { if ($method['coverage'] == 100) {
@ -115,28 +115,28 @@ final class Clover
if (!empty($class['package']['fullPackage'])) { if (!empty($class['package']['fullPackage'])) {
$xmlClass->setAttribute( $xmlClass->setAttribute(
'fullPackage', 'fullPackage',
$class['package']['fullPackage'] $class['package']['fullPackage'],
); );
} }
if (!empty($class['package']['category'])) { if (!empty($class['package']['category'])) {
$xmlClass->setAttribute( $xmlClass->setAttribute(
'category', 'category',
$class['package']['category'] $class['package']['category'],
); );
} }
if (!empty($class['package']['package'])) { if (!empty($class['package']['package'])) {
$xmlClass->setAttribute( $xmlClass->setAttribute(
'package', 'package',
$class['package']['package'] $class['package']['package'],
); );
} }
if (!empty($class['package']['subpackage'])) { if (!empty($class['package']['subpackage'])) {
$xmlClass->setAttribute( $xmlClass->setAttribute(
'subpackage', 'subpackage',
$class['package']['subpackage'] $class['package']['subpackage'],
); );
} }
@ -213,7 +213,7 @@ final class Clover
} else { } else {
if (!isset($packages[$namespace])) { if (!isset($packages[$namespace])) {
$packages[$namespace] = $xmlDocument->createElement( $packages[$namespace] = $xmlDocument->createElement(
'package' 'package',
); );
$packages[$namespace]->setAttribute('name', $namespace); $packages[$namespace]->setAttribute('name', $namespace);
@ -244,7 +244,7 @@ final class Clover
$buffer = $xmlDocument->saveXML(); $buffer = $xmlDocument->saveXML();
if ($target !== null) { if ($target !== null) {
if (!strpos($target, '://') !== false) { if (!str_contains($target, '://')) {
Filesystem::createDirectory(dirname($target)); Filesystem::createDirectory(dirname($target));
} }

@ -15,8 +15,8 @@ use function dirname;
use function file_put_contents; use function file_put_contents;
use function preg_match; use function preg_match;
use function range; use function range;
use function str_contains;
use function str_replace; use function str_replace;
use function strpos;
use function time; use function time;
use DOMImplementation; use DOMImplementation;
use SebastianBergmann\CodeCoverage\CodeCoverage; use SebastianBergmann\CodeCoverage\CodeCoverage;
@ -40,7 +40,7 @@ final class Cobertura
$documentType = $implementation->createDocumentType( $documentType = $implementation->createDocumentType(
'coverage', 'coverage',
'', '',
'http://cobertura.sourceforge.net/xml/coverage-04.dtd' 'http://cobertura.sourceforge.net/xml/coverage-04.dtd',
); );
$document = $implementation->createDocument('', '', $documentType); $document = $implementation->createDocument('', '', $documentType);
@ -114,7 +114,7 @@ final class Cobertura
$coverageData = $item->lineCoverageData(); $coverageData = $item->lineCoverageData();
foreach ($classes as $className => $class) { foreach ($classes as $className => $class) {
$complexity += $class['ccn']; $complexity += $class['ccn'];
$packageComplexity += $class['ccn']; $packageComplexity += $class['ccn'];
if (!empty($class['package']['namespace'])) { if (!empty($class['package']['namespace'])) {
@ -225,22 +225,22 @@ final class Cobertura
continue; continue;
} }
$complexity += $function['ccn']; $complexity += $function['ccn'];
$packageComplexity += $function['ccn']; $packageComplexity += $function['ccn'];
$functionsComplexity += $function['ccn']; $functionsComplexity += $function['ccn'];
$linesValid = $function['executableLines']; $linesValid = $function['executableLines'];
$linesCovered = $function['executedLines']; $linesCovered = $function['executedLines'];
$lineRate = $linesValid === 0 ? 0 : ($linesCovered / $linesValid); $lineRate = $linesValid === 0 ? 0 : ($linesCovered / $linesValid);
$functionsLinesValid += $linesValid; $functionsLinesValid += $linesValid;
$functionsLinesCovered += $linesCovered; $functionsLinesCovered += $linesCovered;
$branchesValid = $function['executableBranches']; $branchesValid = $function['executableBranches'];
$branchesCovered = $function['executedBranches']; $branchesCovered = $function['executedBranches'];
$branchRate = $branchesValid === 0 ? 0 : ($branchesCovered / $branchesValid); $branchRate = $branchesValid === 0 ? 0 : ($branchesCovered / $branchesValid);
$functionsBranchesValid += $branchesValid; $functionsBranchesValid += $branchesValid;
$functionsBranchesCovered += $branchesValid; $functionsBranchesCovered += $branchesValid;
$methodElement = $document->createElement('method'); $methodElement = $document->createElement('method');
@ -295,7 +295,7 @@ final class Cobertura
$buffer = $document->saveXML(); $buffer = $document->saveXML();
if ($target !== null) { if ($target !== null) {
if (!strpos($target, '://') !== false) { if (!str_contains($target, '://')) {
Filesystem::createDirectory(dirname($target)); Filesystem::createDirectory(dirname($target));
} }

@ -15,7 +15,7 @@ use function file_put_contents;
use function htmlspecialchars; use function htmlspecialchars;
use function is_string; use function is_string;
use function round; use function round;
use function strpos; use function str_contains;
use DOMDocument; use DOMDocument;
use SebastianBergmann\CodeCoverage\CodeCoverage; use SebastianBergmann\CodeCoverage\CodeCoverage;
use SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException; use SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException;
@ -73,7 +73,7 @@ final class Crap4j
foreach ($class['methods'] as $methodName => $method) { foreach ($class['methods'] as $methodName => $method) {
$crapLoad = $this->crapLoad((float) $method['crap'], $method['ccn'], $method['coverage']); $crapLoad = $this->crapLoad((float) $method['crap'], $method['ccn'], $method['coverage']);
$fullCrap += $method['crap']; $fullCrap += $method['crap'];
$fullCrapLoad += $crapLoad; $fullCrapLoad += $crapLoad;
$fullMethodCount++; $fullMethodCount++;
@ -122,7 +122,7 @@ final class Crap4j
$buffer = $document->saveXML(); $buffer = $document->saveXML();
if ($target !== null) { if ($target !== null) {
if (!strpos($target, '://') !== false) { if (!str_contains($target, '://')) {
Filesystem::createDirectory(dirname($target)); Filesystem::createDirectory(dirname($target));
} }

@ -31,7 +31,7 @@ final class CustomCssFile
{ {
if (!is_file($path)) { if (!is_file($path)) {
throw new InvalidArgumentException( throw new InvalidArgumentException(
'$path does not exist' '$path does not exist',
); );
} }

@ -50,7 +50,7 @@ final class Facade
$this->generator, $this->generator,
$date, $date,
$this->thresholds, $this->thresholds,
$coverage->collectsBranchAndPathCoverage() $coverage->collectsBranchAndPathCoverage(),
); );
$directory = new Directory( $directory = new Directory(
@ -58,7 +58,7 @@ final class Facade
$this->generator, $this->generator,
$date, $date,
$this->thresholds, $this->thresholds,
$coverage->collectsBranchAndPathCoverage() $coverage->collectsBranchAndPathCoverage(),
); );
$file = new File( $file = new File(
@ -66,7 +66,7 @@ final class Facade
$this->generator, $this->generator,
$date, $date,
$this->thresholds, $this->thresholds,
$coverage->collectsBranchAndPathCoverage() $coverage->collectsBranchAndPathCoverage(),
); );
$directory->render($report, $target . 'index.html'); $directory->render($report, $target . 'index.html');
@ -126,7 +126,7 @@ final class Facade
'success-high' => $this->colors->successHigh(), 'success-high' => $this->colors->successHigh(),
'warning' => $this->colors->warning(), 'warning' => $this->colors->warning(),
'danger' => $this->colors->danger(), 'danger' => $this->colors->danger(),
] ],
); );
try { try {
@ -135,7 +135,7 @@ final class Facade
throw new FileCouldNotBeWrittenException( throw new FileCouldNotBeWrittenException(
$e->getMessage(), $e->getMessage(),
$e->getCode(), $e->getCode(),
$e $e,
); );
} }
} }

@ -55,7 +55,7 @@ abstract class Renderer
$data['numClasses']; $data['numClasses'];
$classesBar = $this->coverageBar( $classesBar = $this->coverageBar(
$data['testedClassesPercent'] $data['testedClassesPercent'],
); );
} else { } else {
$classesLevel = ''; $classesLevel = '';
@ -71,7 +71,7 @@ abstract class Renderer
$data['numMethods']; $data['numMethods'];
$methodsBar = $this->coverageBar( $methodsBar = $this->coverageBar(
$data['testedMethodsPercent'] $data['testedMethodsPercent'],
); );
} else { } else {
$methodsLevel = ''; $methodsLevel = '';
@ -87,7 +87,7 @@ abstract class Renderer
$data['numExecutableLines']; $data['numExecutableLines'];
$linesBar = $this->coverageBar( $linesBar = $this->coverageBar(
$data['linesExecutedPercent'] $data['linesExecutedPercent'],
); );
} else { } else {
$linesLevel = ''; $linesLevel = '';
@ -103,7 +103,7 @@ abstract class Renderer
$data['numExecutablePaths']; $data['numExecutablePaths'];
$pathsBar = $this->coverageBar( $pathsBar = $this->coverageBar(
$data['pathsExecutedPercent'] $data['pathsExecutedPercent'],
); );
} else { } else {
$pathsLevel = ''; $pathsLevel = '';
@ -119,7 +119,7 @@ abstract class Renderer
$data['numExecutableBranches']; $data['numExecutableBranches'];
$branchesBar = $this->coverageBar( $branchesBar = $this->coverageBar(
$data['branchesExecutedPercent'] $data['branchesExecutedPercent'],
); );
} else { } else {
$branchesLevel = ''; $branchesLevel = '';
@ -153,7 +153,7 @@ abstract class Renderer
'classes_tested_percent' => $data['testedClassesPercentAsString'] ?? '', 'classes_tested_percent' => $data['testedClassesPercentAsString'] ?? '',
'classes_level' => $classesLevel, 'classes_level' => $classesLevel,
'classes_number' => $classesNumber, 'classes_number' => $classesNumber,
] ],
); );
return $template->render(); return $template->render();
@ -173,7 +173,7 @@ abstract class Renderer
'generator' => $this->generator, 'generator' => $this->generator,
'low_upper_bound' => $this->thresholds->lowUpperBound(), 'low_upper_bound' => $this->thresholds->lowUpperBound(),
'high_lower_bound' => $this->thresholds->highLowerBound(), 'high_lower_bound' => $this->thresholds->highLowerBound(),
] ],
); );
} }
@ -196,7 +196,7 @@ abstract class Renderer
if ($step !== $node) { if ($step !== $node) {
$breadcrumbs .= $this->inactiveBreadcrumb( $breadcrumbs .= $this->inactiveBreadcrumb(
$step, $step,
array_pop($pathToRoot) array_pop($pathToRoot),
); );
} else { } else {
$breadcrumbs .= $this->activeBreadcrumb($step); $breadcrumbs .= $this->activeBreadcrumb($step);
@ -210,7 +210,7 @@ abstract class Renderer
{ {
$buffer = sprintf( $buffer = sprintf(
' <li class="breadcrumb-item active">%s</li>' . "\n", ' <li class="breadcrumb-item active">%s</li>' . "\n",
$node->name() $node->name(),
); );
if ($node instanceof DirectoryNode) { if ($node instanceof DirectoryNode) {
@ -225,7 +225,7 @@ abstract class Renderer
return sprintf( return sprintf(
' <li class="breadcrumb-item"><a href="%sindex.html">%s</a></li>' . "\n", ' <li class="breadcrumb-item"><a href="%sindex.html">%s</a></li>' . "\n",
$pathToRoot, $pathToRoot,
$node->name() $node->name(),
); );
} }
@ -250,7 +250,7 @@ abstract class Renderer
$template = new Template( $template = new Template(
$templateName, $templateName,
'{{', '{{',
'}}' '}}',
); );
$template->setVar(['level' => $level, 'percent' => sprintf('%.2F', $percent)]); $template->setVar(['level' => $level, 'percent' => sprintf('%.2F', $percent)]);
@ -280,7 +280,7 @@ abstract class Renderer
'<a href="%s" target="_top">%s %s</a>', '<a href="%s" target="_top">%s %s</a>',
$runtime->getVendorUrl(), $runtime->getVendorUrl(),
$runtime->getName(), $runtime->getName(),
$runtime->getVersion() $runtime->getVersion(),
); );
} }
} }

@ -36,7 +36,7 @@ final class Dashboard extends Renderer
$template = new Template( $template = new Template(
$templateName, $templateName,
'{{', '{{',
'}}' '}}',
); );
$this->setCommonTemplateVariables($template, $node); $this->setCommonTemplateVariables($template, $node);
@ -57,7 +57,7 @@ final class Dashboard extends Renderer
'complexity_method' => $complexity['method'], 'complexity_method' => $complexity['method'],
'class_coverage_distribution' => $coverageDistribution['class'], 'class_coverage_distribution' => $coverageDistribution['class'],
'method_coverage_distribution' => $coverageDistribution['method'], 'method_coverage_distribution' => $coverageDistribution['method'],
] ],
); );
try { try {
@ -66,7 +66,7 @@ final class Dashboard extends Renderer
throw new FileCouldNotBeWrittenException( throw new FileCouldNotBeWrittenException(
$e->getMessage(), $e->getMessage(),
$e->getCode(), $e->getCode(),
$e $e,
); );
} }
} }
@ -76,7 +76,7 @@ final class Dashboard extends Renderer
return sprintf( return sprintf(
' <li class="breadcrumb-item"><a href="index.html">%s</a></li>' . "\n" . ' <li class="breadcrumb-item"><a href="index.html">%s</a></li>' . "\n" .
' <li class="breadcrumb-item active">(Dashboard)</li>' . "\n", ' <li class="breadcrumb-item active">(Dashboard)</li>' . "\n",
$node->name() $node->name(),
); );
} }
@ -99,7 +99,7 @@ final class Dashboard extends Renderer
sprintf( sprintf(
'<a href="%s">%s</a>', '<a href="%s">%s</a>',
str_replace($baseLink, '', $method['link']), str_replace($baseLink, '', $method['link']),
$methodName $methodName,
), ),
]; ];
} }
@ -110,7 +110,7 @@ final class Dashboard extends Renderer
sprintf( sprintf(
'<a href="%s">%s</a>', '<a href="%s">%s</a>',
str_replace($baseLink, '', $class['link']), str_replace($baseLink, '', $class['link']),
$className $className,
), ),
]; ];
} }
@ -222,7 +222,7 @@ final class Dashboard extends Renderer
' <tr><td><a href="%s">%s</a></td><td class="text-right">%d%%</td></tr>' . "\n", ' <tr><td><a href="%s">%s</a></td><td class="text-right">%d%%</td></tr>' . "\n",
str_replace($baseLink, '', $classes[$className]['link']), str_replace($baseLink, '', $classes[$className]['link']),
$className, $className,
$coverage $coverage,
); );
} }
@ -234,7 +234,7 @@ final class Dashboard extends Renderer
str_replace($baseLink, '', $classes[$class]['methods'][$method]['link']), str_replace($baseLink, '', $classes[$class]['methods'][$method]['link']),
$methodName, $methodName,
$method, $method,
$coverage $coverage,
); );
} }
@ -277,7 +277,7 @@ final class Dashboard extends Renderer
' <tr><td><a href="%s">%s</a></td><td class="text-right">%d</td></tr>' . "\n", ' <tr><td><a href="%s">%s</a></td><td class="text-right">%d</td></tr>' . "\n",
str_replace($baseLink, '', $classes[$className]['link']), str_replace($baseLink, '', $classes[$className]['link']),
$className, $className,
$crap $crap,
); );
} }
@ -289,7 +289,7 @@ final class Dashboard extends Renderer
str_replace($baseLink, '', $classes[$class]['methods'][$method]['link']), str_replace($baseLink, '', $classes[$class]['methods'][$method]['link']),
$methodName, $methodName,
$method, $method,
$crap $crap,
); );
} }

@ -44,7 +44,7 @@ final class Directory extends Renderer
[ [
'id' => $node->id(), 'id' => $node->id(),
'items' => $items, 'items' => $items,
] ],
); );
try { try {
@ -53,7 +53,7 @@ final class Directory extends Renderer
throw new FileCouldNotBeWrittenException( throw new FileCouldNotBeWrittenException(
$e->getMessage(), $e->getMessage(),
$e->getCode(), $e->getCode(),
$e $e,
); );
} }
} }
@ -93,7 +93,7 @@ final class Directory extends Renderer
$data['name'] = sprintf( $data['name'] = sprintf(
'<a href="%s/index.html">%s</a>', '<a href="%s/index.html">%s</a>',
$node->name(), $node->name(),
$node->name() $node->name(),
); );
$data['icon'] = sprintf('<img src="%s_icons/file-directory.svg" class="octicon" />', $up); $data['icon'] = sprintf('<img src="%s_icons/file-directory.svg" class="octicon" />', $up);
} elseif ($this->hasBranchCoverage) { } elseif ($this->hasBranchCoverage) {
@ -102,13 +102,13 @@ final class Directory extends Renderer
$node->name(), $node->name(),
$node->name(), $node->name(),
$node->name(), $node->name(),
$node->name() $node->name(),
); );
} else { } else {
$data['name'] = sprintf( $data['name'] = sprintf(
'<a href="%s.html">%s</a>', '<a href="%s.html">%s</a>',
$node->name(), $node->name(),
$node->name() $node->name(),
); );
} }
} }
@ -117,7 +117,7 @@ final class Directory extends Renderer
return $this->renderItemTemplate( return $this->renderItemTemplate(
new Template($templateName, '{{', '}}'), new Template($templateName, '{{', '}}'),
$data $data,
); );
} }
} }

@ -196,7 +196,7 @@ final class File extends Renderer
'lines' => $this->renderSourceWithLineCoverage($node), 'lines' => $this->renderSourceWithLineCoverage($node),
'legend' => '<p><span class="legend covered-by-small-tests">Covered by small (and larger) tests</span><span class="legend covered-by-medium-tests">Covered by medium (and large) tests</span><span class="legend covered-by-large-tests">Covered by large tests (and tests of unknown size)</span><span class="legend not-covered">Not covered</span><span class="legend not-coverable">Not coverable</span></p>', 'legend' => '<p><span class="legend covered-by-small-tests">Covered by small (and larger) tests</span><span class="legend covered-by-medium-tests">Covered by medium (and large) tests</span><span class="legend covered-by-large-tests">Covered by large tests (and tests of unknown size)</span><span class="legend not-covered">Not covered</span><span class="legend not-coverable">Not coverable</span></p>',
'structure' => '', 'structure' => '',
] ],
); );
try { try {
@ -205,7 +205,7 @@ final class File extends Renderer
throw new FileCouldNotBeWrittenException( throw new FileCouldNotBeWrittenException(
$e->getMessage(), $e->getMessage(),
$e->getCode(), $e->getCode(),
$e $e,
); );
} }
@ -216,7 +216,7 @@ final class File extends Renderer
'lines' => $this->renderSourceWithBranchCoverage($node), 'lines' => $this->renderSourceWithBranchCoverage($node),
'legend' => '<p><span class="success"><strong>Fully covered</strong></span><span class="warning"><strong>Partially covered</strong></span><span class="danger"><strong>Not covered</strong></span></p>', 'legend' => '<p><span class="success"><strong>Fully covered</strong></span><span class="warning"><strong>Partially covered</strong></span><span class="danger"><strong>Not covered</strong></span></p>',
'structure' => $this->renderBranchStructure($node), 'structure' => $this->renderBranchStructure($node),
] ],
); );
try { try {
@ -225,7 +225,7 @@ final class File extends Renderer
throw new FileCouldNotBeWrittenException( throw new FileCouldNotBeWrittenException(
$e->getMessage(), $e->getMessage(),
$e->getCode(), $e->getCode(),
$e $e,
); );
} }
@ -235,7 +235,7 @@ final class File extends Renderer
'lines' => $this->renderSourceWithPathCoverage($node), 'lines' => $this->renderSourceWithPathCoverage($node),
'legend' => '<p><span class="success"><strong>Fully covered</strong></span><span class="warning"><strong>Partially covered</strong></span><span class="danger"><strong>Not covered</strong></span></p>', 'legend' => '<p><span class="success"><strong>Fully covered</strong></span><span class="warning"><strong>Partially covered</strong></span><span class="danger"><strong>Not covered</strong></span></p>',
'structure' => $this->renderPathStructure($node), 'structure' => $this->renderPathStructure($node),
] ],
); );
try { try {
@ -244,7 +244,7 @@ final class File extends Renderer
throw new FileCouldNotBeWrittenException( throw new FileCouldNotBeWrittenException(
$e->getMessage(), $e->getMessage(),
$e->getCode(), $e->getCode(),
$e $e,
); );
} }
} }
@ -259,7 +259,7 @@ final class File extends Renderer
$methodItemTemplate = new Template( $methodItemTemplate = new Template(
$methodTemplateName, $methodTemplateName,
'{{', '{{',
'}}' '}}',
); );
$items = $this->renderItemTemplate( $items = $this->renderItemTemplate(
@ -287,24 +287,24 @@ final class File extends Renderer
'testedClassesPercent' => $node->percentageOfTestedClassesAndTraits()->asFloat(), 'testedClassesPercent' => $node->percentageOfTestedClassesAndTraits()->asFloat(),
'testedClassesPercentAsString' => $node->percentageOfTestedClassesAndTraits()->asString(), 'testedClassesPercentAsString' => $node->percentageOfTestedClassesAndTraits()->asString(),
'crap' => '<abbr title="Change Risk Anti-Patterns (CRAP) Index">CRAP</abbr>', 'crap' => '<abbr title="Change Risk Anti-Patterns (CRAP) Index">CRAP</abbr>',
] ],
); );
$items .= $this->renderFunctionItems( $items .= $this->renderFunctionItems(
$node->functions(), $node->functions(),
$methodItemTemplate $methodItemTemplate,
); );
$items .= $this->renderTraitOrClassItems( $items .= $this->renderTraitOrClassItems(
$node->traits(), $node->traits(),
$template, $template,
$methodItemTemplate $methodItemTemplate,
); );
$items .= $this->renderTraitOrClassItems( $items .= $this->renderTraitOrClassItems(
$node->classes(), $node->classes(),
$template, $template,
$methodItemTemplate $methodItemTemplate,
); );
return $items; return $items;
@ -337,15 +337,15 @@ final class File extends Renderer
$numTestedClasses = $numTestedMethods === $numMethods ? 1 : 0; $numTestedClasses = $numTestedMethods === $numMethods ? 1 : 0;
$linesExecutedPercentAsString = Percentage::fromFractionAndTotal( $linesExecutedPercentAsString = Percentage::fromFractionAndTotal(
$item['executedLines'], $item['executedLines'],
$item['executableLines'] $item['executableLines'],
)->asString(); )->asString();
$branchesExecutedPercentAsString = Percentage::fromFractionAndTotal( $branchesExecutedPercentAsString = Percentage::fromFractionAndTotal(
$item['executedBranches'], $item['executedBranches'],
$item['executableBranches'] $item['executableBranches'],
)->asString(); )->asString();
$pathsExecutedPercentAsString = Percentage::fromFractionAndTotal( $pathsExecutedPercentAsString = Percentage::fromFractionAndTotal(
$item['executedPaths'], $item['executedPaths'],
$item['executablePaths'] $item['executablePaths'],
)->asString(); )->asString();
} else { } else {
$numClasses = 0; $numClasses = 0;
@ -357,12 +357,12 @@ final class File extends Renderer
$testedMethodsPercentage = Percentage::fromFractionAndTotal( $testedMethodsPercentage = Percentage::fromFractionAndTotal(
$numTestedMethods, $numTestedMethods,
$numMethods $numMethods,
); );
$testedClassesPercentage = Percentage::fromFractionAndTotal( $testedClassesPercentage = Percentage::fromFractionAndTotal(
$numTestedMethods === $numMethods ? 1 : 0, $numTestedMethods === $numMethods ? 1 : 0,
1 1,
); );
$buffer .= $this->renderItemTemplate( $buffer .= $this->renderItemTemplate(
@ -389,7 +389,7 @@ final class File extends Renderer
'numExecutableBranches' => $item['executableBranches'], 'numExecutableBranches' => $item['executableBranches'],
'pathsExecutedPercent' => Percentage::fromFractionAndTotal( 'pathsExecutedPercent' => Percentage::fromFractionAndTotal(
$item['executedPaths'], $item['executedPaths'],
$item['executablePaths'] $item['executablePaths'],
)->asFloat(), )->asFloat(),
'pathsExecutedPercentAsString' => $pathsExecutedPercentAsString, 'pathsExecutedPercentAsString' => $pathsExecutedPercentAsString,
'numExecutedPaths' => $item['executedPaths'], 'numExecutedPaths' => $item['executedPaths'],
@ -399,14 +399,14 @@ final class File extends Renderer
'testedClassesPercent' => $testedClassesPercentage->asFloat(), 'testedClassesPercent' => $testedClassesPercentage->asFloat(),
'testedClassesPercentAsString' => $testedClassesPercentage->asString(), 'testedClassesPercentAsString' => $testedClassesPercentage->asString(),
'crap' => $item['crap'], 'crap' => $item['crap'],
] ],
); );
foreach ($item['methods'] as $method) { foreach ($item['methods'] as $method) {
$buffer .= $this->renderFunctionOrMethodItem( $buffer .= $this->renderFunctionOrMethodItem(
$methodItemTemplate, $methodItemTemplate,
$method, $method,
'&nbsp;' '&nbsp;',
); );
} }
} }
@ -425,7 +425,7 @@ final class File extends Renderer
foreach ($functions as $function) { foreach ($functions as $function) {
$buffer .= $this->renderFunctionOrMethodItem( $buffer .= $this->renderFunctionOrMethodItem(
$template, $template,
$function $function,
); );
} }
@ -447,22 +447,22 @@ final class File extends Renderer
$executedLinesPercentage = Percentage::fromFractionAndTotal( $executedLinesPercentage = Percentage::fromFractionAndTotal(
$item['executedLines'], $item['executedLines'],
$item['executableLines'] $item['executableLines'],
); );
$executedBranchesPercentage = Percentage::fromFractionAndTotal( $executedBranchesPercentage = Percentage::fromFractionAndTotal(
$item['executedBranches'], $item['executedBranches'],
$item['executableBranches'] $item['executableBranches'],
); );
$executedPathsPercentage = Percentage::fromFractionAndTotal( $executedPathsPercentage = Percentage::fromFractionAndTotal(
$item['executedPaths'], $item['executedPaths'],
$item['executablePaths'] $item['executablePaths'],
); );
$testedMethodsPercentage = Percentage::fromFractionAndTotal( $testedMethodsPercentage = Percentage::fromFractionAndTotal(
$numTestedMethods, $numTestedMethods,
1 1,
); );
return $this->renderItemTemplate( return $this->renderItemTemplate(
@ -473,7 +473,7 @@ final class File extends Renderer
$indent, $indent,
$item['startLine'], $item['startLine'],
htmlspecialchars($item['signature'], $this->htmlSpecialCharsFlags), htmlspecialchars($item['signature'], $this->htmlSpecialCharsFlags),
$item['functionName'] ?? $item['methodName'] $item['functionName'] ?? $item['methodName'],
), ),
'numMethods' => $numMethods, 'numMethods' => $numMethods,
'numTestedMethods' => $numTestedMethods, 'numTestedMethods' => $numTestedMethods,
@ -492,7 +492,7 @@ final class File extends Renderer
'testedMethodsPercent' => $testedMethodsPercentage->asFloat(), 'testedMethodsPercent' => $testedMethodsPercentage->asFloat(),
'testedMethodsPercentAsString' => $testedMethodsPercentage->asString(), 'testedMethodsPercentAsString' => $testedMethodsPercentage->asString(),
'crap' => $item['crap'], 'crap' => $item['crap'],
] ],
); );
} }
@ -550,7 +550,7 @@ final class File extends Renderer
$popover = sprintf( $popover = sprintf(
' data-title="%s" data-content="%s" data-placement="top" data-html="true"', ' data-title="%s" data-content="%s" data-placement="top" data-html="true"',
$popoverTitle, $popoverTitle,
htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags) htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags),
); );
} }
@ -637,7 +637,7 @@ final class File extends Renderer
$popover = sprintf( $popover = sprintf(
' data-title="%s" data-content="%s" data-placement="top" data-html="true"', ' data-title="%s" data-content="%s" data-placement="top" data-html="true"',
$popoverTitle, $popoverTitle,
htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags) htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags),
); );
} }
@ -727,7 +727,7 @@ final class File extends Renderer
$popover = sprintf( $popover = sprintf(
' data-title="%s" data-content="%s" data-placement="top" data-html="true"', ' data-title="%s" data-content="%s" data-placement="top" data-html="true"',
$popoverTitle, $popoverTitle,
htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags) htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags),
); );
} }
@ -825,7 +825,7 @@ final class File extends Renderer
$popover = sprintf( $popover = sprintf(
' data-title="%s" data-content="%s" data-placement="top" data-html="true"', ' data-title="%s" data-content="%s" data-placement="top" data-html="true"',
$popoverTitle, $popoverTitle,
htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags) htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags),
); );
} }
@ -940,7 +940,7 @@ final class File extends Renderer
$popover = sprintf( $popover = sprintf(
' data-title="%s" data-content="%s" data-placement="top" data-html="true"', ' data-title="%s" data-content="%s" data-placement="top" data-html="true"',
$popoverTitle, $popoverTitle,
htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags) htmlspecialchars($popoverContent, $this->htmlSpecialCharsFlags),
); );
} }
@ -965,7 +965,7 @@ final class File extends Renderer
'lineContent' => $lineContent, 'lineContent' => $lineContent,
'class' => $class, 'class' => $class,
'popover' => $popover, 'popover' => $popover,
] ],
); );
return $template->render(); return $template->render();
@ -991,14 +991,14 @@ final class File extends Renderer
if ($token === '"' && $tokens[$j - 1] !== '\\') { if ($token === '"' && $tokens[$j - 1] !== '\\') {
$result[$i] .= sprintf( $result[$i] .= sprintf(
'<span class="string">%s</span>', '<span class="string">%s</span>',
htmlspecialchars($token, $this->htmlSpecialCharsFlags) htmlspecialchars($token, $this->htmlSpecialCharsFlags),
); );
$stringFlag = !$stringFlag; $stringFlag = !$stringFlag;
} else { } else {
$result[$i] .= sprintf( $result[$i] .= sprintf(
'<span class="keyword">%s</span>', '<span class="keyword">%s</span>',
htmlspecialchars($token, $this->htmlSpecialCharsFlags) htmlspecialchars($token, $this->htmlSpecialCharsFlags),
); );
} }
@ -1010,7 +1010,7 @@ final class File extends Renderer
$value = str_replace( $value = str_replace(
["\t", ' '], ["\t", ' '],
['&nbsp;&nbsp;&nbsp;&nbsp;', '&nbsp;'], ['&nbsp;&nbsp;&nbsp;&nbsp;', '&nbsp;'],
htmlspecialchars($value, $this->htmlSpecialCharsFlags) htmlspecialchars($value, $this->htmlSpecialCharsFlags),
); );
if ($value === "\n") { if ($value === "\n") {
@ -1039,7 +1039,7 @@ final class File extends Renderer
$result[$i] .= sprintf( $result[$i] .= sprintf(
'<span class="%s">%s</span>', '<span class="%s">%s</span>',
$colour, $colour,
$line $line,
); );
} }
@ -1067,7 +1067,7 @@ final class File extends Renderer
$className = sprintf( $className = sprintf(
'<abbr title="%s">%s</abbr>', '<abbr title="%s">%s</abbr>',
$className, $className,
array_pop($tmp) array_pop($tmp),
); );
} }
@ -1109,7 +1109,7 @@ final class File extends Renderer
return sprintf( return sprintf(
'<li%s>%s</li>', '<li%s>%s</li>',
$testCSS, $testCSS,
htmlspecialchars($test, $this->htmlSpecialCharsFlags) htmlspecialchars($test, $this->htmlSpecialCharsFlags),
); );
} }

@ -12,7 +12,7 @@ namespace SebastianBergmann\CodeCoverage\Report;
use function dirname; use function dirname;
use function file_put_contents; use function file_put_contents;
use function serialize; use function serialize;
use function strpos; use function str_contains;
use SebastianBergmann\CodeCoverage\CodeCoverage; use SebastianBergmann\CodeCoverage\CodeCoverage;
use SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException; use SebastianBergmann\CodeCoverage\Driver\WriteOperationFailedException;
use SebastianBergmann\CodeCoverage\Util\Filesystem; use SebastianBergmann\CodeCoverage\Util\Filesystem;
@ -27,7 +27,7 @@ final class PHP
return \unserialize(<<<'END_OF_COVERAGE_SERIALIZATION'" . PHP_EOL . serialize($coverage) . PHP_EOL . 'END_OF_COVERAGE_SERIALIZATION' . PHP_EOL . ');'; return \unserialize(<<<'END_OF_COVERAGE_SERIALIZATION'" . PHP_EOL . serialize($coverage) . PHP_EOL . 'END_OF_COVERAGE_SERIALIZATION' . PHP_EOL . ');';
if ($target !== null) { if ($target !== null) {
if (!strpos($target, '://') !== false) { if (!str_contains($target, '://')) {
Filesystem::createDirectory(dirname($target)); Filesystem::createDirectory(dirname($target));
} }

@ -78,27 +78,27 @@ final class Text
if ($showColors) { if ($showColors) {
$colors['classes'] = $this->coverageColor( $colors['classes'] = $this->coverageColor(
$report->numberOfTestedClassesAndTraits(), $report->numberOfTestedClassesAndTraits(),
$report->numberOfClassesAndTraits() $report->numberOfClassesAndTraits(),
); );
$colors['methods'] = $this->coverageColor( $colors['methods'] = $this->coverageColor(
$report->numberOfTestedMethods(), $report->numberOfTestedMethods(),
$report->numberOfMethods() $report->numberOfMethods(),
); );
$colors['lines'] = $this->coverageColor( $colors['lines'] = $this->coverageColor(
$report->numberOfExecutedLines(), $report->numberOfExecutedLines(),
$report->numberOfExecutableLines() $report->numberOfExecutableLines(),
); );
$colors['branches'] = $this->coverageColor( $colors['branches'] = $this->coverageColor(
$report->numberOfExecutedBranches(), $report->numberOfExecutedBranches(),
$report->numberOfExecutableBranches() $report->numberOfExecutableBranches(),
); );
$colors['paths'] = $this->coverageColor( $colors['paths'] = $this->coverageColor(
$report->numberOfExecutedPaths(), $report->numberOfExecutedPaths(),
$report->numberOfExecutablePaths() $report->numberOfExecutablePaths(),
); );
$colors['reset'] = self::COLOR_RESET; $colors['reset'] = self::COLOR_RESET;
@ -109,10 +109,10 @@ final class Text
' Classes: %6s (%d/%d)', ' Classes: %6s (%d/%d)',
Percentage::fromFractionAndTotal( Percentage::fromFractionAndTotal(
$report->numberOfTestedClassesAndTraits(), $report->numberOfTestedClassesAndTraits(),
$report->numberOfClassesAndTraits() $report->numberOfClassesAndTraits(),
)->asString(), )->asString(),
$report->numberOfTestedClassesAndTraits(), $report->numberOfTestedClassesAndTraits(),
$report->numberOfClassesAndTraits() $report->numberOfClassesAndTraits(),
); );
$methods = sprintf( $methods = sprintf(
@ -122,7 +122,7 @@ final class Text
$report->numberOfMethods(), $report->numberOfMethods(),
)->asString(), )->asString(),
$report->numberOfTestedMethods(), $report->numberOfTestedMethods(),
$report->numberOfMethods() $report->numberOfMethods(),
); );
$paths = ''; $paths = '';
@ -136,7 +136,7 @@ final class Text
$report->numberOfExecutablePaths(), $report->numberOfExecutablePaths(),
)->asString(), )->asString(),
$report->numberOfExecutedPaths(), $report->numberOfExecutedPaths(),
$report->numberOfExecutablePaths() $report->numberOfExecutablePaths(),
); );
$branches = sprintf( $branches = sprintf(
@ -146,7 +146,7 @@ final class Text
$report->numberOfExecutableBranches(), $report->numberOfExecutableBranches(),
)->asString(), )->asString(),
$report->numberOfExecutedBranches(), $report->numberOfExecutedBranches(),
$report->numberOfExecutableBranches() $report->numberOfExecutableBranches(),
); );
} }
@ -157,7 +157,7 @@ final class Text
$report->numberOfExecutableLines(), $report->numberOfExecutableLines(),
)->asString(), )->asString(),
$report->numberOfExecutedLines(), $report->numberOfExecutedLines(),
$report->numberOfExecutableLines() $report->numberOfExecutableLines(),
); );
$padding = max(array_map('strlen', [$classes, $methods, $lines])); $padding = max(array_map('strlen', [$classes, $methods, $lines]));
@ -215,12 +215,12 @@ final class Text
} }
$classMethods++; $classMethods++;
$classExecutableLines += $method['executableLines']; $classExecutableLines += $method['executableLines'];
$classExecutedLines += $method['executedLines']; $classExecutedLines += $method['executedLines'];
$classExecutableBranches += $method['executableBranches']; $classExecutableBranches += $method['executableBranches'];
$classExecutedBranches += $method['executedBranches']; $classExecutedBranches += $method['executedBranches'];
$classExecutablePaths += $method['executablePaths']; $classExecutablePaths += $method['executablePaths'];
$classExecutedPaths += $method['executedPaths']; $classExecutedPaths += $method['executedPaths'];
if ($method['coverage'] == 100) { if ($method['coverage'] == 100) {
$coveredMethods++; $coveredMethods++;
@ -278,7 +278,7 @@ final class Text
{ {
$coverage = Percentage::fromFractionAndTotal( $coverage = Percentage::fromFractionAndTotal(
$numberOfCoveredElements, $numberOfCoveredElements,
$totalNumberOfElements $totalNumberOfElements,
); );
if ($coverage->asFloat() >= $this->thresholds->highLowerBound()) { if ($coverage->asFloat() >= $this->thresholds->highLowerBound()) {
@ -298,16 +298,18 @@ final class Text
return Percentage::fromFractionAndTotal( return Percentage::fromFractionAndTotal(
$numberOfCoveredElements, $numberOfCoveredElements,
$totalNumberOfElements $totalNumberOfElements,
)->asFixedWidthString() . )->asFixedWidthString() .
' (' . sprintf($format, $numberOfCoveredElements) . '/' . ' (' . sprintf($format, $numberOfCoveredElements) . '/' .
sprintf($format, $totalNumberOfElements) . ')'; sprintf($format, $totalNumberOfElements) . ')';
} }
private function format(string $color, int $padding, string|false $string): string private function format(string $color, int $padding, false|string $string): string
{ {
$reset = $color ? self::COLOR_RESET : ''; if ($color === '') {
return (string) $string . PHP_EOL;
}
return $color . str_pad((string) $string, $padding) . $reset . PHP_EOL; return $color . str_pad((string) $string, $padding) . self::COLOR_RESET . PHP_EOL;
} }
} }

@ -31,7 +31,7 @@ final class Thresholds
{ {
if ($lowUpperBound > $highLowerBound) { if ($lowUpperBound > $highLowerBound) {
throw new InvalidArgumentException( throw new InvalidArgumentException(
'$lowUpperBound must not be larger than $highLowerBound' '$lowUpperBound must not be larger than $highLowerBound',
); );
} }

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save