Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../www/wp-conte.../plugins/wpforms-.../vendor_p.../symfony/css-sele.../Node
File: Specificity.php
<?php
[0] Fix | Delete
[1] Fix | Delete
/*
[2] Fix | Delete
* This file is part of the Symfony package.
[3] Fix | Delete
*
[4] Fix | Delete
* (c) Fabien Potencier <fabien@symfony.com>
[5] Fix | Delete
*
[6] Fix | Delete
* For the full copyright and license information, please view the LICENSE
[7] Fix | Delete
* file that was distributed with this source code.
[8] Fix | Delete
*/
[9] Fix | Delete
namespace WPForms\Vendor\Symfony\Component\CssSelector\Node;
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* Represents a node specificity.
[13] Fix | Delete
*
[14] Fix | Delete
* This component is a port of the Python cssselect library,
[15] Fix | Delete
* which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.
[16] Fix | Delete
*
[17] Fix | Delete
* @see http://www.w3.org/TR/selectors/#specificity
[18] Fix | Delete
*
[19] Fix | Delete
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
[20] Fix | Delete
*
[21] Fix | Delete
* @internal
[22] Fix | Delete
*/
[23] Fix | Delete
class Specificity
[24] Fix | Delete
{
[25] Fix | Delete
const A_FACTOR = 100;
[26] Fix | Delete
const B_FACTOR = 10;
[27] Fix | Delete
const C_FACTOR = 1;
[28] Fix | Delete
/**
[29] Fix | Delete
* @var int
[30] Fix | Delete
*/
[31] Fix | Delete
private $a;
[32] Fix | Delete
/**
[33] Fix | Delete
* @var int
[34] Fix | Delete
*/
[35] Fix | Delete
private $b;
[36] Fix | Delete
/**
[37] Fix | Delete
* @var int
[38] Fix | Delete
*/
[39] Fix | Delete
private $c;
[40] Fix | Delete
/**
[41] Fix | Delete
* Constructor.
[42] Fix | Delete
*
[43] Fix | Delete
* @param int $a
[44] Fix | Delete
* @param int $b
[45] Fix | Delete
* @param int $c
[46] Fix | Delete
*/
[47] Fix | Delete
public function __construct($a, $b, $c)
[48] Fix | Delete
{
[49] Fix | Delete
$this->a = $a;
[50] Fix | Delete
$this->b = $b;
[51] Fix | Delete
$this->c = $c;
[52] Fix | Delete
}
[53] Fix | Delete
/**
[54] Fix | Delete
* @param Specificity $specificity
[55] Fix | Delete
*
[56] Fix | Delete
* @return self
[57] Fix | Delete
*/
[58] Fix | Delete
public function plus(Specificity $specificity)
[59] Fix | Delete
{
[60] Fix | Delete
return new self($this->a + $specificity->a, $this->b + $specificity->b, $this->c + $specificity->c);
[61] Fix | Delete
}
[62] Fix | Delete
/**
[63] Fix | Delete
* Returns global specificity value.
[64] Fix | Delete
*
[65] Fix | Delete
* @return int
[66] Fix | Delete
*/
[67] Fix | Delete
public function getValue()
[68] Fix | Delete
{
[69] Fix | Delete
return $this->a * self::A_FACTOR + $this->b * self::B_FACTOR + $this->c * self::C_FACTOR;
[70] Fix | Delete
}
[71] Fix | Delete
/**
[72] Fix | Delete
* Returns -1 if the object specificity is lower than the argument,
[73] Fix | Delete
* 0 if they are equal, and 1 if the argument is lower.
[74] Fix | Delete
*
[75] Fix | Delete
* @param Specificity $specificity
[76] Fix | Delete
*
[77] Fix | Delete
* @return int
[78] Fix | Delete
*/
[79] Fix | Delete
public function compareTo(Specificity $specificity)
[80] Fix | Delete
{
[81] Fix | Delete
if ($this->a !== $specificity->a) {
[82] Fix | Delete
return $this->a > $specificity->a ? 1 : -1;
[83] Fix | Delete
}
[84] Fix | Delete
if ($this->b !== $specificity->b) {
[85] Fix | Delete
return $this->b > $specificity->b ? 1 : -1;
[86] Fix | Delete
}
[87] Fix | Delete
if ($this->c !== $specificity->c) {
[88] Fix | Delete
return $this->c > $specificity->c ? 1 : -1;
[89] Fix | Delete
}
[90] Fix | Delete
return 0;
[91] Fix | Delete
}
[92] Fix | Delete
}
[93] Fix | Delete
[94] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function