Code Duplication    Length = 11-11 lines in 2 locations

Templating/SocialBarTwigExtension.php 2 locations

@@ 130-140 (lines=11) @@
127
            'layout' => 'button_count',
128
            );
129
130
        if ($action == "share") {
131
            $parameters['url'] = array_key_exists('url', $parameters) ? $parameters['url'] : null;
132
            $parameters['action'] = 'fb-like';
133
134
        } elseif ($action == "follow") {
135
            $parameters['url'] = $this->container->getParameter("azine_social_bar_fb_profile_url");
136
            $parameters['action'] = "fb-follow";
137
138
        } else {
139
            throw new \Exception("Unknown social action. Only 'share' and 'follow' are known at the moment.");
140
        }
141
142
        return $this->container->get('azine.socialBarHelper')->facebookButton($parameters);
143
    }
@@ 214-224 (lines=11) @@
211
            'counterLocation' => 'right',
212
        );
213
214
        if ($action == "share") {
215
            $parameters['action'] = 'IN/Share';
216
            $parameters['url'] = array_key_exists('url', $parameters) ? $parameters['url'] : null;
217
218
        } elseif ($action == "follow") {
219
            $parameters['action'] = 'IN/FollowCompany';
220
            $parameters['companyId'] = $this->container->getParameter("azine_social_bar_linked_in_company_id");
221
222
        } else {
223
            throw new \Exception("Unknown social action. Only 'share' and 'follow' are known at the moment.");
224
        }
225
226
        return $this->container->get('azine.socialBarHelper')->linkedInButton($parameters);
227
    }