code style: static visibility
This commit is contained in:
parent
90fb952c4c
commit
fe15e2c063
|
@ -9,9 +9,8 @@
|
|||
|
||||
<exclude name="Squiz.WhiteSpace.ScopeClosingBrace.ContentBefore"/>
|
||||
|
||||
<exclude name="PSR2.Classes.PropertyDeclaration.StaticBeforeVisibility"/>
|
||||
|
||||
<exclude name="PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose"/>
|
||||
<exclude name="PSR2.Methods.MethodDeclaration.StaticBeforeVisibility"/>
|
||||
<exclude name="PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter"/>
|
||||
<exclude name="PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse"/>
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ class Event
|
|||
* by default this is the return value of the default action however
|
||||
* it can be set or modified by event handler hooks
|
||||
*/
|
||||
static public function createAndTrigger($name, &$data, $action = null, $canPreventDefault = true)
|
||||
public static function createAndTrigger($name, &$data, $action = null, $canPreventDefault = true)
|
||||
{
|
||||
$evt = new Event($name, $data);
|
||||
return $evt->trigger($action, $canPreventDefault);
|
||||
|
|
|
@ -14,7 +14,7 @@ class Headers
|
|||
*
|
||||
* @param array $policy
|
||||
*/
|
||||
static public function contentSecurityPolicy($policy)
|
||||
public static function contentSecurityPolicy($policy)
|
||||
{
|
||||
foreach ($policy as $key => $values) {
|
||||
// if the value is not an array, we also accept newline terminated strings
|
||||
|
|
|
@ -17,7 +17,7 @@ class Info
|
|||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
static public function parseVersionString($version)
|
||||
public static function parseVersionString($version)
|
||||
{
|
||||
$return = [
|
||||
'type' => '', // stable, rc
|
||||
|
|
|
@ -14,7 +14,7 @@ class Logger
|
|||
public const LOG_DEBUG = 'debug';
|
||||
|
||||
/** @var Logger[] */
|
||||
static protected $instances;
|
||||
protected static $instances;
|
||||
|
||||
/** @var string what kind of log is this */
|
||||
protected $facility;
|
||||
|
@ -43,7 +43,7 @@ class Logger
|
|||
* @param string $facility The type of log
|
||||
* @return Logger
|
||||
*/
|
||||
static public function getInstance($facility = self::LOG_ERROR)
|
||||
public static function getInstance($facility = self::LOG_ERROR)
|
||||
{
|
||||
if (empty(self::$instances[$facility])) {
|
||||
self::$instances[$facility] = new Logger($facility);
|
||||
|
@ -60,7 +60,7 @@ class Logger
|
|||
* @param int $line A line number for the above file
|
||||
* @return bool has a log been written?
|
||||
*/
|
||||
static public function error($message, $details = null, $file = '', $line = 0)
|
||||
public static function error($message, $details = null, $file = '', $line = 0)
|
||||
{
|
||||
return self::getInstance(self::LOG_ERROR)->log(
|
||||
$message,
|
||||
|
@ -79,7 +79,7 @@ class Logger
|
|||
* @param int $line A line number for the above file
|
||||
* @return bool has a log been written?
|
||||
*/
|
||||
static public function debug($message, $details = null, $file = '', $line = 0)
|
||||
public static function debug($message, $details = null, $file = '', $line = 0)
|
||||
{
|
||||
return self::getInstance(self::LOG_DEBUG)->log(
|
||||
$message,
|
||||
|
@ -98,7 +98,7 @@ class Logger
|
|||
* @param int $line A line number for the above file
|
||||
* @return bool has a log been written?
|
||||
*/
|
||||
static public function deprecated($message, $details = null, $file = '', $line = 0)
|
||||
public static function deprecated($message, $details = null, $file = '', $line = 0)
|
||||
{
|
||||
return self::getInstance(self::LOG_DEPRECATED)->log(
|
||||
$message,
|
||||
|
|
|
@ -20,7 +20,7 @@ class Setting
|
|||
protected $protected;
|
||||
|
||||
/** @var array valid alerts, images matching the alerts are in the plugin's images directory */
|
||||
static protected $validCautions = ['warning', 'danger', 'security'];
|
||||
protected static $validCautions = ['warning', 'danger', 'security'];
|
||||
|
||||
protected $pattern = '';
|
||||
protected $error = false; // only used by those classes which error check
|
||||
|
|
Loading…
Reference in New Issue