2727use Symfony \Component \Console \Command \Command ;
2828use Symfony \Component \Console \Input \InputInterface ;
2929use Symfony \Component \Console \Output \OutputInterface ;
30- use Symfony \Component \Process \Process ;
3130
3231/**
3332 * @internal
@@ -60,52 +59,37 @@ private static function badges(): string
6059 {
6160 return \implode ("\n" , [
6261 self ::badge (
63- 'Latest stable version ' ,
64- \sprintf ('%s/packagist/v/%s.svg?label=current%%20version ' , self ::SHIELDS_HOST , self ::composer ()->name ),
65- \sprintf ('https://packagist.org/packages/%s ' , self ::composer ()->name ),
66- ),
67- self ::badge (
68- 'PHP version ' ,
69- \sprintf ('%s/packagist/php-v/%s.svg ' , self ::SHIELDS_HOST , self ::composer ()->name ),
70- 'https://php.net ' ,
71- ),
72- self ::badge (
73- 'License ' ,
74- \sprintf ('%s/github/license/%s.svg ' , self ::SHIELDS_HOST , self ::composer ()->name ),
75- 'LICENSE ' ,
76- ),
77- self ::badge (
78- 'Tests ' ,
79- \sprintf ('%s/badge/tests-%d-brightgreen.svg ' , self ::SHIELDS_HOST , self ::numberOfTests ()),
80- ),
81- self ::badge (
82- 'Downloads ' ,
83- \sprintf ('%s/packagist/dt/%s.svg ' , self ::SHIELDS_HOST , self ::composer ()->name ),
84- \sprintf ('https://packagist.org/packages/%s ' , self ::composer ()->name ),
85- ),
86- '' ,
87- self ::badge (
88- 'CI status ' ,
89- \sprintf ('https://github.com/%s/actions/workflows/ci.yaml/badge.svg ' , self ::composer ()->name ),
62+ 'CI ' ,
63+ \sprintf ('%s/github/actions/workflow/status/%s/ci.yaml?label=CI ' , self ::SHIELDS_HOST , self ::composer ()->name ),
9064 \sprintf ('https://github.com/%s/actions/workflows/ci.yaml ' , self ::composer ()->name ),
9165 ),
9266 self ::badge (
93- 'Code coverage ' ,
94- \sprintf ('%s/coveralls /github/%s/main .svg ' , self ::SHIELDS_HOST , self ::composer ()->name ),
67+ 'Test coverage ' ,
68+ \sprintf ('%s/coverallsCoverage /github/%s.svg?branch=main&label=Test%%20coverage ' , self ::SHIELDS_HOST , self ::composer ()->name ),
9569 \sprintf ('https://coveralls.io/github/%s?branch=main ' , self ::composer ()->name ),
9670 ),
9771 self ::badge (
98- 'Mutation testing badge ' ,
72+ 'Type coverage ' ,
9973 \sprintf (
100- 'https://img.shields.io/endpoint?style=flat&url=%s ' ,
74+ '%s/endpoint?label=Type%%20coverage&url=%s ' ,
75+ self ::SHIELDS_HOST ,
76+ \rawurlencode ('https://shepherd.dev/views/coverage_data.php? ' . self ::composer ()->name ),
77+ ),
78+ \sprintf ('https://shepherd.dev/github/%s ' , self ::composer ()->name ),
79+ ),
80+ self ::badge (
81+ 'Mutation Score Indicator ' ,
82+ \sprintf (
83+ '%s/endpoint?label=Mutation%%20Score%%20Indicator&logo=none&url=%s ' ,
84+ self ::SHIELDS_HOST ,
10185 \rawurlencode (\sprintf ('https://badge-api.stryker-mutator.io/github.com/%s/main ' , self ::composer ()->name )),
10286 ),
10387 \sprintf ('https://dashboard.stryker-mutator.io/reports/github.com/%s/main ' , self ::composer ()->name ),
10488 ),
10589 self ::badge (
106- 'Psalm type coverage ' ,
107- \sprintf ('https://shepherd.dev/github/%s/coverage .svg' , self ::composer ()->name ),
108- \sprintf ('https://shepherd.dev/github /%s ' , self ::composer ()->name ),
90+ 'Downloads ' ,
91+ \sprintf ('%s/packagist/dt/%s .svg?label=Downloads ' , self :: SHIELDS_HOST , self ::composer ()->name ),
92+ \sprintf ('https://packagist.org/packages /%s/stats ' , self ::composer ()->name ),
10993 ),
11094 ]);
11195 }
@@ -121,14 +105,6 @@ private static function badge(string $description, string $imageUrl, ?string $ta
121105 return $ badge ;
122106 }
123107
124- private static function numberOfTests (): int
125- {
126- $ process = new Process ([__DIR__ . '/../../../vendor/bin/phpunit ' , '--list-tests ' ], __DIR__ . '/../../.. ' );
127- $ process ->run ();
128-
129- return \substr_count ($ process ->getOutput (), \PHP_EOL ) - 3 ; // 3 is for header
130- }
131-
132108 private static function description (): string
133109 {
134110 return \str_replace (
0 commit comments