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

api-platform / core / 20847864477

09 Jan 2026 09:47AM UTC coverage: 29.1% (+0.005%) from 29.095%
20847864477

Pull #7649

github

web-flow
Merge b342dd5db into d640d106b
Pull Request #7649: feat(validator): uuid/ulid parameter validation

0 of 4 new or added lines in 1 file covered. (0.0%)

15050 existing lines in 491 files now uncovered.

16996 of 58406 relevant lines covered (29.1%)

81.8 hits per line

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

100.0
/src/Symfony/Maker/MakeStateProcessor.php
1
<?php
2

3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <dunglas@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
declare(strict_types=1);
13

14
namespace ApiPlatform\Symfony\Maker;
15

16
use Symfony\Bundle\MakerBundle\ConsoleStyle;
17
use Symfony\Bundle\MakerBundle\DependencyBuilder;
18
use Symfony\Bundle\MakerBundle\Generator;
19
use Symfony\Bundle\MakerBundle\InputConfiguration;
20
use Symfony\Bundle\MakerBundle\Maker\AbstractMaker;
21
use Symfony\Component\Console\Command\Command;
22
use Symfony\Component\Console\Input\InputArgument;
23
use Symfony\Component\Console\Input\InputInterface;
24
use Symfony\Component\Console\Input\InputOption;
25

26
final class MakeStateProcessor extends AbstractMaker
27
{
28
    public function __construct(private readonly string $namespacePrefix = '')
29
    {
UNCOV
30
    }
6✔
31

32
    /**
33
     * {@inheritdoc}
34
     */
35
    public static function getCommandName(): string
36
    {
UNCOV
37
        return 'make:state-processor';
12✔
38
    }
39

40
    /**
41
     * {@inheritdoc}
42
     */
43
    public static function getCommandDescription(): string
44
    {
UNCOV
45
        return 'Creates an API Platform state processor';
12✔
46
    }
47

48
    /**
49
     * {@inheritdoc}
50
     */
51
    public function configureCommand(Command $command, InputConfiguration $inputConfig): void
52
    {
UNCOV
53
        $command
6✔
UNCOV
54
            ->addArgument('name', InputArgument::REQUIRED, 'Choose a class name for your state processor (e.g. <fg=yellow>AwesomeStateProcessor</>)')
6✔
UNCOV
55
            ->addOption('namespace-prefix', 'p', InputOption::VALUE_REQUIRED, 'Specify the namespace prefix to use for the state processor class', $this->namespacePrefix.'State')
6✔
UNCOV
56
            ->setHelp(file_get_contents(__DIR__.'/Resources/help/MakeStateProcessor.txt'));
6✔
57
    }
58

59
    /**
60
     * {@inheritdoc}
61
     */
62
    public function configureDependencies(DependencyBuilder $dependencies): void
63
    {
UNCOV
64
    }
6✔
65

66
    /**
67
     * {@inheritdoc}
68
     */
69
    public function generate(InputInterface $input, ConsoleStyle $io, Generator $generator): void
70
    {
UNCOV
71
        $stateProcessorClassNameDetails = $generator->createClassNameDetails(
6✔
UNCOV
72
            $input->getArgument('name'),
6✔
UNCOV
73
            trim($input->getOption('namespace-prefix'), '\\').'\\'
6✔
UNCOV
74
        );
6✔
75

UNCOV
76
        $generator->generateClass(
6✔
UNCOV
77
            $stateProcessorClassNameDetails->getFullName(),
6✔
UNCOV
78
            __DIR__.'/Resources/skeleton/StateProcessor.php.tpl'
6✔
UNCOV
79
        );
6✔
UNCOV
80
        $generator->writeChanges();
6✔
81

UNCOV
82
        $this->writeSuccessMessage($io);
6✔
UNCOV
83
        $io->text([
6✔
UNCOV
84
            'Next: Open your new state processor class and start customizing it.',
6✔
UNCOV
85
        ]);
6✔
86
    }
87
}
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