• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tempestphp / tempest-framework / 14377498343

10 Apr 2025 09:50AM UTC coverage: 81.204%. First build
14377498343

Pull #1138

github

web-flow
Merge 77bf64596 into 5a05f6db6
Pull Request #1138: fix(console): do not discover stub files

16 of 19 new or added lines in 7 files covered. (84.21%)

11531 of 14200 relevant lines covered (81.2%)

106.49 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Tempest/Console/src/Stubs/GeneratorCommandStub.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Tempest\Console\Stubs;
6

7
use Tempest\Console\ConsoleArgument;
8
use Tempest\Console\ConsoleCommand;
9
use Tempest\Core\PublishesFiles;
10
use Tempest\Discovery\DoNotDiscover;
11
use Tempest\Generation\ClassManipulator;
12
use Tempest\Generation\DataObjects\StubFile;
13

14
#[DoNotDiscover]
15
final class GeneratorCommandStub
16
{
17
    use PublishesFiles;
18

19
    #[ConsoleCommand(name: 'dummy-command-slug')]
×
20
    public function __invoke(
21
        #[ConsoleArgument(description: 'The name of the class to create')]
22
        string $className,
23
    ): void {
24
        $suggestedPath = $this->getSuggestedPath($className);
×
25
        $targetPath = $this->promptTargetPath($suggestedPath);
×
26
        $shouldOverride = $this->askForOverride($targetPath);
×
27

28
        $this->stubFileGenerator->generateClassFile(
×
29
            stubFile: StubFile::from('MyStubClass::class'),
×
30
            targetPath: $targetPath,
×
31
            shouldOverride: $shouldOverride,
×
NEW
32
            manipulations: [
×
NEW
33
                fn (ClassManipulator $class) => $class->removeClassAttribute(DoNotDiscover::class),
×
NEW
34
            ],
×
35
        );
×
36

37
        $this->console->writeln();
×
38
        $this->console->success(sprintf('File successfully created at <file="%s"/>.', $targetPath));
×
39
    }
40
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc