Uname: Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Software: LiteSpeed
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.213.251.212
Your Ip: 18.222.127.152
User: allssztx (535) | Group: allssztx (533)
Safe Mode: OFF
Disable Function:
NONE

name : Analyzer.php
<?php
/* ===========================================================================
 * Copyright (c) 2018-2021 Zindex Software
 *
 * Licensed under the MIT License
 * =========================================================================== */

namespace Opis\Closure;

use Closure;
use SuperClosure\Analyzer\ClosureAnalyzer;

/**
 * @deprecated We'll remove this class
 */
class Analyzer extends ClosureAnalyzer
{
    /**
     * Analyzer a given closure.
     *
     * @param Closure $closure
     *
     * @return array
     */
    public function analyze(Closure $closure)
    {
        $reflection = new ReflectionClosure($closure);
        $scope = $reflection->getClosureScopeClass();

        $data = [
            'reflection' => $reflection,
            'code'       => $reflection->getCode(),
            'hasThis'    => $reflection->isBindingRequired(),
            'context'    => $reflection->getUseVariables(),
            'hasRefs'    => false,
            'binding'    => $reflection->getClosureThis(),
            'scope'      => $scope ? $scope->getName() : null,
            'isStatic'   => $reflection->isStatic(),
        ];

        return $data;
    }

    /**
     * @param array $data
     * @return mixed
     */
    protected function determineCode(array &$data)
    {
        return null;
    }

    /**
     * @param array $data
     * @return mixed
     */
    protected function determineContext(array &$data)
    {
        return null;
    }

}
© 2025 GrazzMean-Shell