Fix codestyle in build and tests (#20586)

This commit is contained in:
Maksim Spirkov
2025-10-10 23:04:09 +03:00
committed by GitHub
parent 8005113753
commit 909396074e
361 changed files with 1422 additions and 790 deletions

View File

@ -1,4 +1,5 @@
<?php
/**
* @link https://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
@ -489,22 +490,22 @@ class ReleaseController extends Controller
// $this->composerSetStability($what, $version);
// $this->resortChangelogs($what, $version);
// $this->closeChangelogs($what, $version);
// $this->composerSetStability($what, $version);
// if (in_array('framework', $what)) {
// $this->updateYiiVersion($version);
// }
// $this->resortChangelogs($what, $version);
// $this->closeChangelogs($what, $version);
// $this->composerSetStability($what, $version);
// if (in_array('framework', $what)) {
// $this->updateYiiVersion($version);
// }
// if done:
// * ./build/build release/done framework 2.0.0-dev 2.0.0-rc
// * ./build/build release/done redis 2.0.0-dev 2.0.0-rc
// $this->openChangelogs($what, $nextVersion);
// $this->composerSetStability($what, 'dev');
// if (in_array('framework', $what)) {
// $this->updateYiiVersion($devVersion);
// }
// $this->openChangelogs($what, $nextVersion);
// $this->composerSetStability($what, 'dev');
// if (in_array('framework', $what)) {
// $this->updateYiiVersion($devVersion);
// }
@ -875,8 +876,10 @@ class ReleaseController extends Controller
$state = 'start';
foreach ($lines as $l => $line) {
// starting from the changelogs headline
if (isset($lines[$l - 2]) && strpos($lines[$l - 2], $version) !== false &&
isset($lines[$l - 1]) && strncmp($lines[$l - 1], '---', 3) === 0) {
if (
isset($lines[$l - 2]) && strpos($lines[$l - 2], $version) !== false &&
isset($lines[$l - 1]) && strncmp($lines[$l - 1], '---', 3) === 0
) {
$state = 'changelog';
}
if ($state === 'changelog' && isset($lines[$l + 1]) && strncmp($lines[$l + 1], '---', 3) === 0) {
@ -992,7 +995,8 @@ class ReleaseController extends Controller
$this->sed(
'/function getVersion\(\)\R {4}\{\R {8}return \'(.+?)\';/',
"function getVersion()\n {\n return '$version';",
$frameworkPath . '/BaseYii.php');
$frameworkPath . '/BaseYii.php'
);
}
protected function sed($pattern, $replace, $files)
@ -1021,8 +1025,7 @@ class ReleaseController extends Controller
rsort($tags, SORT_NATURAL); // TODO this can not deal with alpha/beta/rc...
// exclude 3.0.0-alpha1 tag
if (($key = array_search('3.0.0-alpha1', $tags, true)) !== false)
{
if (($key = array_search('3.0.0-alpha1', $tags, true)) !== false) {
unset($tags[$key]);
}