master

laravel/framework

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

NewLineAware.php

TLDR

This file is an interface that contains two methods related to counting and checking newlines written.

Methods

newLinesWritten

This method returns the number of trailing newlines that were written.

newLineWritten

This method checks whether a newline has already been written. It is deprecated and should be replaced with newLinesWritten.

<?php

namespace Illuminate\Console\Contracts;

interface NewLineAware
{
    /**
     * How many trailing newlines were written.
     *
     * @return int
     */
    public function newLinesWritten();

    /**
     * Whether a newline has already been written.
     *
     * @return bool
     *
     * @deprecated use newLinesWritten
     */
    public function newLineWritten();
}