• 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

88.89
/src/Console/MailMakeCommand.php
1
<?php
2

3
namespace Orchestra\Canvas\Console;
4

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

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

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

30
        $this->addGeneratorPresetOptions();
3✔
31
    }
32

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

47
    /**
48
     * Run after code successfully generated.
49
     */
50
    public function afterCodeHasBeenGenerated(string $className, string $path): void
51
    {
52
        if ($this->option('markdown') !== false) {
3✔
53
            $this->writeMarkdownTemplate();
1✔
54
        }
55

56
        if ($this->option('view') !== false) {
3✔
UNCOV
57
            $this->writeView();
×
58
        }
59
    }
60

61
    /**
62
     * Get the destination class path.
63
     *
64
     * @param  string  $name
65
     * @return string
66
     */
67
    #[\Override]
68
    protected function getPath($name)
69
    {
70
        return $this->getPathUsingCanvas($name);
3✔
71
    }
72

73
    /**
74
     * Get the root namespace for the class.
75
     *
76
     * @return string
77
     */
78
    #[\Override]
79
    protected function rootNamespace()
80
    {
81
        return $this->rootNamespaceUsingCanvas();
3✔
82
    }
83
}
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