@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | public function testStore() |
35 | 35 | { |
36 | 36 | $response = $this->curlHelper |
37 | - ->post( |
|
37 | + ->post( |
|
38 | 38 | $this->getServiceTest()->getRepositoryTest()->getMockArray() |
39 | - ) |
|
40 | - ->send() |
|
41 | - ->getResponse(); |
|
39 | + ) |
|
40 | + ->send() |
|
41 | + ->getResponse(); |
|
42 | 42 | |
43 | 43 | $this->assertEquals(200, $response['code']); |
44 | 44 | |
@@ -61,10 +61,10 @@ discard block |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | $response = $this->curlHelper |
64 | - ->setPosFixUrl('/'.$flushedMockArray['id']) |
|
65 | - ->put($flushedMockArray) |
|
66 | - ->send() |
|
67 | - ->getResponse(); |
|
64 | + ->setPosFixUrl('/'.$flushedMockArray['id']) |
|
65 | + ->put($flushedMockArray) |
|
66 | + ->send() |
|
67 | + ->getResponse(); |
|
68 | 68 | |
69 | 69 | $this->assertEquals(200, $response['code']); |
70 | 70 | |
@@ -80,10 +80,10 @@ discard block |
||
80 | 80 | $entity = $this->getServiceTest()->getRepositoryTest()->getFlushedMockObject(); |
81 | 81 | |
82 | 82 | $response = $this->curlHelper |
83 | - ->setPosFixUrl('/'.$entity->getId()) |
|
84 | - ->delete() |
|
85 | - ->send() |
|
86 | - ->getResponse(); |
|
83 | + ->setPosFixUrl('/'.$entity->getId()) |
|
84 | + ->delete() |
|
85 | + ->send() |
|
86 | + ->getResponse(); |
|
87 | 87 | |
88 | 88 | $this->assertEquals(200, $response['code']); |
89 | 89 |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | public function testFindAll() |
8 | 8 | { |
9 | 9 | $entity = $this->getService() |
10 | - ->store($this->getRepositoryTest()->getMockArray()) |
|
11 | - ->flush(); |
|
10 | + ->store($this->getRepositoryTest()->getMockArray()) |
|
11 | + ->flush(); |
|
12 | 12 | |
13 | 13 | $findAll = $this->getService()->findAll()->getResult(); |
14 | 14 | |
@@ -19,11 +19,11 @@ discard block |
||
19 | 19 | public function testStore() |
20 | 20 | { |
21 | 21 | $entity = $this->getService() |
22 | - ->store($this->getRepositoryTest()->getMockArray()) |
|
23 | - ->flush(); |
|
22 | + ->store($this->getRepositoryTest()->getMockArray()) |
|
23 | + ->flush(); |
|
24 | 24 | |
25 | 25 | $repository = $this->getService() |
26 | - ->getMainRepository(); |
|
26 | + ->getMainRepository(); |
|
27 | 27 | |
28 | 28 | $find = $repository->find($entity->getId()); |
29 | 29 | |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | $entity = $this->getService() |
48 | - ->update($flushedMockArray['id'], $flushedMockArray) |
|
49 | - ->flush(); |
|
48 | + ->update($flushedMockArray['id'], $flushedMockArray) |
|
49 | + ->flush(); |
|
50 | 50 | |
51 | 51 | $repository = $this->getService()->getMainRepository(); |
52 | 52 | |
@@ -63,12 +63,12 @@ discard block |
||
63 | 63 | public function testRemove() |
64 | 64 | { |
65 | 65 | $entity = $this->getService() |
66 | - ->store($this->getRepositoryTest()->getMockArray()) |
|
67 | - ->flush(); |
|
66 | + ->store($this->getRepositoryTest()->getMockArray()) |
|
67 | + ->flush(); |
|
68 | 68 | |
69 | 69 | $this->getService() |
70 | - ->remove($entity->getId()) |
|
71 | - ->flush(); |
|
70 | + ->remove($entity->getId()) |
|
71 | + ->flush(); |
|
72 | 72 | |
73 | 73 | $find = $this->getService()->getMainRepository()->find($entity->getId()); |
74 | 74 | } |
@@ -15,8 +15,8 @@ discard block |
||
15 | 15 | $entity = $this->getMockObject($except); |
16 | 16 | |
17 | 17 | $this->getRepository() |
18 | - ->save($entity) |
|
19 | - ->flush($entity); |
|
18 | + ->save($entity) |
|
19 | + ->flush($entity); |
|
20 | 20 | |
21 | 21 | return $entity; |
22 | 22 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $entity = $this->getFlushedMockObject(); |
88 | 88 | |
89 | 89 | $repository->remove($entity) |
90 | - ->flush($entity); |
|
90 | + ->flush($entity); |
|
91 | 91 | |
92 | 92 | $repository->find($entity->getId()); |
93 | 93 | } |
@@ -82,8 +82,8 @@ discard block |
||
82 | 82 | public function prePersist() |
83 | 83 | { |
84 | 84 | $this->getRepository() |
85 | - ->preSave($this) |
|
86 | - ->validate($this); |
|
85 | + ->preSave($this) |
|
86 | + ->validate($this); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -92,8 +92,8 @@ discard block |
||
92 | 92 | public function preUpdate() |
93 | 93 | { |
94 | 94 | $this->getRepository() |
95 | - ->preSave($this) |
|
96 | - ->validate($this); |
|
95 | + ->preSave($this) |
|
96 | + ->validate($this); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | public function getRepository() |
@@ -169,6 +169,9 @@ |
||
169 | 169 | return $this; |
170 | 170 | } |
171 | 171 | |
172 | + /** |
|
173 | + * @param string $key |
|
174 | + */ |
|
172 | 175 | final protected function checkOnyExceptInArray($key, array $options = null) |
173 | 176 | { |
174 | 177 | if ( |
@@ -4,11 +4,20 @@ |
||
4 | 4 | |
5 | 5 | interface EntityTimestampInterface |
6 | 6 | { |
7 | + /** |
|
8 | + * @return \DateTime |
|
9 | + */ |
|
7 | 10 | public function getCreatedAt(); |
8 | 11 | |
12 | + /** |
|
13 | + * @return \DateTime |
|
14 | + */ |
|
9 | 15 | public function getUpdatedAt(); |
10 | 16 | |
11 | 17 | public function getDeletedAt(); |
12 | 18 | |
19 | + /** |
|
20 | + * @return void |
|
21 | + */ |
|
13 | 22 | public function setDeletedAt($date); |
14 | 23 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
27 | - * @return Bludata\Lumen\Application\BaseApplication |
|
27 | + * @return BaseApplication |
|
28 | 28 | */ |
29 | 29 | public function resource($descriptionGroup, $prefix, $controller, array $except = [], Closure $routes = null) |
30 | 30 | { |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | * |
57 | 57 | * @param string $token |
58 | 58 | * |
59 | - * @return Lcobucci\JWT\Token |
|
59 | + * @return Token|null |
|
60 | 60 | */ |
61 | 61 | public function decodeToken($token) |
62 | 62 | { |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | /** |
77 | 77 | * Verify is validate token in signature. |
78 | 78 | * |
79 | - * @param Lcobucci\JWT\Token $token |
|
79 | + * @param Token $token |
|
80 | 80 | * |
81 | 81 | * @return bool |
82 | 82 | */ |
@@ -17,6 +17,9 @@ |
||
17 | 17 | return $this->mainService; |
18 | 18 | } |
19 | 19 | |
20 | + /** |
|
21 | + * @param Request $filters |
|
22 | + */ |
|
20 | 23 | protected function translateFilters($filters) |
21 | 24 | { |
22 | 25 | if ($filters instanceof Request) { |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | return array_combine( |
19 | 19 | $attributes, |
20 | 20 | array_map( |
21 | - function ($attr) { |
|
21 | + function($attr) { |
|
22 | 22 | $getMethod = $this->getMethod($attr); |
23 | 23 | if (method_exists($this, $getMethod)) { |
24 | 24 | return $this->$getMethod(); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | public function toArray() |
107 | 107 | { |
108 | - return array_map(function ($attr) { |
|
108 | + return array_map(function($attr) { |
|
109 | 109 | if (method_exists($attr, 'toArray')) { |
110 | 110 | return $attr->toArray(); |
111 | 111 | } |