PATH:
home
/
lab2454c
/
vaultchip.com
/
vendor
/
composer
/
composer
/
src
/
Composer
/
DependencyResolver
<?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> * @implements \Iterator<RuleSet::TYPE_*, Rule> */ class RuleSetIterator implements \Iterator { /** @var array<RuleSet::TYPE_*, Rule[]> */ protected $rules; /** @var array<RuleSet::TYPE_*> */ protected $types; /** @var int */ protected $currentOffset; /** @var RuleSet::TYPE_*|-1 */ protected $currentType; /** @var int */ protected $currentTypeOffset; /** * @param array<RuleSet::TYPE_*, Rule[]> $rules */ public function __construct(array $rules) { $this->rules = $rules; $this->types = array_keys($rules); sort($this->types); $this->rewind(); } #[\ReturnTypeWillChange] public function current() { return $this->rules[$this->currentType][$this->currentOffset]; } #[\ReturnTypeWillChange] public function key() { return $this->currentType; } #[\ReturnTypeWillChange] public function next() { $this->currentOffset++; if (!isset($this->rules[$this->currentType])) { return; } if ($this->currentOffset >= \count($this->rules[$this->currentType])) { $this->currentOffset = 0; do { $this->currentTypeOffset++; if (!isset($this->types[$this->currentTypeOffset])) { $this->currentType = -1; break; } $this->currentType = $this->types[$this->currentTypeOffset]; } while (isset($this->types[$this->currentTypeOffset]) && !\count($this->rules[$this->currentType])); } } #[\ReturnTypeWillChange] public function rewind() { $this->currentOffset = 0; $this->currentTypeOffset = -1; $this->currentType = -1; do { $this->currentTypeOffset++; if (!isset($this->types[$this->currentTypeOffset])) { $this->currentType = -1; break; } $this->currentType = $this->types[$this->currentTypeOffset]; } while (isset($this->types[$this->currentTypeOffset]) && !\count($this->rules[$this->currentType])); } #[\ReturnTypeWillChange] public function valid() { return isset($this->rules[$this->currentType], $this->rules[$this->currentType][$this->currentOffset]); } }
[+]
Operation
[-] SolverBugException.php
[edit]
[-] RuleSetGenerator.php
[edit]
[-] Rule2Literals.php
[edit]
[-] Problem.php
[edit]
[+]
..
[-] RuleWatchNode.php
[edit]
[-] RuleSetIterator.php
[edit]
[-] MultiConflictRule.php
[edit]
[-] Request.php
[edit]
[-] Rule.php
[edit]
[-] Solver.php
[edit]
[-] LockTransaction.php
[edit]
[-] SolverProblemsException.php
[edit]
[-] RuleWatchChain.php
[edit]
[-] RuleWatchGraph.php
[edit]
[-] Transaction.php
[edit]
[-] Decisions.php
[edit]
[-] PoolBuilder.php
[edit]
[-] RuleSet.php
[edit]
[-] Pool.php
[edit]
[-] DefaultPolicy.php
[edit]
[-] PolicyInterface.php
[edit]
[-] LocalRepoTransaction.php
[edit]
[-] GenericRule.php
[edit]