Check if an object property has to be processed by Boomgo

@param ReflectionProperty $property the property to check

@throws RuntimeException If annotation is malformed

@return Boolean True if the property should be stored
171923
private function isBoomgoProperty(\ReflectionProperty $property)
    {
        $propertyName = $property->getName();
        $className = $property->getDeclaringClass()->getName();

        $annotationTag = substr_count($property->getDocComment(), $this->getLocalAnnotation());
        if (0 < $annotationTag) {
            if (1 === $annotationTag) {
                return true;
            }

            throw new \RuntimeException(sprintf('Boomgo annotation tag should occur only once for "%s->%s"', $className, $propertyName));
        }

        return false;
    }
343526
public function isUpdated($property = null)
    {
        if (null === $property) {
            return (count($this->updated) > 0);
        }

        return (isset($this->updated[$property]) && $this->updated[$property] === true);
    }
1154832
public static function readProperty($object, $property, array $access)
    {
        if (AccessInfo::METHOD === $access['type']) {
            $value = $object->{$access['name']}();
        } elseif (AccessInfo::PROPERTY === $access['type']) {
            $value = $object->{$access['name']};
        } elseif (!$access['has_property'] && property_exists($object, $property)) {
            $value = $object->$property;
        } else {
            throw new \RuntimeException($access['name']);
        }

        return $value;
    }
1030984
public static function hasProperty($subject, $property) {
    $rval = false;
    if(property_exists($subject, $property)) {
      $value = $subject->{$property};
      $rval = (!is_array($value) || count($value) > 0);
    }
    return $rval;
  }
1216384
public function hasMeta($property)
    {
        foreach(static::$storage as $meta) {
            if($meta->getProperty() == $property) {
                return true;
            }
        }

        return false;
    }
294534
private function isAssociationField(\ReflectionProperty $field)
    {
        $annotations = $this->reader->getPropertyAnnotations($field);
        foreach ($annotations as $key => $annotationObj) {
            if ($annotationObj instanceof OneToOne || $annotationObj instanceof OneToMany || $annotationObj instanceof ManyToOne || $annotationObj instanceof ManyToMany) {
                return true;
            }
        }

        return false;
    }
203647
private function parseMetadataProperty(\ReflectionProperty $property)
    {
        $metadata = array();
        $tag = '@var';
        $docComment = $property->getDocComment();
        $occurence = (int) substr_count($docComment, $tag);

        if (1 < $occurence) {
            throw new \RuntimeException(sprintf('"@var" tag is not unique for "%s->%s"', $property->getDeclaringClass()->getName(), $property->getName()));
        }

        $metadata['attribute'] = $property->getName();

        // Grep type and optional namespaces
        preg_match('#@var\h+([a-zA-Z0-9\\\\_]+)(?:\h+\[([a-zA-Z0-9\\\\\s,_]+)\]\h*|.*)\v#', $docComment, $captured);

        if (!empty($captured)) {

            // Format var metadata
            $metadata['type'] = $captured[1];

            if (isset($captured[2])) {
                $metadata['mappedClass'] = trim($captured[2]);
            }
        }

        return $metadata;
    }
776644
public function getPropertyAnnotations($property)
    {
        if (!$this->hasProperty($property)) {
            $name = $this->_getReflection()->getName();
            throw new Exception\InvalidArgumentException(
                "The class {$name} doesn't have a property called {$property}"
            );
        }

        if (empty($this->_annotations['properties'][$property])) {
            $comment = $this->_getReflection()
                ->getProperty($property)
                ->getDocComment();
            $data = AnnotationParser::getAnnotations($comment);
            $propertyAnnotations = new AnnotationsList();
            foreach ($data as $property => $parsedData) {
                $propertyAnnotations->append(
                    $this->_createAnnotation($property, $parsedData)
                );
            }
            $this->_annotations['properties'][$property] = $propertyAnnotations;
        }
        return $this->_annotations['properties'][$property];
    }
