Code Duplication    Length = 3-7 lines in 3 locations

src/Tokens/Attribute.php 3 locations

@@ 111-117 (lines=7) @@
108
        }
109
110
        // Remove non-standard attributes.
111
        if ($configuration->get(
112
                'clean-strategy'
113
            ) !== Configuration::CLEAN_STRATEGY_LENIENT && $this->isStandard === false) {
114
            $logger->debug('Removing non-standard attribute "' . $this->name . '" from ' . $element);
115
116
            return false;
117
        }
118
119
        // Validate attribute value.
120
        list($caseSensitivity, $attributeType) = explode('_', $this->type);
@@ 203-205 (lines=3) @@
200
    private function cleanAttributeInteger(Configuration $configuration, Element $element, LoggerInterface $logger)
201
    {
202
        if ($this->value === true || $this->value == '') {
203
            if ($configuration->get('clean-strategy') !== Configuration::CLEAN_STRATEGY_LENIENT) {
204
                $logger->debug(
205
                    'Within ' . $element . ', the value for the attribute "' . $this->name . '" is required to be an positive, non-zero integer.  The value is invalid, therefore the attribute has been removed.'
206
                );
207
            }
208
@@ 222-227 (lines=6) @@
219
            }
220
        }
221
222
        if ($this->value <= 0 && $configuration->get('clean-strategy') !== Configuration::CLEAN_STRATEGY_LENIENT) {
223
            $logger->debug(
224
                'Within ' . $element . ', the value for the attribute "' . $this->value . '" is required to be an positive, non-zero integer.  The value is invalid, therefore the attribute has been removed.'
225
            );
226
227
            return false;
228
        }
229
230
        return true;