Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 71 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | export class PlayerMinimal { |
||
2 | constructor({ |
||
3 | nameFirst, |
||
4 | nameLast, |
||
5 | shirtNr, |
||
6 | position, |
||
7 | gamesPlayed, |
||
8 | cleanSheets, |
||
9 | goalsScored, |
||
10 | cardsYellow, |
||
11 | cardsRed, |
||
12 | imageSrc, |
||
13 | link, |
||
14 | }) { |
||
15 | this.nameFirst = nameFirst |
||
16 | this.nameLast = nameLast |
||
17 | this.shirtNr = shirtNr |
||
18 | this.position = position |
||
19 | this.gamesPlayed = gamesPlayed |
||
20 | this.cleanSheets = cleanSheets |
||
21 | this.goalsScored = goalsScored |
||
22 | this.cardsYellow = cardsYellow |
||
23 | this.cardsRed = cardsRed |
||
24 | this.imageSrc = imageSrc |
||
25 | this.link = link |
||
26 | } |
||
27 | } |
||
28 | |||
29 | export class Player extends PlayerMinimal { |
||
30 | constructor({ |
||
31 | nameFirst, |
||
32 | nameLast, |
||
33 | shirtNr, |
||
34 | position, |
||
35 | dateJoin, |
||
36 | dateLeave, |
||
37 | dateBirth, |
||
38 | bodyText, |
||
39 | gamesPlayed, |
||
40 | cleanSheets, |
||
41 | goalsScored, |
||
42 | cardsYellow, |
||
43 | cardsRed, |
||
44 | imageSrc, |
||
45 | link, |
||
46 | teamName, |
||
47 | teamLink, |
||
48 | }) { |
||
49 | super({ |
||
50 | nameFirst, |
||
51 | nameLast, |
||
52 | shirtNr, |
||
53 | position, |
||
54 | gamesPlayed, |
||
55 | cleanSheets, |
||
56 | goalsScored, |
||
57 | cardsYellow, |
||
58 | cardsRed, |
||
59 | imageSrc, |
||
60 | link, |
||
61 | }) |
||
62 | |||
63 | this.bodyText = bodyText |
||
64 | this.dateJoin = dateJoin |
||
65 | this.dateLeave = dateLeave |
||
66 | this.dateBirth = dateBirth |
||
67 | this.teamName = teamName |
||
68 | this.teamLink = teamLink |
||
69 | return this |
||
|
|||
70 | } |
||
71 | } |
||
72 |