From eb0644c6f46f58dd7dd8dc4443d016e958d09aef Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 21 Aug 2019 13:00:22 +0200 Subject: [PATCH] PSR-12 --- htdocs/api/class/api.class.php | 2 +- htdocs/core/class/lessc.class.php | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 223d62e248b..1b79f661dd6 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -32,7 +32,7 @@ class DolibarrApi /** * @var DoliDb $db Database object */ - static protected $db; + protected static $db; /** * @var Restler $r Restler object diff --git a/htdocs/core/class/lessc.class.php b/htdocs/core/class/lessc.class.php index 34034226497..dcbd253c1cf 100644 --- a/htdocs/core/class/lessc.class.php +++ b/htdocs/core/class/lessc.class.php @@ -38,10 +38,10 @@ * handling things like indentation. */ class lessc { - static public $VERSION = "v0.5.0"; + public static $VERSION = "v0.5.0"; - static public $TRUE = array("keyword", "true"); - static public $FALSE = array("keyword", "false"); + public static $TRUE = array("keyword", "true"); + public static $FALSE = array("keyword", "false"); protected $libFunctions = array(); protected $registeredVars = array(); @@ -63,7 +63,7 @@ class lessc { protected $sourceParser = null; protected $sourceLoc = null; - static protected $nextImportId = 0; // uniquely identify imports + protected static $nextImportId = 0; // uniquely identify imports // attempts to find the path of an import url, returns null for css files protected function findImport($url) { @@ -2223,7 +2223,7 @@ class lessc { return $less->cachedCompile($in, $force); } - static protected $cssColors = array( + protected static $cssColors = array( 'aliceblue' => '240,248,255', 'antiquewhite' => '250,235,215', 'aqua' => '0,255,255', @@ -2378,9 +2378,9 @@ class lessc { // responsible for taking a string of LESS code and converting it into a // syntax tree class lessc_parser { - static protected $nextBlockId = 0; // used to uniquely identify blocks + protected static $nextBlockId = 0; // used to uniquely identify blocks - static protected $precedence = array( + protected static $precedence = array( '=<' => 0, '>=' => 0, '=' => 0, @@ -2394,18 +2394,18 @@ class lessc_parser { '%' => 2, ); - static protected $whitePattern; - static protected $commentMulti; + protected static $whitePattern; + protected static $commentMulti; - static protected $commentSingle = "//"; - static protected $commentMultiLeft = "/*"; - static protected $commentMultiRight = "*/"; + protected static $commentSingle = "//"; + protected static $commentMultiLeft = "/*"; + protected static $commentMultiRight = "*/"; // regex string to match any of the operators - static protected $operatorString; + protected static $operatorString; // these properties will supress division unless it's inside parenthases - static protected $supressDivisionProps = + protected static $supressDivisionProps = array('/border-radius$/i', '/^font$/i'); protected $blockDirectives = array("font-face", "keyframes", "page", "-moz-document", "viewport", "-moz-viewport", "-o-viewport", "-ms-viewport"); @@ -2423,7 +2423,7 @@ class lessc_parser { protected $inParens = false; // caches preg escaped literals - static protected $literalCache = array(); + protected static $literalCache = array(); public function __construct($lessc, $sourceName = null) { $this->eatWhiteDefault = true;