Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Push — master ( 2f6de4...35da10 )
by Pierre
06:07
created

vat_validator.js ➔ ... ➔ ???   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 1
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
define(['jquery', 'routing'], ($, Routing) => {
0 ignored issues
show
Configuration introduced by
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
2
    return {
3
        attach(element, input) {
0 ignored issues
show
Backwards Compatibility introduced by
'concise methods' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
4
            let $el = $(element),
0 ignored issues
show
Backwards Compatibility introduced by
'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
5
                $input = $(input);
6
7
            $input.on('change', () => {
0 ignored issues
show
Configuration introduced by
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
8
                if ('' === $input.val()) {
9
                    $input
10
                        .closest('.form-group')
11
                        .removeClass('has-success has-error')
0 ignored issues
show
Coding Style introduced by
There should be a semicolon.

Requirement of semicolons purely is a coding style issue since JavaScript has specific rules about semicolons which are followed by all browsers.

Further Readings:

Loading history...
12
                }
13
            });
14
15
            $el.on('click', (e) => {
0 ignored issues
show
Configuration introduced by
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
16
                e.preventDefault();
17
                let original = $el.html();
0 ignored issues
show
Backwards Compatibility introduced by
'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Loading history...
18
19
                $el.html('<i class="fa fa-spin fa-refresh"></i>');
20
21
                $.ajax({
22
                    'url' : Routing.generate('_tax_number_validate'),
23
                    'data': {'vat_number': $input.val()},
24
                    'method': 'POST'
25
                }).done((result) => {
0 ignored issues
show
Configuration introduced by
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
26
                    $input
27
                        .closest('.form-group')
28
                        .removeClass('has-success has-error')
29
                        .addClass(result.valid ? 'has-success' : 'has-error');
30
                }).always(() => {
0 ignored issues
show
Configuration introduced by
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.

Further Reading:

Loading history...
31
                    $el.html(original);
32
                });
33
            });
34
        }
35
    };
36
});