/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
src/Illuminate/Console/View/Components/Mutators/EnsurePunctuation.php
23 строки
452 B
Lucas Michot
Use new Stringable(...) instead of Str::of()/str() internally in the framework source (#60852)
21 июл 2026, 19:54
Не верифицирован
21 июл 2026, 19:54
d15b8f3
Код
Авторство
О чём код?
<?php namespace Illuminate\Console\View\Components\Mutators; use Illuminate\Support\Stringable; class EnsurePunctuation { /** * Ensures the given string ends with punctuation. * * @param string $string * @return string */ public function __invoke($string) { if ((new Stringable($string))->doesntEndWith(['.', '?', '!', ':'])) { return "$string."; } return $string; } }