@@ -125,15 +125,16 @@ |
||
125 | 125 | |
126 | 126 | private function log() |
127 | 127 | { |
128 | - if (get_class($this->entity) == 'ControleOnline\Entity\Webapi\Usuario') |
|
129 | - $this->user = $this->entity; |
|
130 | - else |
|
131 | - $this->log[] = |
|
128 | + if (get_class($this->entity) == 'ControleOnline\Entity\Webapi\Usuario') { |
|
129 | + $this->user = $this->entity; |
|
130 | + } else { |
|
131 | + $this->log[] = |
|
132 | 132 | [ |
133 | 133 | 'action' => $this->action, |
134 | 134 | 'class' => str_replace('Proxies\\__CG__\\', '', get_class($this->entity)), |
135 | 135 | 'object' => $this->getObject($this->entity) |
136 | 136 | ]; |
137 | + } |
|
137 | 138 | } |
138 | 139 | |
139 | 140 | private function getObject($entity) |
@@ -89,11 +89,13 @@ |
||
89 | 89 | private function getMembers($class, $groups, mixed $arguments = [], int $limit = 0, int $page = 1, array $orderby = []) |
90 | 90 | { |
91 | 91 | |
92 | - if ($limit < 1) |
|
93 | - $limit = $this->request->get('itemsPerPage') ?: 50; |
|
92 | + if ($limit < 1) { |
|
93 | + $limit = $this->request->get('itemsPerPage') ?: 50; |
|
94 | + } |
|
94 | 95 | |
95 | - if ($page == 1) |
|
96 | - $offset = (($page = $this->request->get('page') ?: 1) - 1) * $limit; |
|
96 | + if ($page == 1) { |
|
97 | + $offset = (($page = $this->request->get('page') ?: 1) - 1) * $limit; |
|
98 | + } |
|
97 | 99 | |
98 | 100 | $data = $this->manager->getRepository($class)->findBy($arguments, $orderby, $limit, $offset); |
99 | 101 |