public static function get($selector){
		$specificity = $selector->hasNext() ? self::get($selector->getNext()) : new self();
		
		if($selector->getIdentification()) $specificity->a++;
		if($selector->getClasses()) $specificity->b+= count($selector->getClasses());
		if($selector->getAttributes()) $specificity->b+= count($selector->getAttributes());
		if($selector->getPseudos()) $specificity->b+= count($selector->getPseudos());
		if($selector->getTagName()) $specificity->c++;
		
		return $specificity;
	}
public static function get($selector){
		$specificity = $selector->hasNext() ? self::get($selector->getNext()) : new self();
		
		if($selector->getIdentification()) $specificity->a++;
		if($selector->getClasses()) $specificity->b+= count($selector->getClasses());
		if($selector->getAttributes()) $specificity->b+= count($selector->getAttributes());
		if($selector->getPseudos()) $specificity->b+= count($selector->getPseudos());
		if($selector->getTagName()) $specificity->c++;
		
		return $specificity;
	}
public static function get ( $ selector ) { $ specificity = $ selector -> hasNext ( ) ? self :: get ( $ selector -> getNext ( ) ) : new self ( ) ; if ( $ selector -> getIdentification ( ) ) $ specificity -> a ++ ; if ( $ selector -> getClasses ( ) ) $ specificity -> b += count ( $ selector -> getClasses ( ) ) ; if ( $ selector -> getAttributes ( ) ) $ specificity -> b += count ( $ selector -> getAttributes ( ) ) ; if ( $ selector -> getPseudos ( ) ) $ specificity -> b += count ( $ selector -> getPseudos ( ) ) ; if ( $ selector -> getTagName ( ) ) $ specificity -> c ++ ; return $ specificity ; }
Calculated the specificity of a selector
@param \csslib\Selector $selector
@return \csslib\query\Specificity
Calculated the specificity of a selector