Code Duplication    Length = 15-15 lines in 2 locations

Bundle/WidgetMapBundle/Tests/Builder/WidgetMapBuilderTest.php 1 location

@@ 81-95 (lines=15) @@
78
     * @param integer $id
79
     * @param null|WidgetMap $parent
80
     */
81
    protected function newWidgetMap($id, $parent, $position, View $view, Widget $widget)
82
    {
83
        $widgetMap = new WidgetMap();
84
        $widgetMap->setId($id);
85
        if ($parent) {
86
            $widgetMap->setParent($parent);
87
            $parent->addChild($widgetMap);
88
        }
89
        $widgetMap->setPosition($position);
90
        $widgetMap->setWidget($widget);
91
        $widgetMap->setSlot('content');
92
        $view->addWidgetMap($widgetMap);
93
94
        return $widgetMap;
95
    }
96
97
    /**
98
     * @param integer $id

Bundle/WidgetMapBundle/Tests/Manager/WidgetMapManagerTest.php 1 location

@@ 138-152 (lines=15) @@
135
     * @param integer $id
136
     * @param null|WidgetMap $parent
137
     */
138
    protected function newWidgetMap($id, $parent, $position, View $view, Widget $widget)
139
    {
140
        $widgetMap = new WidgetMap();
141
        $widgetMap->setId($id);
142
        if ($parent) {
143
            $widgetMap->setParent($parent);
144
        }
145
        $widgetMap->setPosition($position);
146
        $widgetMap->setWidget($widget);
147
        $widgetMap->setSlot('content');
148
        $widgetMap->setAction(WidgetMap::ACTION_CREATE);
149
        $view->addWidgetMap($widgetMap);
150
151
        return $widgetMap;
152
    }
153
154
    /**
155
     * @param integer $id