@@ -72,7 +72,7 @@ class Selector
7272 /**
7373 * @var int|null
7474 */
75- private $ iSpecificity ;
75+ private $ specificity ;
7676
7777 /**
7878 * @param string $selector
@@ -86,12 +86,12 @@ public static function isValid($selector)
8686
8787 /**
8888 * @param string $selector
89- * @param bool $bCalculateSpecificity
89+ * @param bool $calculateSpecificity
9090 */
91- public function __construct ($ selector , $ bCalculateSpecificity = false )
91+ public function __construct ($ selector , $ calculateSpecificity = false )
9292 {
9393 $ this ->setSelector ($ selector );
94- if ($ bCalculateSpecificity ) {
94+ if ($ calculateSpecificity ) {
9595 $ this ->getSpecificity ();
9696 }
9797 }
@@ -110,7 +110,7 @@ public function getSelector()
110110 public function setSelector ($ selector ): void
111111 {
112112 $ this ->selector = \trim ($ selector );
113- $ this ->iSpecificity = null ;
113+ $ this ->specificity = null ;
114114 }
115115
116116 public function __toString (): string
@@ -123,15 +123,15 @@ public function __toString(): string
123123 */
124124 public function getSpecificity ()
125125 {
126- if ($ this ->iSpecificity === null ) {
126+ if ($ this ->specificity === null ) {
127127 $ a = 0 ;
128128 /// @todo should exclude \# as well as "#"
129129 $ aMatches = null ;
130130 $ b = \substr_count ($ this ->selector , '# ' );
131131 $ c = \preg_match_all (self ::NON_ID_ATTRIBUTES_AND_PSEUDO_CLASSES_RX , $ this ->selector , $ aMatches );
132132 $ d = \preg_match_all (self ::ELEMENTS_AND_PSEUDO_ELEMENTS_RX , $ this ->selector , $ aMatches );
133- $ this ->iSpecificity = ($ a * 1000 ) + ($ b * 100 ) + ($ c * 10 ) + $ d ;
133+ $ this ->specificity = ($ a * 1000 ) + ($ b * 100 ) + ($ c * 10 ) + $ d ;
134134 }
135- return $ this ->iSpecificity ;
135+ return $ this ->specificity ;
136136 }
137137}
0 commit comments