Code Duplication    Length = 8-13 lines in 2 locations

src/AppBundle/Controller/Config/MaterialController.php 2 locations

@@ 109-116 (lines=8) @@
106
     * @Method("GET")
107
     * @Template()
108
     */
109
    public function editAction(Material $material)
110
    {
111
        $return = $this->abstractEditAction($material, 'material', MaterialType::class);
112
        $articles = $this->getDoctrine()->getManager()->getRepository('AppBundle:Article')->findAll();
113
        $return['articles'] = $articles;
114
115
        return $return;
116
    }
117
118
    /**
119
     * Edits an existing Material entity.
@@ 68-80 (lines=13) @@
65
     * @Method("GET")
66
     * @Template()
67
     */
68
    public function newAction()
69
    {
70
        $return = $this->abstractNewAction(
71
            'Config\Material',
72
            'AppBundle:Config\Material',
73
            MaterialType::class,
74
            'material'
75
        );
76
        $articles = $this->getDoctrine()->getManager()->getRepository('AppBundle:Article')->findAll();
77
        $return['articles'] = $articles;
78
79
        return $return;
80
    }
81
82
    /**
83
     * Creates a new Material entity.