arg(0, 'patch'); if (!in_array($level, ['patch', 'minor', 'major'], true)) { $this->fail('Уровень — patch, minor или major, не "' . $level . '"'); return 1; } $updater = new Updater(APP_ROOT); $before = $updater->localVersion(); $note = (string) $this->option('note', ''); $after = $updater->bump($level, $note, $this->hasOption('breaking')); $this->ok($before . ' → ' . $after); if ($note === '') { $this->line('Запись в docs/CHANGELOG.md не добавлена — не передан --note'); } return 0; } }