Code Duplication    Length = 7-7 lines in 2 locations

Annotation/LiipImagineSerializableField.php 2 locations

@@ 141-147 (lines=7) @@
138
     */
139
    private function checkStringOption($optionName)
140
    {
141
        if (array_key_exists($optionName, $this->options)) {
142
            if (!is_string($this->options[$optionName])) {
143
                throw new \InvalidArgumentException(sprintf('Option "'.$optionName.'" must be a string.'));
144
            }
145
146
            return true;
147
        }
148
149
        return false;
150
    }
@@ 159-165 (lines=7) @@
156
     */
157
    private function checkArrayOption($optionName)
158
    {
159
        if (array_key_exists($optionName, $this->options)) {
160
            if (!is_array($this->options[$optionName]) && !is_string($this->options[$optionName])) {
161
                throw new \InvalidArgumentException(sprintf('Option "'.$optionName.'" must be a array or string.'));
162
            }
163
164
            return true;
165
        }
166
167
        return false;
168
    }