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...
25
{
26
/**
27
* Create a ModuleOptions options
28
*
29
* @param ContainerInterface $container
30
* @param string $requestedName
31
* @param null|array $options
32
*
33
* @return ModuleOptions
34
* @throws ServiceNotFoundException if unable to resolve the service.
35
* @throws ServiceNotCreatedException if an exception is raised when
36
* creating a service.
37
* @throws ContainerException if any other error occurs
38
*/
39
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
40
{
41
$config = $container->get('Config');
42
return new ModuleOptions(isset($config['application_options']) ? $config['application_options'] : array());
43
}
44
/**
45
* {@inheritDoc}
46
*/
47
public function createService(ServiceLocatorInterface $serviceLocator)
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.