452219
protected function canDecorate(Property $property)
	{
		$data_type = $property->getDataType();

		if ( !$data_type || $property->isSimpleDataType() || interface_exists($data_type) ) {
			return false;
		}

		if ( !class_exists($data_type) ) {
			$message = '"%s" element not recognised. "%s" class not found';
			throw new PageFactoryException(
				sprintf($message, $property, $data_type),
				PageFactoryException::TYPE_UNKNOWN_CLASS
			);
		}

		return true;
	}
405604
public function get(string $property) {
		
		// since our $errors property is special, we don't want to return it
		// here.  instead, it should be returned when someone calls the validate
		// method below.
		
		return property_exists($this, $property) && $property !== "errors"
			? $this->{$key}
			: null;
	}
895797
public function __isset($property)
    {
        $name = ltrim($property, '_');
        $vars = get_object_vars($this);

        return isset($vars['_'.$name]);
    }
811292
private function getVisibilityStyle(\ReflectionProperty $property)
    {
        if ($property->isPublic()) {
            return self::IS_PUBLIC;
        } elseif ($property->isProtected()) {
            return self::IS_PROTECTED;
        } else {
            return self::IS_PRIVATE;
        }
    }
1271256
protected function processProperty(\ReflectionProperty $property, Definition $definition)
    {
        $annotations = $this->reader->getPropertyAnnotations($property);

        foreach ($annotations as $annotation)
        {
            if ($annotation instanceof AttributeAnnotation) {
                $attribute = $this->createAttributeByProperty($annotation, $property);

                $definition->addAttribute($attribute);
                continue;
            }
        }
    }
1491
public function getProperty(PHPStanClassReflection $reflection, string $property) : PHPStanPropertyReflection
	{
		$native = $reflection->getNativeReflection();
		
		if($native->hasMethod("getter_".$property))
			return $this->getUnderscoreGetter($reflection, $property);
		
		return null;
	}
1063116
private function isPropertyAllowed(PropertyInterface $property, EnvironmentInterface $environment)
    {
        if (!$property->getWidgetType()
            || ('dummyProperty' === $property->getWidgetType())
        ) {
            return false;
        }

        $translator = $environment->getTranslator();

        $extra = (array) $property->getExtra();
        if ($this->isPropertyAllowedByEdit($extra, $environment)
            || $this->isPropertyAllowedByOverride($extra, $environment)
        ) {
            Message::addInfo(
                \sprintf(
                    $translator->translate('MSC.not_allowed_property_info'),
                    $property->getLabel() ?: $property->getName(),
                    $translator->translate('MSC.' . $environment->getInputProvider()->getParameter('mode') . 'Selected')
                )
            );

            return false;
        }

        return $this->isPropertyAllowedByIntersectProperties($property, $environment);
    }
139430
public function __isset($property)
    {
        if (method_exists($this, $getter = 'get' . $property)) {
            return $this->$getter() !== null;
        } else {
            $names = $this->attributeNames();
            return in_array($property, $names);
        }
    }
1098774
public function validProperties(&$property): bool
    {
        $time = time();
        if (isset($property['checkTime']) && $property['checkTime'] == $time) {
            return true;
        }
        $property['checkTime'] = $time;
        if (!isset($property['version']) || !isset($property['debug'])) {
            return false;
        }
        if ($property['version'] !== Sdopx::VERSION || $property['debug'] !== Sdopx::$debug) {
            return false;
        }
        if (isset($property['dependency'])) {
            if (!isset($this->property['dependency'])) {
                $this->property['dependency'] = [];
            }
            $this->property['dependency'] = array_merge($this->property['dependency'], $property['dependency']);
        }
        if (isset($this->property['dependency'])) {
            foreach ($this->property['dependency'] as $item) {
                if (!is_array($item)) {
                    continue;
                }
                $type = $item[0];
                $tpl_name = $item[1];
                $instance = Sdopx::getResource($type);
                $mtime = $instance->getTimestamp($tpl_name, $this->sdopx);
                if ($mtime == 0 || ($mtime >= 0 && $mtime > $item[2])) {
                    return false;
                }
            }
        }
        return true;
    }