OXIESEC PANEL
- Current Dir:
/
/
usr
/
share
/
php
/
Composer
/
DependencyResolver
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
07/20/2024 06:32:22 AM
rwxr-xr-x
📄
Decisions.php
5.1 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
DefaultPolicy.php
9.12 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
GenericRule.php
2.12 KB
01/31/2018 03:28:18 PM
rw-r--r--
📁
Operation
-
07/20/2024 06:32:22 AM
rwxr-xr-x
📄
PolicyInterface.php
746 bytes
01/31/2018 03:28:18 PM
rw-r--r--
📄
Pool.php
13.88 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
Problem.php
9.45 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
Request.php
1.91 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
Rule.php
8.99 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
Rule2Literals.php
2.44 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
RuleSet.php
4.06 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
RuleSetGenerator.php
12.41 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
RuleSetIterator.php
2.28 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
RuleWatchChain.php
1.37 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
RuleWatchGraph.php
5.2 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
RuleWatchNode.php
2.68 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
Solver.php
26.15 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
SolverBugException.php
757 bytes
01/31/2018 03:28:18 PM
rw-r--r--
📄
SolverProblemsException.php
2.69 KB
01/31/2018 03:28:18 PM
rw-r--r--
📄
Transaction.php
7.55 KB
01/31/2018 03:28:18 PM
rw-r--r--
Editing: Rule2Literals.php
Close
<?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; use Composer\Package\PackageInterface; use Composer\Package\Link; /** * @author Nils Adermann <naderman@naderman.de> */ class Rule2Literals extends Rule { protected $literal1; protected $literal2; /** * @param int $literal1 * @param int $literal2 * @param int $reason A RULE_* constant describing the reason for generating this rule * @param Link|PackageInterface $reasonData * @param array $job The job this rule was created from */ public function __construct($literal1, $literal2, $reason, $reasonData, $job = null) { parent::__construct($reason, $reasonData, $job); if ($literal1 < $literal2) { $this->literal1 = $literal1; $this->literal2 = $literal2; } else { $this->literal1 = $literal2; $this->literal2 = $literal1; } } public function getLiterals() { return array($this->literal1, $this->literal2); } public function getHash() { $data = unpack('ihash', md5($this->literal1.','.$this->literal2, true)); return $data['hash']; } /** * 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) { $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; } 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; } }