Passed
Push — trunk ( 17b9ed...85c15e )
by Christian
12:23 queued 13s
created

src/Administration/Resources/app/administration/src/app/init-post/language.init.ts   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 15
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2
mnd 0
bc 0
fnc 2
bpm 0
cpm 1
noi 0
1
/**
2
 * @package admin
3
 */
4
5
// eslint-disable-next-line sw-deprecation-rules/private-feature-declarations
6
export default function initLanguageService() {
7
    Shopware.Application.addServiceProviderMiddleware('repositoryFactory', (repositoryFactory) => {
8
        // load the language when repositoryFactory is created
9
        // eslint-disable-next-line no-unused-expressions
10
        Shopware.Application.getContainer('service').languageAutoFetchingService;
11
12
        return repositoryFactory;
13
    });
14
}
15