!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)

/var/www/html/queuepro/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/   drwxrwxr-x
Free 13.11 GB of 57.97 GB (22.62%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     ProphecySubjectPatch.php (3.3 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the Prophecy.
 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
 *     Marcello Duarte <marcello.duarte@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Prophecy\Doubler\ClassPatch;

use 
Prophecy\Doubler\Generator\Node\ArgumentTypeNode;
use 
Prophecy\Doubler\Generator\Node\ClassNode;
use 
Prophecy\Doubler\Generator\Node\MethodNode;
use 
Prophecy\Doubler\Generator\Node\ArgumentNode;
use 
Prophecy\Doubler\Generator\Node\ReturnTypeNode;

/**
 * Add Prophecy functionality to the double.
 * This is a core class patch for Prophecy.
 *
 * @author Konstantin Kudryashov <ever.zet@gmail.com>
 */
class ProphecySubjectPatch implements ClassPatchInterface
{
    
/**
     * Always returns true.
     *
     * @param ClassNode $node
     *
     * @return bool
     */
    
public function supports(ClassNode $node)
    {
        return 
true;
    }

    
/**
     * Apply Prophecy functionality to class node.
     *
     * @param ClassNode $node
     */
    
public function apply(ClassNode $node)
    {
        
$node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface');
        
$node->addProperty('objectProphecyClosure''private');

        foreach (
$node->getMethods() as $name => $method) {
            if (
'__construct' === strtolower($name)) {
                continue;
            }

            if (!
$method->getReturnTypeNode()->hasReturnStatement()) {
                
$method->setCode(
                    
'$this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());'
                
);
            } else {
                
$method->setCode(
                    
'return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());'
                
);
            }
        }

        
$prophecySetter = new MethodNode('setProphecy');
        
$prophecyArgument = new ArgumentNode('prophecy');
        
$prophecyArgument->setTypeNode(new ArgumentTypeNode('Prophecy\Prophecy\ProphecyInterface'));
        
$prophecySetter->addArgument($prophecyArgument);
        
$prophecySetter->setCode(<<<PHP
if (null === \$this->objectProphecyClosure) {
    \$this->objectProphecyClosure = static function () use (\$prophecy) {
        return \$prophecy;
    };
}
PHP
    );

        
$prophecyGetter = new MethodNode('getProphecy');
        
$prophecyGetter->setCode('return \call_user_func($this->objectProphecyClosure);');

        if (
$node->hasMethod('__call')) {
            
$__call $node->getMethod('__call');
        } else {
            
$__call = new MethodNode('__call');
            
$__call->addArgument(new ArgumentNode('name'));
            
$__call->addArgument(new ArgumentNode('arguments'));

            
$node->addMethod($__calltrue);
        }

        
$__call->setCode(<<<PHP
throw new \Prophecy\Exception\Doubler\MethodNotFoundException(
    sprintf('Method `%s::%s()` not found.', get_class(\$this), func_get_arg(0)),
    get_class(\$this), func_get_arg(0)
);
PHP
        );

        
$node->addMethod($prophecySettertrue);
        
$node->addMethod($prophecyGettertrue);
    }

    
/**
     * Returns patch priority, which determines when patch will be applied.
     *
     * @return int Priority number (higher - earlier)
     */
    
public function getPriority()
    {
        return 
0;
    }
}

:: 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.0047 ]--