Set our $plugin static property to this class so that it can be accessed via
Snitch::$plugin
331612
public function init()
    {
        parent::init();
        self::$plugin = $this;
        $this->setComponents([
            'collision' => \marionnewlevant\snitch\services\Collision::class,
        ]);
        if (Craft::$app->getRequest()->getIsCpRequest() && !Craft::$app->getUser()->getIsGuest() && !Craft::$app->getRequest()->getIsAjax()) {
            // Register our asset bundle
            Craft::$app->getView()->registerAssetBundle(SnitchAsset::class);
            // on save, remove any collision for this element.
            Event::on(Elements::class, Elements::EVENT_AFTER_SAVE_ELEMENT, function(ElementEvent $event) {
                $elementId = $event->element->id;
                $this->collision->remove($elementId);
            });
        }
    }
778766
public function setStatic($is_static) {
    if ($is_static) {
      if (!isset($this->static)) {
        $this->static = Token::_static();
        $this->visibility->after([Token::space(), $this->static]);
      }
    }
    else {
      if (isset($this->static)) {
        // Remove whitespace after static keyword.
        $this->static->next()->remove();
        // Remove static keyword.
        $this->static->remove();
      }
    }
    return $this;
  }
1272707
static function fromValue($value)
    {
        $key = self::getKey($value);

        return self::$instanceCache[static::class][$key]
            ?? (self::$instanceCache[static::class][$key] = new static($key, static::getValue($key)));
    }
1317208
static function executeInputHandlers( &$module, &$class, $object, &$version, $contentObjectAttributes, $editVersion, $editLanguage, $fromLanguage )
    {
        $http = eZHTTPTool::instance();
        $functionName = 'fetchInput';
        $params = array( $http,
                         &$module,
                         &$class,
                         $object,
                         &$version,
                         $contentObjectAttributes,
                         $editVersion,
                         $editLanguage,
                         $fromLanguage );

       self::executeHandlerFunction( $functionName, $params );
    }
1029586
static function _ (Component $parent, array $props = null, array $bindings = null)
  {
    return (string)static::create ($parent, $props, $bindings);
  }
768822
function protectStaticProperty(name, meta, constructor) {
        constructor[cacheKeyword].properties[name] = meta.value;

        if (meta.isPrivate) {
            Object.defineProperty(constructor, name, {
                get: function get() {
                    var currCaller = process._dejavu.caller;

                    if (currCaller && (currCaller.method[$name] || currCaller.method[$anonymous]) && meta.allowed === currCaller.constructorId) {
                        return constructor[cacheKeyword].properties[name];
                    }

                    throw new Error('Cannot access private static property "' + name + '" of class "' + constructor.prototype.$name + '".');
                },
                set: meta.isConst ?
                        function () {
                            throw new Error('Cannot change value of constant property "' + name + '" of class "' + constructor.prototype.$name + '".');
                        } :
                        function set(newVal) {
                            var currCaller = process._dejavu.caller;

                            if (currCaller && (currCaller.method[$name] || currCaller.method[$anonymous]) && meta.allowed === currCaller.constructorId) {
                                constructor[cacheKeyword].properties[name] = newVal;
                            } else {
                                throw new Error('Cannot set private property "' + name + '" of class "' + constructor.prototype.$name + '".');
                            }
                        },
                configurable: false,
                enumerable: true
            });
        } else if (meta.isProtected) {
            Object.defineProperty(constructor, name, {
                get: function get() {
                    var currCaller = process._dejavu.caller;

                    if (currCaller && (currCaller.method[$name] || currCaller.method[$anonymous]) && (contains(meta.allowed, currCaller.constructorId) || constructor.prototype instanceof currCaller.constructor)) {
                        return constructor[cacheKeyword].properties[name];
                    }

                    throw new Error('Cannot access protected static property "' + name + '" of class "' + constructor.prototype.$name + '".');
                },
                set: meta.isConst ?
                        function () {
                            throw new Error('Cannot change value of constant property "' + name + '" of class "' + constructor.prototype.$name + '".');
                        } :
                        function set(newVal) {
                            var currCaller = process._dejavu.caller;

                            if (currCaller && (currCaller.method[$name] || currCaller.method[$anonymous]) && (contains(meta.allowed, currCaller.constructorId) || constructor.prototype instanceof currCaller.constructor)) {
                                constructor[cacheKeyword].properties[name] = newVal;
                            } else {
                                throw new Error('Cannot set protected static property "' + name + '" of class "' + constructor.prototype.$name + '".');
                            }
                        },
                configurable: false,
                enumerable: true
            });
        } else if (meta.isConst) {
            Object.defineProperty(constructor, name, {
                get: function () {
                    return constructor[cacheKeyword].properties[name];
                },
                set: function () {
                    throw new Error('Cannot change value of constant property "' + name + '" of class "' + constructor.prototype.$name + '".');
                },
                configurable: false,
                enumerable: true
            });
        }
    }
