PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 3.1.0
Defender Security – Malware Scanner, Login Security & Firewall v3.1.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / vendor / opis / closure / src / Analyzer.php

Analyzer.php in Defender Security – Malware Scanner, Login Security & Firewall 3.1.0, at vendor/opis/closure/src/Analyzer.php

63 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /* ===========================================================================
3 * Copyright (c) 2018-2021 Zindex Software
4 *
5 * Licensed under the MIT License
6 * =========================================================================== */
7
8 namespace Opis\Closure;
9
10 use Closure;
11 use SuperClosure\Analyzer\ClosureAnalyzer;
12
13 /**
14 * @deprecated We'll remove this class
15 */
16 class Analyzer extends ClosureAnalyzer
17 {
18 /**
19 * Analyzer a given closure.
20 *
21 * @param Closure $closure
22 *
23 * @return array
24 */
25 public function analyze(Closure $closure)
26 {
27 $reflection = new ReflectionClosure($closure);
28 $scope = $reflection->getClosureScopeClass();
29
30 $data = [
31 'reflection' => $reflection,
32 'code' => $reflection->getCode(),
33 'hasThis' => $reflection->isBindingRequired(),
34 'context' => $reflection->getUseVariables(),
35 'hasRefs' => false,
36 'binding' => $reflection->getClosureThis(),
37 'scope' => $scope ? $scope->getName() : null,
38 'isStatic' => $reflection->isStatic(),
39 ];
40
41 return $data;
42 }
43
44 /**
45 * @param array $data
46 * @return mixed
47 */
48 protected function determineCode(array &$data)
49 {
50 return null;
51 }
52
53 /**
54 * @param array $data
55 * @return mixed
56 */
57 protected function determineContext(array &$data)
58 {
59 return null;
60 }
61
62 }
63