villfa
Repos
34
Followers
22
Following
22

Composer plugin replacing placeholders in the scripts section by dynamic values

49
2

Invert a given color.

13
4

Extra constraints for PHPUnit

0
0

Discover files in need of refactoring.

1265
52

Events

delete branch
villfa delete branch patch-1
Created at 1 day ago
pull request opened
Fix project name in CHANGELOG
Created at 1 day ago

Fix project name in CHANGELOG

Created at 1 day ago
Created at 1 day ago
Created at 2 days ago
issue comment
Negative Scores?

It sounds more simple indeed 😅

Created at 5 days ago
issue comment
Negative Scores?

Interesting.

The reason we have negative scores come from this line.

For instance, by changing the code like below we won't have negative values anymore, but the maximum score will be 1.414 (square root of 2) instead of 1.

- return \round(1 - $distanceFromTopRightCorner, 3);
+ return \round(\sqrt(2) - $distanceFromTopRightCorner, 3);

If we want to have a score between 0 and 1, a better solution would probably be to apply this formula.

Created at 5 days ago
delete branch
villfa delete branch fix/364
Created at 1 week ago

Check for PSR-4 violations in CI

Created at 1 week ago
closed issue
Fix PSR violations

Since Composer 2.4.0, a new --strict-psr flag has been added to dump-autoload to check for PSR violations.

Here the result for churn-php:

# composer dump-autoload --optimize --strict-psr

Generating optimized autoload files
Class Churn\Tests\Integration\Command\Assets\TestAfterAnalysisHook located in ./tests/Integration/Command/Assets/hooks.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Integration\Command\Assets\TestAfterFileAnalysisHook located in ./tests/Integration/Command/Assets/hooks.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Integration\Command\Assets\TestBeforeAnalysisHook located in ./tests/Integration/Command/Assets/hooks.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Unit\Assessors\CyclomaticComplexity\CyclomaticComplexityAssessorTest located in ./tests/Unit/Assessor/CyclomaticComplexityAssessorTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Event\Event\AfterAnalysisEventTest located in ./tests/Unit/Event/Event/AfterAnalysisEventTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Event\Event\AfterFileAnalysisEventTest located in ./tests/Unit/Event/Event/AfterFileAnalysisEventTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Result\HighestScoresTest located in ./tests/Unit/Result/HighestScoresTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Result\ResultAccumulatorTest located in ./tests/Unit/Result/ResultAccumulatorTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Result\ResultTest located in ./tests/Unit/Result/ResultTest.php does not comply with psr-4 autoloading standard. Skipping.

Once these violations will be fixed, it'd be great to run this command in the CI to prevent new violations to appear.

Created at 1 week ago
pull request closed
Check for PSR-4 violations in CI

Fixes #364

Created at 1 week ago
pull request opened
Check for PSR-4 violations in CI

Fixes #364

Created at 1 week ago
delete branch
villfa delete branch dev/364
Created at 1 week ago

Check for PSR-4 violations in CI

Created at 1 week ago
pull request closed
Check for PSR-4 violations in CI
Created at 1 week ago

Remove shebang

Created at 1 week ago

Fix

Created at 1 week ago

Fix remaining PSR-4 violations

Created at 1 week ago

Fix PSR-4 violations

Created at 1 week ago
pull request opened
Check for PSR-4 violations in CI
Created at 1 week ago

Check for PSR-4 violations in CI

Created at 1 week ago
create branch
villfa create branch dev/364
Created at 1 week ago
create branch
villfa create branch fix/364
Created at 1 week ago

Add "static analysis" Composer keyword

Created at 1 week ago
opened issue
Fix PSR violations

Since Composer 2.4.0, a new --strict-psr flag has been added to dump-autoload to check for PSR violations.

Here the result for churn-php:

# composer dump-autoload --optimize --strict-psr

Generating optimized autoload files
Class Churn\Tests\Integration\Command\Assets\TestAfterAnalysisHook located in ./tests/Integration/Command/Assets/hooks.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Integration\Command\Assets\TestAfterFileAnalysisHook located in ./tests/Integration/Command/Assets/hooks.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Integration\Command\Assets\TestBeforeAnalysisHook located in ./tests/Integration/Command/Assets/hooks.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Unit\Assessors\CyclomaticComplexity\CyclomaticComplexityAssessorTest located in ./tests/Unit/Assessor/CyclomaticComplexityAssessorTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Event\Event\AfterAnalysisEventTest located in ./tests/Unit/Event/Event/AfterAnalysisEventTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Event\Event\AfterFileAnalysisEventTest located in ./tests/Unit/Event/Event/AfterFileAnalysisEventTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Result\HighestScoresTest located in ./tests/Unit/Result/HighestScoresTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Result\ResultAccumulatorTest located in ./tests/Unit/Result/ResultAccumulatorTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Churn\Tests\Result\ResultTest located in ./tests/Unit/Result/ResultTest.php does not comply with psr-4 autoloading standard. Skipping.

Once these violations will be fixed, I'd be great to run this command in the CI to prevent new violations to appear.

Created at 1 week ago
delete branch
villfa delete branch feat/static-analysis-keyword
Created at 1 week ago

Add "static analysis" Composer keyword

Created at 1 week ago
pull request closed
Add "static analysis" Composer keyword

As per https://getcomposer.org/doc/04-schema.md#keywords by including "static analysis" as a keyword in the composer.json file, Composer 2.4.0-RC1 and later will prompt users if the package is installed with composer require instead of composer require --dev. See https://github.com/composer/composer/pull/10960 for more info.

Created at 1 week ago
pull request opened
Add "static analysis" Composer keyword

As per https://getcomposer.org/doc/04-schema.md#keywords by including "static analysis" as a keyword in the composer.json file, Composer 2.4.0-RC1 and later will prompt users if the package is installed with composer require instead of composer require --dev. See https://github.com/composer/composer/pull/10960 for more info.

Created at 1 week ago

Add "static analysis" Composer keyword

Created at 1 week ago