__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Negotiation;
final class AcceptMatch
{
/**
* @var float
*/
public $quality;
/**
* @var int
*/
public $score;
/**
* @var int
*/
public $index;
public function __construct($quality, $score, $index)
{
$this->quality = $quality;
$this->score = $score;
$this->index = $index;
}
/**
* @param AcceptMatch $a
* @param AcceptMatch $b
*
* @return int
*/
public static function compare(AcceptMatch $a, AcceptMatch $b)
{
if ($a->quality !== $b->quality) {
return $a->quality > $b->quality ? -1 : 1;
}
if ($a->index !== $b->index) {
return $a->index > $b->index ? 1 : -1;
}
return 0;
}
/**
* @param array $carry reduced array
* @param AcceptMatch $match match to be reduced
*
* @return AcceptMatch[]
*/
public static function reduce(array $carry, AcceptMatch $match)
{
if (!isset($carry[$match->index]) || $carry[$match->index]->score < $match->score) {
$carry[$match->index] = $match;
}
return $carry;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Exception | Folder | 0775 |
|
|
| AbstractNegotiator.php | File | 5 KB | 0664 |
|
| Accept.php | File | 825 B | 0664 |
|
| AcceptCharset.php | File | 104 B | 0664 |
|
| AcceptEncoding.php | File | 105 B | 0664 |
|
| AcceptHeader.php | File | 58 B | 0664 |
|
| AcceptLanguage.php | File | 1.04 KB | 0664 |
|
| AcceptMatch.php | File | 1.17 KB | 0664 |
|
| BaseAccept.php | File | 2.95 KB | 0664 |
|
| CharsetNegotiator.php | File | 224 B | 0664 |
|
| EncodingNegotiator.php | File | 226 B | 0664 |
|
| LanguageNegotiator.php | File | 1.05 KB | 0664 |
|
| Negotiator.php | File | 2.81 KB | 0664 |
|