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

api-platform / core / 13198483979

07 Feb 2025 11:00AM UTC coverage: 8.164%. First build
13198483979

push

github

soyuka
Merge 4.0

4 of 85 new or added lines in 14 files covered. (4.71%)

12802 of 156816 relevant lines covered (8.16%)

22.83 hits per line

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

0.0
/src/Laravel/Tests/Console/Maker/Utils/AppServiceFileGenerator.php
1
<?php
2

3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <dunglas@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
declare(strict_types=1);
13

14
namespace ApiPlatform\Laravel\Tests\Console\Maker\Utils;
15

16
use Illuminate\Contracts\Filesystem\FileNotFoundException;
17
use Illuminate\Filesystem\Filesystem;
18

19
final readonly class AppServiceFileGenerator
20
{
21
    public function __construct(private Filesystem $filesystem)
22
    {
23
    }
×
24

25
    /**
26
     * @throws FileNotFoundException
27
     */
28
    public function regenerateProviderFile(): void
29
    {
NEW
30
        $templatePath = \dirname(__DIR__).'/Resources/skeleton/AppServiceProvider.php.tpl';
×
31
        $targetPath = base_path('app/Providers/AppServiceProvider.php');
×
32

33
        $this->regenerateFileFromTemplate($templatePath, $targetPath);
×
34
    }
35

36
    /**
37
     * @throws FileNotFoundException
38
     */
39
    private function regenerateFileFromTemplate(string $templatePath, string $targetPath): void
40
    {
41
        $content = $this->filesystem->get($templatePath);
×
42

43
        $this->filesystem->put($targetPath, $content);
×
44
    }
45
}
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

© 2026 Coveralls, Inc