Add visibility for all class elements (#20557)

This commit is contained in:
Maksim Spirkov
2025-10-02 02:27:23 +04:00
committed by GitHub
parent 813dfc07cc
commit c82da8dc82
73 changed files with 328 additions and 331 deletions

View File

@@ -26,8 +26,8 @@ use yiiunit\framework\db\ActiveRecordTest;
*/
class Customer extends ActiveRecord
{
const STATUS_ACTIVE = 1;
const STATUS_INACTIVE = 2;
public const STATUS_ACTIVE = 1;
public const STATUS_INACTIVE = 2;
public $status2;

View File

@@ -15,8 +15,8 @@ namespace yiiunit\data\ar;
*/
class CustomerWithAlias extends ActiveRecord
{
const STATUS_ACTIVE = 1;
const STATUS_INACTIVE = 2;
public const STATUS_ACTIVE = 1;
public const STATUS_INACTIVE = 2;
public $status2;

View File

@@ -207,7 +207,7 @@ class User extends ActiveRecord
interface SomeInterface
{
const EVENT_SUPER_EVENT = 'superEvent';
public const EVENT_SUPER_EVENT = 'superEvent';
}
class SomeClass extends Component implements SomeInterface

View File

@@ -19,7 +19,7 @@ use yiiunit\TestCase;
*/
class SecurityTest extends TestCase
{
const CRYPT_VECTORS = 'old';
public const CRYPT_VECTORS = 'old';
/**
* @var ExposedSecurity

View File

@@ -20,7 +20,7 @@ class DeadLockTest extends \yiiunit\framework\db\mysql\ConnectionTest
/** @var string Shared log filename for children */
private $logFile;
const CHILD_EXIT_CODE_DEADLOCK = 15;
public const CHILD_EXIT_CODE_DEADLOCK = 15;
/**
* Test deadlock exception.

View File

@@ -315,9 +315,9 @@ class BoolAR extends ActiveRecord
class UserAR extends ActiveRecord
{
const STATUS_DELETED = 0;
const STATUS_ACTIVE = 10;
const ROLE_USER = 10;
public const STATUS_DELETED = 0;
public const STATUS_ACTIVE = 10;
public const ROLE_USER = 10;
public static function tableName()
{

View File

@@ -17,17 +17,17 @@ use yiiunit\TestCase;
*/
class FallbackMessageFormatterTest extends TestCase
{
const N = 'n';
const N_VALUE = 42;
const F = 'f';
const F_VALUE = 2e+8;
const F_VALUE_FORMATTED = '200,000,000';
const D = 'd';
const D_VALUE = 200000000.101;
const D_VALUE_FORMATTED = '200,000,000.101';
const D_VALUE_FORMATTED_INTEGER = '200,000,000';
const SUBJECT = 'сабж';
const SUBJECT_VALUE = 'Answer to the Ultimate Question of Life, the Universe, and Everything';
public const N = 'n';
public const N_VALUE = 42;
public const F = 'f';
public const F_VALUE = 2e+8;
public const F_VALUE_FORMATTED = '200,000,000';
public const D = 'd';
public const D_VALUE = 200000000.101;
public const D_VALUE_FORMATTED = '200,000,000.101';
public const D_VALUE_FORMATTED_INTEGER = '200,000,000';
public const SUBJECT = 'сабж';
public const SUBJECT_VALUE = 'Answer to the Ultimate Question of Life, the Universe, and Everything';
public function patterns()
{

View File

@@ -17,17 +17,17 @@ use yiiunit\TestCase;
*/
class MessageFormatterTest extends TestCase
{
const N = 'n';
const N_VALUE = 42;
const F = 'f';
const F_VALUE = 2e+8;
const F_VALUE_FORMATTED = '200,000,000';
const D = 'd';
const D_VALUE = 200000000.101;
const D_VALUE_FORMATTED = '200,000,000.101';
const D_VALUE_FORMATTED_INTEGER = '200,000,000';
const SUBJECT = 'сабж';
const SUBJECT_VALUE = 'Answer to the Ultimate Question of Life, the Universe, and Everything';
public const N = 'n';
public const N_VALUE = 42;
public const F = 'f';
public const F_VALUE = 2e+8;
public const F_VALUE_FORMATTED = '200,000,000';
public const D = 'd';
public const D_VALUE = 200000000.101;
public const D_VALUE_FORMATTED = '200,000,000.101';
public const D_VALUE_FORMATTED_INTEGER = '200,000,000';
public const SUBJECT = 'сабж';
public const SUBJECT_VALUE = 'Answer to the Ultimate Question of Life, the Universe, and Everything';
public function patterns()
{