GIF89; GIF89; %PDF- %PDF-
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\DependencyResolver;
/**
* @author Nils Adermann <naderman@naderman.de>
* @phpstan-import-type ReasonData from Rule
*/
class Rule2Literals extends Rule
{
/** @var int */
protected $literal1;
/** @var int */
protected $literal2;
/**
* @param int $literal1
* @param int $literal2
* @param Rule::RULE_* $reason A RULE_* constant
* @param mixed $reasonData
*
* @phpstan-param ReasonData $reasonData
*/
public function __construct($literal1, $literal2, $reason, $reasonData)
{
parent::__construct($reason, $reasonData);
if ($literal1 < $literal2) {
$this->literal1 = $literal1;
$this->literal2 = $literal2;
} else {
$this->literal1 = $literal2;
$this->literal2 = $literal1;
}
}
/** @return int[] */
public function getLiterals()
{
return array($this->literal1, $this->literal2);
}
/**
* @inheritDoc
*/
public function getHash()
{
return $this->literal1.','.$this->literal2;
}
/**
* Checks if this rule is equal to another one
*
* Ignores whether either of the rules is disabled.
*
* @param Rule $rule The rule to check against
* @return bool Whether the rules are equal
*/
public function equals(Rule $rule)
{
// specialized fast-case
if ($rule instanceof self) {
if ($this->literal1 !== $rule->literal1) {
return false;
}
if ($this->literal2 !== $rule->literal2) {
return false;
}
return true;
}
$literals = $rule->getLiterals();
if (2 != \count($literals)) {
return false;
}
if ($this->literal1 !== $literals[0]) {
return false;
}
if ($this->literal2 !== $literals[1]) {
return false;
}
return true;
}
/** @return false */
public function isAssertion()
{
return false;
}
/**
* Formats a rule as a string of the format (Literal1|Literal2|...)
*
* @return string
*/
public function __toString()
{
$result = $this->isDisabled() ? 'disabled(' : '(';
$result .= $this->literal1 . '|' . $this->literal2 . ')';
return $result;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Operation | Folder | 0755 |
|
|
| Decisions.php | File | 7.22 KB | 0644 |
|
| DefaultPolicy.php | File | 7.49 KB | 0644 |
|
| GenericRule.php | File | 1.91 KB | 0644 |
|
| LocalRepoTransaction.php | File | 789 B | 0644 |
|
| LockTransaction.php | File | 5.59 KB | 0644 |
|
| MultiConflictRule.php | File | 2.55 KB | 0644 |
|
| PolicyInterface.php | File | 905 B | 0644 |
|
| Pool.php | File | 8.45 KB | 0644 |
|
| PoolBuilder.php | File | 30.15 KB | 0644 |
|
| PoolOptimizer.php | File | 17.42 KB | 0644 |
|
| Problem.php | File | 27.07 KB | 0644 |
|
| Request.php | File | 8.04 KB | 0644 |
|
| Rule.php | File | 19.91 KB | 0644 |
|
| Rule2Literals.php | File | 2.62 KB | 0644 |
|
| RuleSet.php | File | 5.02 KB | 0644 |
|
| RuleSetGenerator.php | File | 13.14 KB | 0644 |
|
| RuleSetIterator.php | File | 2.86 KB | 0644 |
|
| RuleWatchChain.php | File | 1.43 KB | 0644 |
|
| RuleWatchGraph.php | File | 6.33 KB | 0644 |
|
| RuleWatchNode.php | File | 2.86 KB | 0644 |
|
| Solver.php | File | 26.17 KB | 0644 |
|
| SolverBugException.php | File | 812 B | 0644 |
|
| SolverProblemsException.php | File | 5.49 KB | 0644 |
|
| Transaction.php | File | 13.64 KB | 0644 |
|