Skip to content

Commit c82da8d

Browse files
authored
Add visibility for all class elements (#20557)
1 parent 813dfc0 commit c82da8d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+328
-331
lines changed

build/controllers/ReleaseController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,8 +1032,8 @@ protected function getCurrentVersions(array $what)
10321032
return $versions;
10331033
}
10341034

1035-
const MINOR = 'minor';
1036-
const PATCH = 'patch';
1035+
public const MINOR = 'minor';
1036+
public const PATCH = 'patch';
10371037

10381038
protected function getNextVersions(array $versions, $type)
10391039
{

framework/base/Application.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,39 +49,39 @@ abstract class Application extends Module
4949
/**
5050
* @event Event an event raised before the application starts to handle a request.
5151
*/
52-
const EVENT_BEFORE_REQUEST = 'beforeRequest';
52+
public const EVENT_BEFORE_REQUEST = 'beforeRequest';
5353
/**
5454
* @event Event an event raised after the application successfully handles a request (before the response is sent out).
5555
*/
56-
const EVENT_AFTER_REQUEST = 'afterRequest';
56+
public const EVENT_AFTER_REQUEST = 'afterRequest';
5757
/**
5858
* Application state used by [[state]]: application just started.
5959
*/
60-
const STATE_BEGIN = 0;
60+
public const STATE_BEGIN = 0;
6161
/**
6262
* Application state used by [[state]]: application is initializing.
6363
*/
64-
const STATE_INIT = 1;
64+
public const STATE_INIT = 1;
6565
/**
6666
* Application state used by [[state]]: application is triggering [[EVENT_BEFORE_REQUEST]].
6767
*/
68-
const STATE_BEFORE_REQUEST = 2;
68+
public const STATE_BEFORE_REQUEST = 2;
6969
/**
7070
* Application state used by [[state]]: application is handling the request.
7171
*/
72-
const STATE_HANDLING_REQUEST = 3;
72+
public const STATE_HANDLING_REQUEST = 3;
7373
/**
7474
* Application state used by [[state]]: application is triggering [[EVENT_AFTER_REQUEST]]..
7575
*/
76-
const STATE_AFTER_REQUEST = 4;
76+
public const STATE_AFTER_REQUEST = 4;
7777
/**
7878
* Application state used by [[state]]: application is about to send response.
7979
*/
80-
const STATE_SENDING_RESPONSE = 5;
80+
public const STATE_SENDING_RESPONSE = 5;
8181
/**
8282
* Application state used by [[state]]: application has ended.
8383
*/
84-
const STATE_END = 6;
84+
public const STATE_END = 6;
8585

8686
/**
8787
* @var string the namespace that controller classes are located in.

framework/base/Controller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ class Controller extends Component implements ViewContextInterface
3131
* @event ActionEvent an event raised right before executing a controller action.
3232
* You may set [[ActionEvent::isValid]] to be false to cancel the action execution.
3333
*/
34-
const EVENT_BEFORE_ACTION = 'beforeAction';
34+
public const EVENT_BEFORE_ACTION = 'beforeAction';
3535
/**
3636
* @event ActionEvent an event raised right after executing a controller action.
3737
*/
38-
const EVENT_AFTER_ACTION = 'afterAction';
38+
public const EVENT_AFTER_ACTION = 'afterAction';
3939

4040
/**
4141
* @var string the ID of this controller.

framework/base/ErrorException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ErrorException extends \ErrorException
2525
* @see https://github.com/facebook/hhvm/blob/master/hphp/runtime/base/runtime-error.h#L62
2626
* @since 2.0.6
2727
*/
28-
const E_HHVM_FATAL_ERROR = 16777217; // E_ERROR | (1 << 24)
28+
public const E_HHVM_FATAL_ERROR = 16777217; // E_ERROR | (1 << 24)
2929

3030

3131
/**

framework/base/ErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ abstract class ErrorHandler extends Component
3030
* @event Event an event that is triggered when the handler is called by shutdown function via [[handleFatalError()]].
3131
* @since 2.0.46
3232
*/
33-
const EVENT_SHUTDOWN = 'shutdown';
33+
public const EVENT_SHUTDOWN = 'shutdown';
3434

3535
/**
3636
* @var bool whether to discard any existing page output before error display. Defaults to true.

framework/base/Model.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,16 @@ class Model extends Component implements StaticInstanceInterface, IteratorAggreg
8383
/**
8484
* The name of the default scenario.
8585
*/
86-
const SCENARIO_DEFAULT = 'default';
86+
public const SCENARIO_DEFAULT = 'default';
8787
/**
8888
* @event ModelEvent an event raised at the beginning of [[validate()]]. You may set
8989
* [[ModelEvent::isValid]] to be false to stop the validation.
9090
*/
91-
const EVENT_BEFORE_VALIDATE = 'beforeValidate';
91+
public const EVENT_BEFORE_VALIDATE = 'beforeValidate';
9292
/**
9393
* @event Event an event raised at the end of [[validate()]]
9494
*/
95-
const EVENT_AFTER_VALIDATE = 'afterValidate';
95+
public const EVENT_AFTER_VALIDATE = 'afterValidate';
9696

9797
/**
9898
* @var array validation errors (attribute name => array of errors)

framework/base/Module.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ class Module extends ServiceLocator
4444
* @event ActionEvent an event raised before executing a controller action.
4545
* You may set [[ActionEvent::isValid]] to be `false` to cancel the action execution.
4646
*/
47-
const EVENT_BEFORE_ACTION = 'beforeAction';
47+
public const EVENT_BEFORE_ACTION = 'beforeAction';
4848
/**
4949
* @event ActionEvent an event raised after executing a controller action.
5050
*/
51-
const EVENT_AFTER_ACTION = 'afterAction';
51+
public const EVENT_AFTER_ACTION = 'afterAction';
5252

5353
/**
5454
* @var array custom module parameters (name => value).

framework/base/View.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ class View extends Component implements DynamicContentAwareInterface
3232
/**
3333
* @event Event an event that is triggered by [[beginPage()]].
3434
*/
35-
const EVENT_BEGIN_PAGE = 'beginPage';
35+
public const EVENT_BEGIN_PAGE = 'beginPage';
3636
/**
3737
* @event Event an event that is triggered by [[endPage()]].
3838
*/
39-
const EVENT_END_PAGE = 'endPage';
39+
public const EVENT_END_PAGE = 'endPage';
4040
/**
4141
* @event ViewEvent an event that is triggered by [[renderFile()]] right before it renders a view file.
4242
*/
43-
const EVENT_BEFORE_RENDER = 'beforeRender';
43+
public const EVENT_BEFORE_RENDER = 'beforeRender';
4444
/**
4545
* @event ViewEvent an event that is triggered by [[renderFile()]] right after it renders a view file.
4646
*/
47-
const EVENT_AFTER_RENDER = 'afterRender';
47+
public const EVENT_AFTER_RENDER = 'afterRender';
4848

4949
/**
5050
* @var ViewContextInterface the context under which the [[renderFile()]] method is being invoked.

framework/base/Widget.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ class Widget extends Component implements ViewContextInterface
3030
* @event Event an event that is triggered when the widget is initialized via [[init()]].
3131
* @since 2.0.11
3232
*/
33-
const EVENT_INIT = 'init';
33+
public const EVENT_INIT = 'init';
3434
/**
3535
* @event WidgetEvent an event raised right before executing a widget.
3636
* You may set [[WidgetEvent::isValid]] to be false to cancel the widget execution.
3737
* @since 2.0.11
3838
*/
39-
const EVENT_BEFORE_RUN = 'beforeRun';
39+
public const EVENT_BEFORE_RUN = 'beforeRun';
4040
/**
4141
* @event WidgetEvent an event raised right after executing a widget.
4242
* @since 2.0.11
4343
*/
44-
const EVENT_AFTER_RUN = 'afterRun';
44+
public const EVENT_AFTER_RUN = 'afterRun';
4545

4646
/**
4747
* @var int a counter used to generate [[id]] for widgets.

framework/behaviors/AttributeTypecastBehavior.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@
111111
*/
112112
class AttributeTypecastBehavior extends Behavior
113113
{
114-
const TYPE_INTEGER = 'integer';
115-
const TYPE_FLOAT = 'float';
116-
const TYPE_BOOLEAN = 'boolean';
117-
const TYPE_STRING = 'string';
114+
public const TYPE_INTEGER = 'integer';
115+
public const TYPE_FLOAT = 'float';
116+
public const TYPE_BOOLEAN = 'boolean';
117+
public const TYPE_STRING = 'string';
118118

119119
/**
120120
* @var Model|BaseActiveRecord the owner of this behavior.

0 commit comments

Comments
 (0)