Completed
Pull Request — master (#1090)
by Gabriel
163:05 queued 101:20
created

skins/cat17/src/app/lib/state_aggregation/donation/form_is_prefilled.js   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 14
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
wmc 1
c 1
b 0
f 0
nc 3
mnd 0
bc 1
fnc 1
dl 0
loc 14
rs 10
bpm 1
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A module.exports 0 8 1
1
'use strict';
2
3
var _ = require( 'underscore' ),
4
	validationResult = require( './../validation_result' )
5
;
6
7
module.exports = function ( state ) {
8
	var result = _.clone( validationResult );
9
	result.dataEntered = state.donationFormContent.paymentIntervalInMonths >= 0 &&
10
		state.donationFormContent.amount !== 0 &&
11
		state.donationFormContent.paymentType !== '';
12
13
	return result;
14
};
15