Check if a property is statically invokable in the final object

Returns `false` if property access was direct and its scope is not static & public.

@param string $name The property name
@return bool
493575
private static function __isInvokableStatic($name)
    {
        $classname = get_called_class();
        $reflection_class = new ReflectionClass($classname);
        $properties = $reflection_class->getStaticProperties();
        $property = self::findPropertyNameStatic($name, $classname);
        if (!empty($property)) {
            $reflection = new ReflectionProperty($classname, $property);
            return (bool) !($reflection->isPrivate());
        }
        return true;
    }
893041
public function isEnabled($name)
    {
        foreach ($this->modules as $module) {
            if ($name === $module->title) {
                return true;
            }
        }
        return false;
    }
1268818
public function hasProperty(string $name): bool
    {
        if ($this->properties->containValue($this->environment, $name)) {
            return true;
        }

        return $this->properties->containValue('config', $name);
    }
559585
public function __isset(string $name): bool
    {
        return in_array($name, static::getInstanceProperties()) && $this->$name !== null;
    }
365152
public function hasDirective($name)
    {
        $inSubDirective = false;

        foreach ($this->directives as $directive) {
            if ($directive->getName() == $name) {
                return true;
            }

            $inSubDirective = $this->hasInnerDirective($name, $inSubDirective, $directive);
        }

        return $inSubDirective;
    }
388530
public function __isset( $name )
    {
        switch ( $name )
        {
            case 'boundary':
            case 'noMimeMessage':
                return isset( $this->properties[$name] );

            default:
                return parent::__isset( $name );
        }
    }
504447
public function hasMethod($name)
    {
        try {
            $method = new ReflectionMethod($this, $name);
            if (!$method->isPublic()) {
                return false;
            }

            return $method->getDeclaringClass()->name !== 'Cake\Console\Shell';
        } catch (ReflectionException $e) {
            return false;
        }
    }
756991
public function hasWritableProperty( string $name, &$setterName ) : bool
   {

      if ( \in_array( $name, $this->ignoreSetProperties ) )
      {
         return false;
      }

      $setterName = 'set' . \ucfirst( $name );

      return \method_exists( $this, $setterName );

   }
417987
public function isLocked($name)
    {
        if ($this->acquireLock($name, false)) {
            return !$this->releaseLock($name);
        }

        return true;
    }
1061944
public function can($name)
    {
        foreach ($this->permissions as $permission) {
            if ($permission->name == $name || $permission->id == $name) {
                return true;
            }
        }

        return false;
    }
1076959
public function has(string $name): bool
    {
        $name = $this->getDefinitiveName($name);

        return isset($this->instances[$name]);
    }
1139911
protected function hasInternalMethod(string $name) : bool
    {
        static $methods = [];

        $class = get_class($this);
        if (isset($methods[$class][$name])) {
            return $methods[$class][$name];
        }

        $hasMethod = (new ReflectionClass($this))->hasMethod($name);
        $methods[$class][$name] = $hasMethod;

        return $hasMethod;
    }
841034
public function __isset($name)
    {
        $rc = new ReflectionClass(get_class($this));
        $privName = '_' . $name;
        if (!($rc->hasProperty($privName))) {
            require_once 'Zend/Gdata/App/InvalidArgumentException.php';
            throw new Zend_Gdata_App_InvalidArgumentException(
                    'Property ' . $name . ' does not exist');
        } else {
            if (isset($this->{$privName})) {
                if (is_array($this->{$privName})) {
                    if (count($this->{$privName}) > 0) {
                        return true;
                    } else {
                        return false;
                    }
                } else {
                    return true;
                }
            } else {
                return false;
            }
        }
    }
715330
public function __isset($name)
    {
        if ($method = $this->getPresenterMethodFromVariable($name)) {
            $result = $this->$method();

            return isset($result);
        }

        if (is_array($this->object)) {
            return isset($this->object[$name]);
        }

        return isset($this->object->$name);
    }
826856
private function __isStatic($name)
    {
        $property = $this->findPropertyName($name);
        if (!empty($property)) {
            $reflection = new ReflectionProperty(get_class($this), $property);
            return $reflection->isStatic();
        }
        return true;
    }
1172256
public function isUsed(string $name): bool
    {
        if (in_array($name, $this->usages)) {
            return true;
        }

        foreach ($this->children as $child) {
            if (!$child->isIsolated() && $child->isUsed($name)) {
                return true;
            }
        }

        return false;
    }
440547
public static function hasAdapter(string $name): bool
    {
        return isset(static::$adapters[$name]) && static::$adapters[$name] instanceof AbstractAdapter;
    }