156620
function $$(instance, Clazz, ctor, args) {
                return instanceSingleton ||( instanceSingleton = new ria.__API.init(instance, Clazz, ctor, args));
            }
820504
function protectInstance(instance) {
        var key;

        obfuscateProperty(instance, cacheKeyword, { properties: {}, methods: {} });
        obfuscateProperty(instance, redefinedCacheKeyword, { properties: {}, methods: {} }); // This is for the inspect

        for (key in instance.$static[$class].methods) {
            protectMethod(key, instance.$static[$class].methods[key], instance);
        }

        for (key in instance.$static[$class].properties) {
            protectProperty(key, instance.$static[$class].properties[key], instance);
        }
    }
662754
def static(cls):
  
  """
  for attr in dir(cls):
      im_func = getattr(getattr(cls, attr), 'im_func', None)
      if im_func:
        setattr(cls, attr, staticmethod(im_func))

  return cls
1020493
public function init()
    {
        $enumRefl = new ReflectionClass(Enum::class);
        $enumPropsRefl = $enumRefl->getProperties(ReflectionProperty::IS_STATIC);
        foreach ($enumPropsRefl as $enumPropRefl) {
            $enumPropRefl->setAccessible(true);
            $this->enumPropsRefl[$enumPropRefl->getName()] = $enumPropRefl;
        }

        $this->names       = Enum66::getNames();
        $this->values      = Enum66::getValues();
        $this->ordinals    = Enum66::getOrdinals();
        $this->enumerators = Enum66::getEnumerators();
    }
1203527
static function instance( $input_charset_code, $output_charset_code )
    {
        $globalsKey = "eZMBStringMapper-$input_charset_code-$output_charset_code";

        if ( !isset( $GLOBALS[$globalsKey] ) ||
             !( $GLOBALS[$globalsKey] instanceof eZMBStringMapper ) )
        {
            $GLOBALS[$globalsKey] = new eZMBStringMapper( $input_charset_code, $output_charset_code );
        }

        return $GLOBALS[$globalsKey];
    }
264815
public function assignStaticProperty($variable = null, $property = null, AbstractBuilder $expression = null)
    {
        $assignProperty = $this->assignProperty($variable, $property, $expression);
        $assignProperty->setType($assignProperty::TYPE_ASSIGN_STATIC_PROPERTY);

        return $assignProperty;
    }
648143
static function setCurrentEnvironment($environment)
    {
        if ( is_string($environment) && !class_exists($environment) )
            return static::setAlias($environment, static::CURRENT_NAME);
 

        static::register($environment, static::CURRENT_NAME);
    }
473953
static function info($property = false) {
      if(self::$info_response === false) {
        self::$info_response = self::call('info');
      } // if

      if($property) {
        return isset(self::$info_response[$property]) && self::$info_response[$property] ? self::$info_response[$property] : null;
      } else {
        return self::$info_response;
      } // if
    }
1049830
public static function initialize() {
		foreach ( static::$core_types as $name => $class ) {
			static::register( $name, new $class );
		}

		foreach ( static::$bindings as $name => $binding ) {
			if ( ! static::resolved( $name ) ) {
				static::fire( $name, $binding['callback'], $binding['sanitizer'] );

				static::$resolved[ $name ] = true;
			}
		}

		// Print the field type JS templates.
		if ( count( static::$instances ) > 0 ) {
			add_action( 'admin_footer', [ __CLASS__, 'print_js_templates' ], 20 );
		}
	}
407531
public static function __static()
	{
		InstanceFactsIterator::$itemSubstitutionGroup = array( \XBRL_Constants::$xbrliItem );
		InstanceFactsIterator::$tupleSubstitutionGroup = array( \XBRL_Constants::$xbrliTuple );
		InstanceFactsIterator::$nodeTest = XmlQualifiedNameTest::create( "substitutionGroup" );
	}
192133
static function FromString($json)
    {
        $jsonObj = @\json_decode($json);
        if (!is_a($jsonObj, 'stdClass')) {
            return null; 
        }
        $result = new static();
        $class = new \ReflectionClass($result);
        $props = $class->getProperties(\ReflectionProperty::IS_PUBLIC & ~ \ReflectionProperty::IS_STATIC);
        foreach ($props as $prop) {
            $name = $prop->getName();
            if (isset($jsonObj->$name)) {
                $prop->setValue($result, $jsonObj->$name);
            }
        }
        return $result;
    }