@param string $visibility

@return PropertyInformation
556377
public function limitMaximumAddVisibility(string $visibility): self
    {
        $this->generate_add = Generate::getMostLimitedVisibility($this->generate_add, $visibility);

        return $this;
    }
1194112
public static function getVisibility(Node\Stmt\Property $property): int
    {
        if ($property->isPrivate()) {
            return VisibilityInterface::PRIVATE;
        }
        if ($property->isProtected()) {
            return VisibilityInterface::PROTECTED;
        }
        return VisibilityInterface::PUBLIC;
    }
208883
private function makePropertyInvisibleByPalette(
        DataDefinition\Definition\Properties\PropertyInterface $property,
        EnvironmentInterface $environment
    ) {
        $palettes = $environment->getDataDefinition()->getPalettesDefinition();

        foreach ($palettes->getPalettes() as $palette) {
            foreach ($palette->getLegends() as $legend) {
                if (!$legend->hasProperty($property->getName())) {
                    continue;
                }

                $visibleCondition = new PropertyTrueCondition('dummyNotVisible');

                $invisibleProperty = $legend->getProperty($property->getName());
                $conditions        = $invisibleProperty->getVisibleCondition();

                $conditions->addCondition($visibleCondition);
            }
        }
    }
1135341
@SuppressWarnings("unchecked")
    public <T extends WebLocatorAbstractBuilder> T setVisibility(final boolean visibility) {
        pathBuilder.setVisibility(visibility);
        return (T) this;
    }
780722
public function setIdentityProperty($property)
    {
        $this->_identity_property = null;

        if (is_string($property)) {
            $property = $this->getProperty($property);
        }

        if ($property) {
            //an identitying property can be used as
            //an identifying property
            $this->addIdentifyingProperty($property);

            //don't allow direct write
            $property->setWriteAccess(AnDomain::ACCESS_PRIVATE);

            $this->_identity_property = $property;
        }

        return $this;
    }
402519
public function setVisibility(string $visibility) {
		if ($visibility !== self::VISIBILITY_PRIVATE
				&& $visibility !== self::VISIBILITY_PROTECTED
				&& $visibility !== self::VISIBILITY_PUBLIC) {
			throw new \InvalidArgumentException(sprintf('The visibility "%s" does not exist.', $visibility));
		}

		$this->visibility = $visibility;

		return $this;
	}
741222
private function getVisibilityConditionChain($property)
    {
        if (($chain = $property->getVisibleCondition())
            && ($chain instanceof PropertyConditionChain)
            && $chain->getConjunction() === PropertyConditionChain::AND_CONJUNCTION
        ) {
            return $chain;
        }

        $newChain = new PropertyConditionChain($chain ? [$chain] : []);
        $property->setVisibleCondition($newChain);

        return $newChain;
    }
180692
protected function parseVisibility( $visibility )
	{
		if ( is_null( $visibility ) )
			return null;

		switch ( $visibility )
		{
			case FilesystemContract::VISIBILITY_PUBLIC:
				return AdapterInterface::VISIBILITY_PUBLIC;
			case FilesystemContract::VISIBILITY_PRIVATE:
				return AdapterInterface::VISIBILITY_PRIVATE;
		}

		throw new InvalidArgumentException( 'Unknown visibility: ' . $visibility );
	}
1247004
public function filter($value)
    {
        if ($value instanceof VisibilityInterface
            && !$this->builder->isVisibilityAllowed($value->getVisibility())
        ) {
            return null;
        }

        return $value;
    }
340973
public function getProperty(string $property)
  {
    if (\property_exists(__CLASS__, $property)) {
      return $this->$property;
    }

    return $this->container($property) ?? null;
  }
600045
public function create($data)
    {
        $propertyDescriptor = new PropertyDescriptor();
        $propertyDescriptor->setFullyQualifiedStructuralElementName($data->getName());
        $propertyDescriptor->setName($data->getShortName());
        $propertyDescriptor->setVisibility($data->getVisibility() ?: 'public');
        $propertyDescriptor->setStatic($data->isStatic());
        $propertyDescriptor->setDefault($data->getDefault());

        $this->assembleDocBlock($data->getDocBlock(), $propertyDescriptor);
        $propertyDescriptor->setLine($data->getLinenumber());

        return $propertyDescriptor;
    }
111840
protected function getProperty($value) {
        $prop = $this->reflectionClass->getProperty($value);
        $prop->setAccessible(true);
        return $prop;
    }
1067648
public function visible($visible = [], $override = false)
    {
        $this->visible = $override ? $visible : array_merge($this->visible, $visible);

        return $this;
    }
443777
private function getAccessibleProperty(ReflectionProperty $property)
    {
        return $this->reflectionService->getAccessibleProperty(
            $property->getDeclaringClass()->getName(),
            $property->getName()
        );
    }
1340357
public static function setVisibility(string $path, string $visibility)
    {
        $type = is_dir($path) ? 'dir' : 'file';
        $success = chmod($path, Filesystem::$permissions[$type][$visibility]);

        if ($success === false) {
            return false;
        }

        return true;
    }
285744
static Visibility getOverriddenPropertyVisibility(ObjectType objectType, String propertyName) {
    return objectType != null
        ? objectType.getOwnPropertyJSDocInfo(propertyName).getVisibility()
        : Visibility.INHERITED;
  }
54597
public static function getConstantsForNamespace($namespace_name, $visibility)
    {
        // @todo this does not allow for loading in namespace constants not already defined in the current sweep
        if (!isset(self::$public_namespace_constants[$namespace_name])) {
            self::$public_namespace_constants[$namespace_name] = [];
        }

        if ($visibility === \ReflectionProperty::IS_PUBLIC) {
            return self::$public_namespace_constants[$namespace_name];
        }

        throw new \InvalidArgumentException('Given $visibility not supported');
    }