master

laravel/framework

Last updated at: 29/12/2023 09:20

Warn.php

TLDR

This file defines a class Warn in the namespace Illuminate\Console\View\Components. The class has one method render that renders the warning component using the given arguments.

Methods

render

Renders the warning component using the given arguments.

Classes

Class Warn

The Warn class extends the Component class and is used to render the warning component. It has one method render that renders the warning component using the given arguments.

<?php

namespace Illuminate\Console\View\Components;

use Symfony\Component\Console\Output\OutputInterface;

class Warn extends Component
{
    /**
     * Renders the component using the given arguments.
     *
     * @param  string  $string
     * @param  int  $verbosity
     * @return void
     */
    public function render($string, $verbosity = OutputInterface::VERBOSITY_NORMAL)
    {
        with(new Line($this->output))
            ->render('warn', $string, $verbosity);
    }
}