blank example

// Constants         if (!isset(self::$cache[$class])) {
            $consts = [];

            foreach ($reflection->getConstants() as $name => $val) {
                // Skip enum constants                 if ($var instanceof UnitEnum && $val instanceof UnitEnum && $o->classname == \get_class($val)) {
                    continue;
                }

                $const = Value::blank($name);
                $const->const = true;
                $const->depth = $o->depth + 1;
                $const->owner_class = $class;
                $const->operator = Value::OPERATOR_STATIC;

                $creflection = new ReflectionClassConstant($class$name);

                $const->access = Value::ACCESS_PUBLIC;
                if ($creflection->isProtected()) {
                    $const->access = Value::ACCESS_PROTECTED;
                } elseif ($creflection->isPrivate()) {
                    
if (isset($param['path'])) {
                $access_path = $param['path'];

                if (!empty($param['expression'])) {
                    $access_path = '('.$access_path.')';
                }
            } else {
                $access_path = '$'.$i;
            }

            $bases[] = Value::blank($name$access_path);
        }

        return $bases;
    }

    /** * Gets call info from the backtrace, alias, and argument count. * * Aliases must be normalized beforehand (Utils::normalizeAliases) * * @param array $aliases Call aliases as found in Kint::$aliases * @param array[] $trace Backtrace * @param array $args Arguments * * @return array Call info */
if (!$var instanceof UnitEnum) {
            return;
        }

        $class = \get_class($var);

        if (!isset(self::$cache[$class])) {
            $cases = new Representation('Enum values', 'enum');
            $cases->contents = [];

            foreach ($var->cases() as $case) {
                $base_obj = Value::blank($class.'::'.$case->name, '\\'.$class.'::'.$case->name);
                $base_obj->depth = $o->depth + 1;

                if ($var instanceof BackedEnum) {
                    $c = $case->value;
                    $cases->contents[] = $this->parser->parse($c$base_obj);
                } else {
                    $cases->contents[] = $base_obj;
                }
            }

            self::$cache[$class] = $cases;
        }
$statics = [];

        if ($v = $closure->getClosureThis()) {
            $statics = ['this' => $v];
        }

        if (\count($statics = $statics + $closure->getStaticVariables())) {
            $statics_parsed = [];

            foreach ($statics as $name => &$static) {
                $obj = Value::blank('$'.$name);
                $obj->depth = $o->depth + 1;
                $statics_parsed[$name] = $this->parser->parse($static$obj);
                if (null === $statics_parsed[$name]->value) {
                    $statics_parsed[$name]->access_path = null;
                }
            }

            $r = new Representation('Uses');
            $r->contents = $statics_parsed;
            $o->addRepresentation($r, 0);
        }
    }
// @codeCoverageIgnoreStart             // All of this is irellevant after 8.1,             // we have separate logic for that below
            $param = $var->{$obj->name};

            if (null === $param) {
                continue;
            }

            $base = Value::blank($obj->name, $obj->access_path);

            $base->depth = $obj->depth;
            $base->owner_class = $obj->owner_class;
            $base->operator = $obj->operator;
            $base->access = $obj->access;
            $base->reference = $obj->reference;

            $o->value->contents[$key] = $this->parser->parse($param$base);

            // @codeCoverageIgnoreEnd         }

        
Home | Imprint | This part of the site doesn't use cookies.