<commit_before><?php

/*
 * This file is part of the Orchestra project.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace RomaricDrigon\OrchestraBundle\Annotation;
use RomaricDrigon\OrchestraBundle\Exception\AnnotationWithoutValueException;
use RomaricDrigon\OrchestraBundle\Exception\AnnotationInvalidOption;

/**
 * Class AbstractAnnotation
 * Allow to create annotation in the form @ Annotation("value", option1="value1"...)
 *
 * @author <NAME> <<EMAIL>>
 */
abstract class AbstractAnnotation
{
    /**
     * Will build annotation, using extending class setters to set options of the annotation
     *
     * @param array $options
     * @throws \InvalidArgumentException if our Annotation has options not allowed
     * @throws AnnotationWithoutValueException if our Annotation has a value and it shouldn't
     */
    public function __construct($options)
    {
        // Parse if our Annotation has a value
        if (isset($options['value'])) {
            $property = $this->getValueProperty();

            if (false === $property) {
                $reflect = new \ReflectionClass($this);
                $annotationName = $reflect->getShortName();

                throw new AnnotationWithoutValueException($annotationName);<commit_msg>Updated PHPDoc<commit_after><?php

/*
 * This file is part of the Orchestra project.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace RomaricDrigon\OrchestraBundle\Annotation;
use RomaricDrigon\OrchestraBundle\Exception\AnnotationWithoutValueException;
use RomaricDrigon\OrchestraBundle\Exception\AnnotationInvalidOption;

/**
 * Class AbstractAnnotation
 * Allow to create annotation in the form @ Annotation("value", option1="value1"...)
 *
 * @author <NAME> <<EMAIL>>
 */
abstract class AbstractAnnotation
{
    /**
     * Will build annotation, using extending class setters to set options of the annotation
     *
     * @param array $options
     * @throws AnnotationInvalidOption if our Annotation has options not allowed
     * @throws AnnotationWithoutValueException if our Annotation has a value and it shouldn't
     */
    public function __construct($options)
    {
        // Parse if our Annotation has a value
        if (isset($options['value'])) {
            $property = $this->getValueProperty();

            if (false === $property) {
                $reflect = new \ReflectionClass($this);
                $annotationName = $reflect->getShortName();

                throw new AnnotationWithoutValueException($annotationName);
{'fraction_non_alphanumeric': 0.09104422147900408, 'fraction_numerical': 0.0014864362690449647, 'mean_word_length': 3.3349436392914655, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7638157', 'n_tokens_mistral': 672, 'n_tokens_neox': 654, 'n_words': 224}