Code Duplication    Length = 16-16 lines in 2 locations

src/OroCRM/Bundle/SalesBundle/Controller/LeadController.php 1 location

@@ 151-166 (lines=16) @@
148
     * @Template("OroCRMSalesBundle:Widget:entityWithDataChannelGrid.html.twig")
149
     * @AclAncestor("orocrm_sales_lead_view")
150
     */
151
    public function leadWithDataChannelGridAction($channelIds, Request $request)
152
    {
153
        $gridName = $request->query->get('gridName');
154
155
        if (!$gridName) {
156
            return $this->createNotFoundException('`gridName` Should be defined.');
157
        }
158
159
        return [
160
            'channelId'    => $channelIds,
161
            'gridName'     => $gridName,
162
            'params'       => $request->query->get('params', []),
163
            'renderParams' => $request->query->get('renderParams', []),
164
            'multiselect'  => $request->query->get('multiselect', false)
165
        ];
166
    }
167
168
    /**
169
     * @param Lead $entity

src/OroCRM/Bundle/SalesBundle/Controller/OpportunityController.php 1 location

@@ 128-143 (lines=16) @@
125
     * @Template("OroCRMSalesBundle:Widget:entityWithDataChannelGrid.html.twig")
126
     * @AclAncestor("orocrm_sales_opportunity_view")
127
     */
128
    public function opportunityWithDataChannelGridAction($channelIds, Request $request)
129
    {
130
        $gridName = $request->query->get('gridName');
131
132
        if (!$gridName) {
133
            return $this->createNotFoundException('`gridName` Should be defined.');
134
        }
135
136
        return [
137
            'channelId'    => $channelIds,
138
            'gridName'     => $gridName,
139
            'params'       => $request->query->get('params', []),
140
            'renderParams' => $request->query->get('renderParams', []),
141
            'multiselect'  => $request->query->get('multiselect', false)
142
        ];
143
    }
144
145
    /**
146
     * @param  Opportunity $entity