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

orchestral / canvas / 30921614659

04 Aug 2026 02:57PM UTC coverage: 91.944% (-2.5%) from 94.459%
30921614659

Pull #53

github

crynobone
wip

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
Pull Request #53: Supports `laravel/doctor`

2 of 17 new or added lines in 2 files covered. (11.76%)

31 existing lines in 11 files now uncovered.

662 of 720 relevant lines covered (91.94%)

35.57 hits per line

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

83.33
/src/Console/ScopeMakeCommand.php
1
<?php
2

3
namespace Orchestra\Canvas\Console;
4

5
use Orchestra\Canvas\Core\Concerns\CodeGenerator;
6
use Orchestra\Canvas\Core\Concerns\UsesGeneratorOverrides;
7
use Symfony\Component\Console\Attribute\AsCommand;
8

9
/**
10
 * @see https://github.com/laravel/framework/blob/11.x/src/Illuminate/Foundation/Console/ScopeMakeCommand.php
11
 */
12
#[AsCommand(name: 'make:scope', description: 'Create a new class')]
13
class ScopeMakeCommand extends \Illuminate\Foundation\Console\ScopeMakeCommand
14
{
15
    use CodeGenerator;
16
    use UsesGeneratorOverrides;
17

18
    /**
19
     * Configures the current command.
20
     *
21
     * @return void
22
     */
23
    #[\Override]
24
    protected function configure()
25
    {
26
        parent::configure();
1✔
27

28
        $this->addGeneratorPresetOptions();
1✔
29
    }
30

31
    /**
32
     * Execute the console command.
33
     *
34
     * @return bool|null
35
     *
36
     * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
37
     */
38
    #[\Override]
39
    public function handle()
40
    {
41
        /** @phpstan-ignore return.type */
42
        return $this->generateCode() ? self::SUCCESS : self::FAILURE;
1✔
43
    }
44

45
    /**
46
     * Qualify the given model class base name.
47
     *
48
     * @return string
49
     */
50
    #[\Override]
51
    protected function qualifyModel(string $model)
52
    {
UNCOV
53
        return $this->qualifyModelUsingCanvas($model);
×
54
    }
55

56
    /**
57
     * Get the destination class path.
58
     *
59
     * @param  string  $name
60
     * @return string
61
     */
62
    #[\Override]
63
    protected function getPath($name)
64
    {
65
        return $this->getPathUsingCanvas($name);
1✔
66
    }
67

68
    /**
69
     * Get the root namespace for the class.
70
     *
71
     * @return string
72
     */
73
    #[\Override]
74
    protected function rootNamespace()
75
    {
76
        return $this->rootNamespaceUsingCanvas();
1✔
77
    }
78
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc