• 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/GMigration.php
1
<?php
2

3
namespace Miaoxing\Plugin\Command;
4

5
use Symfony\Component\Console\Input\InputArgument;
6
use Wei\Migration;
7

8
/**
9
 * @mixin \PluginMixin
10
 */
11
class GMigration extends BaseCommand
12
{
13
    use PluginIdTrait;
14

15
    protected function configure()
16
    {
17
        $this->setAliases(['migration:g'])
×
18
            ->setDescription('Generate a plugin migration class')
×
19
            ->addArgument('name', InputArgument::REQUIRED, 'The name of the migration')
×
20
            ->addArgument('plugin-id', InputArgument::OPTIONAL, 'The id of plugin');
×
21
    }
22

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

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