Passed
Push — master ( 34c669...9a4c09 )
by Christian
13:27 queued 13s
created

src/Administration/Resources/app/administration/src/module/sw-extension/component/sw-ratings/sw-review-reply/index.js   A

Complexity

Total Complexity 2
Complexity/F 2

Size

Lines of Code 28
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 16
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 2
mnd 1
bc 1
fnc 1
bpm 1
cpm 2
noi 1
1
import template from './sw-review-reply.html.twig';
2
import './sw-review-reply.scss';
3
4
const { date } = Shopware.Utils.format;
0 ignored issues
show
Bug introduced by
The variable Shopware seems to be never declared. If this is a global, consider adding a /** global: Shopware */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
5
6
const { Component } = Shopware;
7
8
Component.register('sw-review-reply', {
9
    template,
10
11
    props: {
12
        reply: {
13
            type: Object,
14
            required: true
15
        },
16
17
        producerName: {
18
            type: String,
19
            required: true
20
        }
21
    },
22
23
    computed: {
24
        creationDate() {
25
            return this.reply.creationDate !== null ? date(this.reply.creationDate) : null;
26
        }
27
    }
28
});
29