Code Duplication    Length = 3-4 lines in 2 locations

src/TagDependencyTrait.php 2 locations

@@ 82-85 (lines=4) @@
79
            $tag = [];
80
            $changed = false;
81
82
            foreach ($tagFields as $tagField) {
83
                $tag[$tagField] = $this->$tagField;
84
                $changed |= isset($oldfields[$tagField]);
85
            }
86
87
            $tags[] = NamingHelper::getCompositeTag($this->className(), $tag);
88
@@ 92-94 (lines=3) @@
89
            if ($changed)
90
            {
91
                $tag = [];
92
                foreach ($tagFields as $tagField) {
93
                    $tag[$tagField] = isset($oldfields[$tagField]) ? $oldfields[$tagField] : $this->$tagField;
94
                }
95
                $tags[] = NamingHelper::getCompositeTag($this->className(), $tag);
96
            }
97
        }