This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | describe('Model Generator', function () { |
||
2 | it('Person Model exist', function () { |
||
3 | expect(Test.model.Person).toBeDefined(); |
||
0 ignored issues
–
show
|
|||
4 | }); |
||
5 | it('Base Book Model to exist', function() { |
||
6 | expect(Test.model.BaseBook).toBeDefined(); |
||
0 ignored issues
–
show
The variable
Test seems to be never declared. If this is a global, consider adding a /** global: Test */ 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. ![]() |
|||
7 | }); |
||
8 | it('Book Model to exist', function() { |
||
9 | expect(Test.model.Book).toBeDefined(); |
||
0 ignored issues
–
show
The variable
Test seems to be never declared. If this is a global, consider adding a /** global: Test */ 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. ![]() |
|||
10 | }); |
||
11 | describe('Model Fields', function () { |
||
12 | var getField = (function () { |
||
13 | var fields = Test.model.Person.getFields(); |
||
0 ignored issues
–
show
The variable
Test seems to be never declared. If this is a global, consider adding a /** global: Test */ 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. ![]() |
|||
14 | var list = {}; |
||
15 | for (var i = 0; i < fields.length; i++) { |
||
16 | list[fields[i].name] = fields[i]; |
||
17 | } |
||
18 | return function (name) { |
||
19 | return list[name]; |
||
20 | } |
||
21 | })(); |
||
22 | it('contain 9 fields', function () { |
||
23 | expect(Test.model.Person.getFields().length).toBe(9); |
||
0 ignored issues
–
show
The variable
Test seems to be never declared. If this is a global, consider adding a /** global: Test */ 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. ![]() |
|||
24 | }); |
||
25 | it('age field', function () { |
||
26 | expect(getField('age').type).toBe(Ext.data.Types.INT); |
||
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ 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. ![]() |
|||
27 | }); |
||
28 | it('active field', function () { |
||
29 | expect(getField('active').type).toBe(Ext.data.Types.BOOLEAN); |
||
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ 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. ![]() |
|||
30 | }); |
||
31 | it('createdAt field', function () { |
||
32 | expect(getField('createdAt').type).toBe(Ext.data.Types.DATE); |
||
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ 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. ![]() |
|||
33 | }); |
||
34 | it('email field', function () { |
||
35 | expect(getField('email').type).toBe(Ext.data.Types.STRING); |
||
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ 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. ![]() |
|||
36 | }); |
||
37 | it('exclude dob field', function() { |
||
38 | expect(getField('dob')).toBeUndefined(); |
||
39 | }); |
||
40 | }); |
||
41 | describe('Model Validations', function() { |
||
42 | it('Presence Failed', function() { |
||
43 | var p = Ext.create('Test.model.Person'); |
||
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ 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. ![]() |
|||
44 | p.set("firstName", ""); |
||
45 | var errors = p.validate(); |
||
46 | expect(errors.getByField("firstName").length).toBe(1); |
||
47 | }); |
||
48 | it('Presence Success', function() { |
||
49 | var p = Ext.create('Test.model.Person'); |
||
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ 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. ![]() |
|||
50 | p.set("lastName", "test"); |
||
51 | var errors = p.validate(); |
||
52 | expect(errors.getByField("lastName").length).toBe(0); |
||
53 | }); |
||
54 | it('Length Failed', function() { |
||
55 | var p = Ext.create('Test.model.Person'); |
||
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ 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. ![]() |
|||
56 | p.set("email", "[email protected]"); |
||
57 | var errors = p.validate(); |
||
58 | expect(errors.getByField("email").length).toBe(1); |
||
59 | p.set("email", "[email protected]"); |
||
60 | errors = p.validate(); |
||
61 | expect(errors.getByField("email").length).toBe(1); |
||
62 | }); |
||
63 | it('Length Success', function() { |
||
64 | var p = Ext.create('Test.model.Person'); |
||
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ 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. ![]() |
|||
65 | p.set("email", "[email protected]"); |
||
66 | var errors = p.validate(); |
||
67 | expect(errors.getByField("email").length).toBe(0); |
||
68 | }); |
||
69 | it('Email Failed', function() { |
||
70 | var p = Ext.create('Test.model.Person'); |
||
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ 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. ![]() |
|||
71 | p.set("email", "as.ad.coma1.au"); |
||
72 | var errors = p.validate(); |
||
73 | expect(errors.getByField("email").length).toBe(1); |
||
74 | }); |
||
75 | it('Email Success', function() { |
||
76 | var p = Ext.create('Test.model.Person'); |
||
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ 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. ![]() |
|||
77 | p.set("email", "[email protected]"); |
||
78 | var errors = p.validate(); |
||
79 | expect(errors.getByField("email").length).toBe(0); |
||
80 | }); |
||
81 | it('Regex Success', function() { |
||
82 | var p = Ext.create('Test.model.Person'); |
||
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ 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. ![]() |
|||
83 | p.set("regex", "81 4"); |
||
84 | var errors = p.validate(); |
||
85 | expect(errors.getByField("regex").length).toBe(0); |
||
86 | }); |
||
87 | it('Regex Failed', function() { |
||
88 | var p = Ext.create('Test.model.Person'); |
||
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ 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. ![]() |
|||
89 | p.set("regex", "a1 4"); |
||
90 | var errors = p.validate(); |
||
91 | expect(errors.getByField("regex").length).toBe(1); |
||
92 | }); |
||
93 | it('Choice Success', function() { |
||
94 | var p = Ext.create('Test.model.Person'); |
||
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ 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. ![]() |
|||
95 | p.set("color", "red"); |
||
96 | var errors = p.validate(); |
||
97 | expect(errors.getByField("color").length).toBe(0); |
||
98 | }); |
||
99 | it('Choice Failed', function() { |
||
100 | var p = Ext.create('Test.model.Person'); |
||
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ 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. ![]() |
|||
101 | p.set("color", "green"); |
||
102 | var errors = p.validate(); |
||
103 | expect(errors.getByField("color").length).toBe(1); |
||
104 | }); |
||
105 | }); |
||
106 | describe('Model Associations', function() { |
||
107 | it('books define in person', function() { |
||
108 | var person = Ext.create('Test.model.Person'); |
||
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ 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. ![]() |
|||
109 | expect(person.books).toBeDefined(); |
||
110 | }); |
||
111 | it('person define in book', function() { |
||
112 | var book = Ext.create('Test.model.Book'); |
||
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ 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. ![]() |
|||
113 | expect(book.getPerson).toBeDefined(); |
||
114 | expect(book.setPerson).toBeDefined(); |
||
115 | }); |
||
116 | it('associate books to person', function() { |
||
117 | var book1 = Ext.create('Test.model.Book'); |
||
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ 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. ![]() |
|||
118 | book1.set('name', 'Book A'); |
||
119 | var book2 = Ext.create('Test.model.Book'); |
||
120 | book2.set('name', 'Book 2'); |
||
121 | var person = Ext.create('Test.model.Person', {id: 10}); |
||
122 | person.books().add(book1, book2); |
||
123 | expect(person.books().count()).toEqual(2); |
||
124 | person.books().remove(book2); |
||
125 | expect(person.books().count()).toEqual(1); |
||
126 | expect(book1.dirty).toBeTruthy(); |
||
127 | }) |
||
128 | }); |
||
129 | }); |
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.