Completed
Push — develop ( dbf1eb...cd67db )
by
unknown
24:15 queued 13:09
created

SocialButtonsFactory::createService()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 8
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 8
loc 8
rs 9.4286
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
 * @author cbleek
8
 * @license   MIT
9
 */
10
11
namespace Core\Factory\View\Helper;
12
13
use Zend\ServiceManager\FactoryInterface;
14
use Zend\ServiceManager\ServiceLocatorInterface;
15
use Core\View\Helper\SocialButtons;
16
17 View Code Duplication
class SocialButtonsFactory implements FactoryInterface {
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
18
19
    /**
20
     * @param ServiceLocatorInterface $serviceLocator
21
     *
22
     * @return SocialButtons
23
     */
24
    public function createService(ServiceLocatorInterface $serviceLocator)
25
    {
26
        /* @var $serviceLocator \Zend\View\HelperPluginManager */
27
        $options = $serviceLocator->getServiceLocator()->get('Auth/Options');
28
        $config = $serviceLocator->getServiceLocator()->get('Config');
29
        $helper = new SocialButtons($options,$config);
30
        return $helper;
31
    }
32
}
33
34