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

miaoxing / plugin / 9719022737

27 Jun 2024 12:34PM UTC coverage: 43.355%. Remained the same
9719022737

push

github

twinh
style: php-cs-fixer string_implicit_backslashes

0 of 5 new or added lines in 5 files covered. (0.0%)

1256 of 2897 relevant lines covered (43.36%)

7.68 hits per line

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

0.0
/src/Command/GSeeder.php
1
<?php
2

3
namespace Miaoxing\Plugin\Command;
4

5
use Miaoxing\Plugin\Service\Seeder;
6
use Symfony\Component\Console\Input\InputArgument;
7

8
/**
9
 * @mixin \PluginMixin
10
 */
11
class GSeeder extends BaseCommand
12
{
13
    protected function configure()
14
    {
15
        $this->setDescription('Generate a plugin seeder class')
×
16
            ->addArgument('name', InputArgument::REQUIRED, 'The name of the seeder')
×
17
            ->addArgument('plugin', InputArgument::OPTIONAL, 'The name of the plugin');
×
18
    }
19

20
    /**
21
     * @return int|void
22
     * @throws \ReflectionException
23
     * @throws \Exception
24
     */
25
    protected function handle()
26
    {
27
        $plugin = $this->plugin->getOneById($this->getArgument('plugin'));
×
28
        $path = $plugin->getBasePath() . '/src/Seeder';
×
29
        $reflection = new \ReflectionClass($plugin);
×
NEW
30
        $namespace = $reflection->getNamespaceName() . '\Seeder';
×
31

32
        Seeder::setOutput($this->output)->create([
×
33
            'name' => $this->getArgument('name'),
×
34
            'path' => $path,
×
35
            'namespace' => $namespace,
×
36
        ]);
×
37
    }
38
}
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

© 2025 Coveralls, Inc