public function setText(string $text) : void
    {
        $this->text = implode("\n", array_map(function (string $line) {
            return rtrim($line, ' ');
        }, explode("\n", $text)));

        $this->calculateArtLength();
    }
public function setText(string $text) : void
    {
        $this->text = implode("\n", array_map(function (string $line) {
            return rtrim($line, ' ');
        }, explode("\n", $text)));

        $this->calculateArtLength();
    }
public function setText ( string $ text ) : void { $ this -> text = implode ( "\n" , array_map ( function ( string $ line ) { return rtrim ( $ line , ' ' ) ; } , explode ( "\n" , $ text ) ) ) ; $ this -> calculateArtLength ( ) ; }
Set the raw string of text
Set the raw string of text