Code Duplication    Length = 3-3 lines in 2 locations

src/Goetas/TwitalBundle/Attribute/TranslateAttrAttribute.php 1 location

@@ 34-36 (lines=3) @@
31
32
            $attrExpr = ParserHelper::staticSplitExpression($expression, ":");
33
34
            if (!$node->hasAttribute($attrExpr[0])) {
35
                throw new \Exception("Can't find the attribute named '" . $attrExpr[0] . "'");
36
            }
37
38
            $attNode = $node->getAttributeNode($attrExpr[0]);
39

src/Goetas/TwitalBundle/Attribute/TranslateAttrNAttribute.php 1 location

@@ 34-36 (lines=3) @@
31
32
            $attrExpr = ParserHelper::staticSplitExpression($expression, ":", 2);
33
34
            if (!$node->hasAttribute($attrExpr[0])) {
35
                throw new \Exception("non trovo l'attributo " . $attrExpr[0] . " da tradurre");
36
            }
37
            $attNode = $node->getAttributeNode($attrExpr[0]);
38
39
            $transParams = isset($attrExpr[1]) ? trim($attrExpr[1], "\n\t\r []") : array();