!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/Asserts/Dependencies/   drwxrwxrwx
Free 13.18 GB of 57.97 GB (22.73%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

declare(strict_types=1);

namespace 
PHPUnit\Architecture\Asserts\Dependencies;

use 
Throwable;
use 
PhpParser\Node;
use 
PHPUnit\Architecture\Asserts\Dependencies\Elements\ObjectUses;
use 
PHPUnit\Architecture\Elements\ObjectDescriptionBase;
use 
PHPUnit\Architecture\Services\ServiceContainer;
use 
phpDocumentor\Reflection\Type;
use 
phpDocumentor\Reflection\Types\AggregatedType;
use 
phpDocumentor\Reflection\Types\Array_;
use 
PHPUnit\Architecture\Elements\ObjectDescription;

/**
 * Describe object dependencies
 */
abstract class ObjectDependenciesDescription extends ObjectDescriptionBase
{
    public 
ObjectUses $uses;

    public static function 
make(string $path): ?self
    
{
        
/** @var ObjectDescription|null $description */
        
$description parent::make($path);
        if (
$description === null) {
            return 
null;
        }

        
/** @var Node\Name [] $names */
        
$names ServiceContainer::$nodeFinder->findInstanceOf(
            
$description->stmts,
            
Node\Name::class
        );

        
$names array_values(array_filter($names, static function (Node\Name $name) {
            
$nameAsString $name->toString();

            try {
                return match (
true) {
                    
function_exists($nameAsString) => true,
                    
enum_exists($nameAsString) => true,
                    
class_exists($nameAsString) => true,
                    
interface_exists($nameAsString) => true,
                    
trait_exists($nameAsString) => true,

                    default => 
false,
                };
            } catch (
Throwable) {
                return 
false;
            }
        }));

        
$description->uses = new ObjectUses(
            
array_map(
                static function (
Node\Name $nodeName): string {
                    
$name $nodeName->toCodeString();
                    if (
$name[0] !== '\\') {
                        return 
$name;
                    }
                    return 
substr($name1);
                },
                
$names
            
)
        );

        return 
$description;
    }

    
/**
     * @return string|string[]|null
     */
    
public function getDocBlockTypeWithNamespace(
        
Type $type
    
): string|array|null {
        
$result = [];
        if (
$type instanceof AggregatedType) {
            foreach (
$type as $_type) {
                
/** @var Type $_type */
                
$t $this->getDocBlockTypeWithNamespace($_type);
                if (
$t !== null) {
                    
$result[] = $t;
                }
            }
        }

        if (
$type instanceof Array_) {
            
/**
             * @todo
             *
             * $result[] = $this->getDocBlockTypeWithNamespace($type->getKeyType());
             * $result[] = $this->getDocBlockTypeWithNamespace($type->getValueType());
             */
        
}

        
// @todo
        
if (count($result) !== 0) {
            
$_result = [];
            foreach (
$result as $item) {
                if (
is_array($item)) {
                    
$_result array_merge($_result$item);
                } else {
                    
$_result[] = $item;
                }
            }

            return 
$_result;
        }

        return 
$this->uses->getByName((string) $type) ?? (string) $type;
    }
}

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