public static function from(\ReflectionProperty $reflection) : PropertyAccessibility
    {
        if ($reflection->isPublic()) {
            $accessibility = self::ACCESS_PUBLIC;
        } elseif ($reflection->isProtected()) {
            $accessibility = self::ACCESS_PROTECTED;
        } else {
            $accessibility = self::ACCESS_PRIVATE;
        }

        return new self($accessibility, $reflection->getDeclaringClass()->getName());
    }
public static function from(\ReflectionProperty $reflection) : PropertyAccessibility
    {
        if ($reflection->isPublic()) {
            $accessibility = self::ACCESS_PUBLIC;
        } elseif ($reflection->isProtected()) {
            $accessibility = self::ACCESS_PROTECTED;
        } else {
            $accessibility = self::ACCESS_PRIVATE;
        }

        return new self($accessibility, $reflection->getDeclaringClass()->getName());
    }
public static function from ( \ ReflectionProperty $ reflection ) : PropertyAccessibility { if ( $ reflection -> isPublic ( ) ) { $ accessibility = self :: ACCESS_PUBLIC ; } elseif ( $ reflection -> isProtected ( ) ) { $ accessibility = self :: ACCESS_PROTECTED ; } else { $ accessibility = self :: ACCESS_PRIVATE ; } return new self ( $ accessibility , $ reflection -> getDeclaringClass ( ) -> getName ( ) ) ; }
Constructs the property accessibility from the supplied reflection.

@param \ReflectionProperty $reflection

@return PropertyAccessibility
Constructs the property accessibility from the supplied reflection .