HEX
Server: Apache
System: Linux webm013.cluster123.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: lesanew (165608)
PHP: 8.3.31
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/lesanew/anestetues2/vendor/roots/acorn/src/Roots/Acorn/Console/Commands/GeneratorCommand.php
<?php

namespace Roots\Acorn\Console\Commands;

use Illuminate\Console\GeneratorCommand as GeneratorCommandBase;

abstract class GeneratorCommand extends GeneratorCommandBase
{
    /**
     * The application implementation.
     *
     * @var Application
     */
    protected $app;

    /**
     * {@inheritdoc}
     */
    public function setLaravel($laravel)
    {
        parent::setLaravel($this->app = $laravel);
    }

    /**
     * {@inheritdoc}
     */
    protected function getNameInput()
    {
        return trim(
            is_array($name = $this->argument('name')) ? end($name) : $name
        );
    }

    /**
     * Build the class with the given name.
     *
     * @param  string  $name
     * @return string
     *
     * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
     */
    protected function buildClass($name)
    {
        $stub = $this->files->get($this->getStub());

        return $this
            ->replaceIlluminate($stub)
            ->replaceNamespace($stub, $name)
            ->replaceClass($stub, $name);
    }

    /**
     * Replace the Illuminate namespace with Acorn for the given stub.
     *
     * @param  string  $stub
     * @return $this
     */
    protected function replaceIlluminate(&$stub)
    {
        $stub = str_replace(
            'Illuminate\\Support\\',
            'Roots\\Acorn\\',
            $stub
        );

        return $this;
    }
}