Code Duplication    Length = 8-13 lines in 2 locations

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

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