Code Duplication    Length = 18-21 lines in 2 locations

src/AppserverIo/Routlt/Annotations/Action.php 1 location

@@ 65-82 (lines=18) @@
62
     *
63
     * @param array $values The annotation values
64
     */
65
    public function __construct(array $values = array())
66
    {
67
68
        // set the name attribute, if available
69
        if (isset($values[AnnotationKeys::NAME])) {
70
            $this->name = $values[AnnotationKeys::NAME];
71
        }
72
73
        // set the restrictions attribute, if available
74
        if (isset($values[AnnotationKeys::RESTRICTIONS])) {
75
            $this->restrictions = $values[AnnotationKeys::RESTRICTIONS];
76
        }
77
78
        // set the defaults attribute, if available
79
        if (isset($values[AnnotationKeys::DEFAULTS])) {
80
            $this->defaults = $values[AnnotationKeys::DEFAULTS];
81
        }
82
    }
83
84
    /**
85
     * Returns the value of the name attribute.

src/AppserverIo/Routlt/Annotations/Result.php 1 location

@@ 67-87 (lines=21) @@
64
     *
65
     * @param array $values The annotation values
66
     */
67
    public function __construct(array $values = array())
68
    {
69
70
        // set the type attribute, if available
71
        if (isset($values[AnnotationKeys::TYPE])) {
72
            $this->type = $values[AnnotationKeys::TYPE];
73
        }
74
75
        // set the code attribute, if available
76
        if (isset($values[AnnotationKeys::CODE])) {
77
            $this->code = $values[AnnotationKeys::CODE];
78
        }
79
80
        // set the result attribute, if available
81
        if (isset($values[AnnotationKeys::RESULT])) {
82
            $this->result = $values[AnnotationKeys::RESULT];
83
        }
84
85
        // pass the arguements through to the parent instance
86
        parent::__construct($values);
87
    }
88
89
    /**
90
     * Returns the value of the type attribute.