!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/laravel-crm/vendor/ta-tikoma/phpunit-architecture-test/src/Elements/   drwxrwxrwx
Free 12.95 GB of 57.97 GB (22.34%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

declare(strict_types=1);

namespace 
PHPUnit\Architecture\Elements;

use 
Exception;
use 
Error;
use 
PhpParser\Node;
use 
PHPUnit\Architecture\Enums\ObjectType;
use 
PHPUnit\Architecture\Services\ServiceContainer;
use 
ReflectionClass;
use 
ReflectionException;

abstract class 
ObjectDescriptionBase
{
    
/**
     * The list of namespaces to ignore.
     *
     * @var array<int, string>
     */
    
private static iterable $ignore = [
        
'Symfony\Component\Console\Tester',
    ];

    public 
ObjectType $type;

    public 
string $path;

    
/**
     * @var class-string<mixed>
     */
    
public string $name;

    
/**
     * @var Node[]
     */
    
public array $stmts;

    public 
ReflectionClass $reflectionClass// @phpstan-ignore-line

    
public static function make(string $path): ?self
    
{
        
$ast null;
        
$content file_get_contents($path);
        if (
$content === false) {
            throw new 
Exception("Path: '{$path}' not found");
        }

        try {
            
$ast ServiceContainer::$parser->parse($content);
        } catch (
Exception $e) {

            if (
ServiceContainer::$showException) {
                echo 
"Path: $path Exception: {$e->getMessage()}";
            }
        }

        if (
$ast === null) {
            return 
null;
        }

        
$stmts ServiceContainer::$nodeTraverser->traverse($ast);

        
/** @var Node\Stmt\Class_|Node\Stmt\Trait_|Node\Stmt\Interface_|Node\Stmt\Enum_|null $object */
        
$object ServiceContainer::$nodeFinder->findFirst($stmts, function (Node $node) {
            return 
$node instanceof Node\Stmt\Class_
                
|| $node instanceof Node\Stmt\Trait_
                
|| $node instanceof Node\Stmt\Interface_
                
|| $node instanceof Node\Stmt\Enum_
                
//
            
;
        });

        if (
$object === null) {
            return 
null;
        }

        if (!
property_exists($object'namespacedName')) {
            return 
null;
        }

        if (
$object->namespacedName === null) {
            return 
null;
        }

        
$description = new static(); // @phpstan-ignore-line

        
if ($object instanceof Node\Stmt\Class_) {
            
$description->type ObjectType::_CLASS;
        } elseif (
$object instanceof Node\Stmt\Trait_) {
            
$description->type ObjectType::_TRAIT;
        } elseif (
$object instanceof Node\Stmt\Interface_) {
            
$description->type ObjectType::_INTERFACE;
        } elseif (
$object instanceof Node\Stmt\Enum_) {
            
$description->type ObjectType::_ENUM;
        }

        
/** @var class-string $className */
        
$className $object->namespacedName->toString();

        
$description->path            $path;
        
$description->name            $className;
        
$description->stmts           $stmts;

        foreach (
self::$ignore as $ignore) {
            if (
str_starts_with($className$ignore)) {
                return 
null;
            }
        }

        try {
            
$description->reflectionClass = new ReflectionClass($description->name);
        } catch (
Error|ReflectionException) { // @phpstan-ignore-line when class by className not loaded
            
return null;
        }

        return 
$description;
    }

    public function 
__toString()
    {
        return 
$this->name;
    }
}

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