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

miaoxing / services / 5657141664

pending completion
5657141664

push

github

twinh
feat(services): 运行计划任务前,加载全局配置

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

1 existing line in 1 file now uncovered.

64 of 628 relevant lines covered (10.19%)

6.08 hits per line

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

0.0
/src/Laravel/ConsoleKernel.php
1
<?php
2

3
namespace Miaoxing\Services\Laravel;
4

5
use Illuminate\Console\Application as Artisan;
6
use Illuminate\Console\Scheduling\Schedule;
7
use Illuminate\Foundation\Console\Kernel;
8
use Miaoxing\Plugin\Service\Config;
9
use ReflectionClass;
10
use Symfony\Component\Console\Command\Command;
11

12
class ConsoleKernel extends Kernel
13
{
14
    /**
15
     * The Artisan commands provided by your application.
16
     *
17
     * @var array
18
     */
19
    protected $commands = [
20
    ];
21

22
    /**
23
     * Define the application's command schedule.
24
     *
25
     * @param \Illuminate\Console\Scheduling\Schedule $schedule
26
     * @return void
27
     */
28
    protected function schedule(Schedule $schedule)
29
    {
NEW
30
        Config::preloadGlobal();
×
UNCOV
31
        wei()->event->trigger('schedule', [$schedule]);
×
32
    }
33

34
    /**
35
     * Register the commands for the application.
36
     *
37
     * @return void
38
     * @throws \ReflectionException
39
     * @throws \Exception
40
     */
41
    protected function commands()
42
    {
43
        $paths = [
×
44
            'plugins/*/src',
×
45
        ];
×
46

47
        $classes = wei()->classMap->generate($paths, '/Command/*.php', 'Command');
×
48

49
        foreach ($classes as $name => $command) {
×
50
            if (
51
                is_subclass_of($command, Command::class)
×
52
                && !(new ReflectionClass($command))->isAbstract()
×
53
            ) {
54
                Artisan::starting(function (Artisan $artisan) use ($command) {
55
                    $artisan->resolve($command);
×
56
                });
×
57
            }
58
        }
59
    }
60
}
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