GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( c6b433...56f882 )
by Danger
04:17
created
applications/workspace/test/Tests/WorkspaceTest.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
           }';
92 92
 
93 93
         $client->request(
94
-          'POST',
95
-          '/api/v1/workspace/',
96
-          [],
97
-          [],
98
-          ['CONTENT_TYPE' => 'application/json'],
99
-          $wp);
94
+            'POST',
95
+            '/api/v1/workspace/',
96
+            [],
97
+            [],
98
+            ['CONTENT_TYPE' => 'application/json'],
99
+            $wp);
100 100
 
101 101
         $response = $client->getResponse();
102 102
 
@@ -131,12 +131,12 @@  discard block
 block discarded – undo
131 131
 
132 132
         print_r("\nID: ".$id."\n");
133 133
         $client->request(
134
-          'PUT',
135
-          '/api/v1/workspace/'.$id.'',
136
-          [],
137
-          [],
138
-          ['CONTENT_TYPE' => 'application/json'],
139
-          $wp);
134
+            'PUT',
135
+            '/api/v1/workspace/'.$id.'',
136
+            [],
137
+            [],
138
+            ['CONTENT_TYPE' => 'application/json'],
139
+            $wp);
140 140
 
141 141
         $response = $client->getResponse();
142 142
         print($response);
@@ -154,12 +154,12 @@  discard block
 block discarded – undo
154 154
         $client = $this->logIn($client);
155 155
 
156 156
         $client->request(
157
-          'DELETE',
158
-          '/api/v1/workspace/'.$id.'',
159
-          [],
160
-          [],
161
-          [],
162
-          '');
157
+            'DELETE',
158
+            '/api/v1/workspace/'.$id.'',
159
+            [],
160
+            [],
161
+            [],
162
+            '');
163 163
 
164 164
         $response = $client->getResponse();
165 165
 
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 {
10 10
     use AbstractAppTest;
11 11
 
12
-    public function testGetWorkSpace(){
12
+    public function testGetWorkSpace() {
13 13
         $schema = __DIR__.'/../../../../api/schemas/workspace.json';
14 14
 
15 15
         $client = $this->createClient();
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
         $crawler = $client->request('GET', '/api/v1/workspace/1');
19 19
         $response = $client->getResponse();
20 20
         $data = $client->getResponse()->getContent();
21
-        $validator = $this->askValidation($data,$schema);
21
+        $validator = $this->askValidation($data, $schema);
22 22
 
23 23
         $assert = $this->evalValidation($validator);
24 24
         $this->assertTrue($assert);
25 25
     }
26
-    public function testGetWorkspaceList(){
26
+    public function testGetWorkspaceList() {
27 27
         $schema = __DIR__.'/../../../../api/schemas/workspaceList.json';
28 28
 
29 29
         $client = $this->createClient();
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
         $response = $client->getResponse();
34 34
 
35 35
         $data = $client->getResponse()->getContent();
36
-        $validator = $this->askValidation($data,$schema);
36
+        $validator = $this->askValidation($data, $schema);
37 37
 
38 38
         $assert = $this->evalValidation($validator);
39 39
         $this->assertTrue($assert);
40 40
     }
41 41
 
42
-    public function testGetWorkspaceShare(){
42
+    public function testGetWorkspaceShare() {
43 43
         $schema = __DIR__.'/../../../../api/schemas/workspaceShare.json';
44 44
 
45 45
         $client = $this->createClient();
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
 
51 51
         //print_r($response);
52 52
         $data = $client->getResponse()->getContent();
53
-        $validator = $this->askValidation($data,$schema);
53
+        $validator = $this->askValidation($data, $schema);
54 54
 
55 55
         $assert = $this->evalValidation($validator);
56 56
         $this->assertTrue($assert);
57 57
     }
58
-    public function testGetWorkspacePart(){
58
+    public function testGetWorkspacePart() {
59 59
         $schema = __DIR__.'/../../../../api/schemas/part.json';
60 60
 
61 61
         $client = $this->createClient();
@@ -66,19 +66,19 @@  discard block
 block discarded – undo
66 66
 
67 67
         //print_r($response);
68 68
         $data = $client->getResponse()->getContent();
69
-        $validator = $this->askValidation($data,$schema);
69
+        $validator = $this->askValidation($data, $schema);
70 70
 
71 71
         $assert = $this->evalValidation($validator);
72 72
         $this->assertTrue($assert);
73 73
     }
74 74
 
75
-    public function testPostWorkspace(){
75
+    public function testPostWorkspace() {
76 76
         //$schema = __DIR__.'/../../../../api/schemas/workspace.json';
77 77
 
78 78
         $client = $this->createClient();
79 79
         $client = $this->logIn($client);
80 80
 
81
-        $wp ='{
81
+        $wp = '{
82 82
               "title":"Sopraelevata",
83 83
               "description":"I Sarchiaponi sono pronti a lanciarsi nella costruzione di una sopraelevata",
84 84
               "environment": 22,
@@ -103,17 +103,17 @@  discard block
 block discarded – undo
103 103
         $data = $client->getResponse()->getContent();
104 104
         $id = json_decode($data);
105 105
 
106
-        $id=$id->id;
106
+        $id = $id->id;
107 107
 
108 108
         $this->assertTrue(is_numeric($id));
109 109
 
110 110
         return $id;
111 111
     }
112
-    public function testPutWorkspace(){
112
+    public function testPutWorkspace() {
113 113
         //$schema = __DIR__.'/../../../../api/schemas/workspace.json';
114 114
 
115 115
         $id = $this->testPostWorkspace();
116
-        $wp ='{
116
+        $wp = '{
117 117
               "id":'.$id.',
118 118
               "title":"Sopraelevata_EDIT",
119 119
               "description":"I Sarchiaponi sono pronti a lanciarsi nella costruzione di una sopraelevata",
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
         $this->assertTrue($response->isOk());
149 149
     }
150
-    public function testDeleteWorkspace(){
150
+    public function testDeleteWorkspace() {
151 151
         //$schema = __DIR__.'/../../../../api/schemas/workspace.json';
152 152
         $id = $this->testPostWorkspace();
153 153
         $client = $this->createClient();
Please login to merge, or discard this patch.
src/BitPrepared/Bundle/D1b0Workspace/Controller/V1/WorkspaceController.php 1 patch
Spacing   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         return JsonResponse::create($res, 201, $headers)->setSharedMaxAge(300);
134 134
     }
135 135
 
136
-    public function putWorkspace($id,Request $request)
136
+    public function putWorkspace($id, Request $request)
137 137
     {
138 138
         $user_id = $this->getSessionId();
139 139
         $data = json_decode($request->getContent(), true);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $unit = $data['team']['unit'];
148 148
         $group = $data['team']['group'];
149 149
 
150
-        $ws = R::load("workspace",intval($id));
150
+        $ws = R::load("workspace", intval($id));
151 151
             $ws->title = $title;
152 152
             $ws->description = $description;
153 153
             $ws->environment = $environment;
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         $id = R::store($ws);
157 157
 
158 158
         //save the team
159
-        $team = R::findOne("team","workspace = ?",[$id]);
159
+        $team = R::findOne("team", "workspace = ?", [$id]);
160 160
             $team->patrol = $patrol;
161 161
             $team->unit = $unit;
162 162
             $team->group = $group;
@@ -208,13 +208,13 @@  discard block
 block discarded – undo
208 208
         return JsonResponse::create($res, 201, $headers)->setSharedMaxAge(300);
209 209
     }
210 210
 
211
-    public function deleteWorkspace($id,Request $request)
211
+    public function deleteWorkspace($id, Request $request)
212 212
     {
213 213
         print_r("\nDBG deleteWORKSPACE ".$id." \n");
214 214
         //Disassocia un utente da un workspace
215 215
         $user_id = $this->getSessionId();
216 216
 
217
-        $wp = R::findOne("userworkspace","workspace = ? AND user = ?",[$id,$user_id]);
217
+        $wp = R::findOne("userworkspace", "workspace = ? AND user = ?", [$id, $user_id]);
218 218
         R::trash($wp);
219 219
 
220 220
         $response = new Response();
@@ -259,16 +259,16 @@  discard block
 block discarded – undo
259 259
 
260 260
         $key = $data['key'];
261 261
 
262
-        $share = R::findOne("share","key = ?",[$key]);
262
+        $share = R::findOne("share", "key = ?", [$key]);
263 263
         echo $share->inserttime;
264
-        if($share !== NULL){
264
+        if ($share !== NULL) {
265 265
             $date = new \DateTime();
266 266
             date_sub($date, date_interval_create_from_date_string('15 minutes'));
267 267
 
268
-            $wp_id=$share['workspace'];
268
+            $wp_id = $share['workspace'];
269 269
 
270 270
             $dateOld = new \DateTime($share->inserttime);
271
-            if($dateOld > $date){
271
+            if ($dateOld > $date) {
272 272
                 $usw = R::dispense("userworkspace");
273 273
                     $usw->user = $user_id;
274 274
                     $usw->workspace = $wp_id;
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
                 $headers = [];
278 278
                 $response = JsonResponse::create(["id"=>$wp_id], 200, $headers)->setSharedMaxAge(300);
279 279
 
280
-            }else{
280
+            }else {
281 281
                 $headers = [];
282 282
                 $response = JsonResponse::create(["message"=>"Key no more valid"], 498, $headers)->setSharedMaxAge(300);
283 283
             }
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
             $part->totalpoint = 0;
300 300
         $part_id = R::store($part);
301 301
 
302
-        foreach($data['part'] as $r){ //TODO va fixato nelle api
302
+        foreach ($data['part'] as $r) { //TODO va fixato nelle api
303 303
             $resource = R::dispense("resource");
304 304
                 $resource->part = $part_id;
305 305
                 $resource->inserttime = date($this->DATE_FORMAT);
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
             $resource_id = R::store($resource);
312 312
         }
313 313
 
314
-        foreach($data['badges'] as $badge_id){ //TODO va fixato nelle api
314
+        foreach ($data['badges'] as $badge_id) { //TODO va fixato nelle api
315 315
             $pb = R::dispense("partbadge");
316 316
                 $pb->badge = $badge_id;
317 317
                 $pb->part = $part_id;
@@ -324,21 +324,21 @@  discard block
 block discarded – undo
324 324
         return JsonResponse::create($res, 201, $headers)->setSharedMaxAge(300);
325 325
     }
326 326
 
327
-    public function getPart($id,$part_id, Request $request) {
327
+    public function getPart($id, $part_id, Request $request) {
328 328
         $user_id = $this->getSessionId();
329 329
 
330 330
         $data = json_decode($request->getContent(), true);
331 331
 
332
-        $part = R::findOne("part","id = ?",[$part_id]);
332
+        $part = R::findOne("part", "id = ?", [$part_id]);
333 333
 
334
-        $resource = R::findAll("resource","part = ?",[$part_id]);
334
+        $resource = R::findAll("resource", "part = ?", [$part_id]);
335 335
 
336
-        $partecipants = R::findAll("cero","part = ?",[$part_id]);
336
+        $partecipants = R::findAll("cero", "part = ?", [$part_id]);
337 337
 
338
-        $badges = R::findAll("partbadge","part = ? AND deleted = 0",[$part_id]);
338
+        $badges = R::findAll("partbadge", "part = ? AND deleted = 0", [$part_id]);
339 339
 
340 340
         $checked = false;
341
-        $res= [
341
+        $res = [
342 342
             "id"=>intval($part->id),
343 343
             "creation"=>$part->inserttime,
344 344
             "points"=>intval($part->points),
@@ -347,20 +347,20 @@  discard block
 block discarded – undo
347 347
             "partecipants"=>[]
348 348
         ];
349 349
 
350
-        foreach($badges as $b){
351
-            array_push($res['badges'],$b->id);
350
+        foreach ($badges as $b) {
351
+            array_push($res['badges'], $b->id);
352 352
         }
353
-        foreach($resource as $r){
354
-            array_push($res['part'],[
353
+        foreach ($resource as $r) {
354
+            array_push($res['part'], [
355 355
                 "type"=>$r->type,
356 356
                 "hash"=>$r->hash,
357 357
                 "ref"=>$r->ref
358 358
             ]);
359 359
 
360 360
         }
361
-        foreach($partecipants as $p){
362
-            array_push($res['partecipants'],$p->user);//TODO forse va usato l'id del c'ero e non l'id dell'utente
363
-            if($user_id == $r['id'])
361
+        foreach ($partecipants as $p) {
362
+            array_push($res['partecipants'], $p->user); //TODO forse va usato l'id del c'ero e non l'id dell'utente
363
+            if ($user_id == $r['id'])
364 364
                 $checked = true;
365 365
         }
366 366
         $res['present'] = true;
@@ -369,10 +369,10 @@  discard block
 block discarded – undo
369 369
         return JsonResponse::create($res, 201, $headers)->setSharedMaxAge(300);
370 370
     }
371 371
 
372
-    private function getPositionInArray($array,$id){
373
-        $count =0;
374
-        foreach($array as $a){
375
-            if($a->id === $id){
372
+    private function getPositionInArray($array, $id) {
373
+        $count = 0;
374
+        foreach ($array as $a) {
375
+            if ($a->id === $id) {
376 376
                 return $count;
377 377
             }
378 378
             $count = $count + 1;
@@ -380,22 +380,22 @@  discard block
 block discarded – undo
380 380
         return -1;
381 381
     }
382 382
 
383
-    public function putPart($id,$part_id, Request $request) {
383
+    public function putPart($id, $part_id, Request $request) {
384 384
         $user_id = $this->getSessionId();
385 385
 
386 386
         $data = json_decode($request->getContent(), true);
387 387
 
388
-        $part = R::load("part",$part_id);
388
+        $part = R::load("part", $part_id);
389 389
             $part->workspace = $id;
390 390
             $part->user = $user_id;
391 391
             $part->lastupdatetime = date($this->DATE_FORMAT);
392 392
             $part->totalpoint = 0;
393 393
         $part_id = R::store($part);
394 394
 
395
-        $delete_res=R::findAll("resource","WHERE part = ?",[$part_id]);
395
+        $delete_res = R::findAll("resource", "WHERE part = ?", [$part_id]);
396 396
 
397
-        foreach($data['part'] as $r){ //TODO va fixato nelle api
398
-            $resource = R::findOne("resource","WHERE hash = ? AND deleted = 0",[$r->hash]);//TODO BISOGNA FARE IL DIFF TRA QUELLE PRESENTI E QUELLE NON PRESENTI
397
+        foreach ($data['part'] as $r) { //TODO va fixato nelle api
398
+            $resource = R::findOne("resource", "WHERE hash = ? AND deleted = 0", [$r->hash]); //TODO BISOGNA FARE IL DIFF TRA QUELLE PRESENTI E QUELLE NON PRESENTI
399 399
                 $resource->part = $part_id;
400 400
                 $resource->updatetime = date($this->DATE_FORMAT);
401 401
                 $resource->type = $r->type;
@@ -403,34 +403,34 @@  discard block
 block discarded – undo
403 403
                 $resource->hash = $r->hash;
404 404
                 $resource->totalpoint = 0;
405 405
             $resource_id = R::store($resource);
406
-            $rem_id=getPositionInArray($delete_res,$resource_id);
407
-            if($rem_id != 0)
408
-                array_splice($delete_res,$rem_id,1); //RIMUOVO GLI ELEMENTI CHE HO MODIFICATO
406
+            $rem_id = getPositionInArray($delete_res, $resource_id);
407
+            if ($rem_id != 0)
408
+                array_splice($delete_res, $rem_id, 1); //RIMUOVO GLI ELEMENTI CHE HO MODIFICATO
409 409
         }
410 410
 
411
-        foreach($delete_res as $d){
411
+        foreach ($delete_res as $d) {
412 412
             //RIMUOVO REALMENTE DAL DB LE COSE CHE HO LASCIATO FUORI DALLA PUT (PRESENTI NEL DB MA NON NELLA NUOVA VERSIONE ODIO LE PUT)
413
-            $resource = R::load("resource",[$d->id]);
414
-            $resource->deleted=true;
413
+            $resource = R::load("resource", [$d->id]);
414
+            $resource->deleted = true;
415 415
             R::store($resource);
416 416
         }
417 417
 
418
-        $delete_badge=R::findAll("partbadge","WHERE part = ? AND deleted = 0",[$part_id]);
418
+        $delete_badge = R::findAll("partbadge", "WHERE part = ? AND deleted = 0", [$part_id]);
419 419
 
420
-        foreach($data['badges'] as $badge_id){
421
-            $pb = R::load("partbadge",$badge_id);
420
+        foreach ($data['badges'] as $badge_id) {
421
+            $pb = R::load("partbadge", $badge_id);
422 422
                 $pb->badge = $badge_id;
423 423
                 $pb->part = $part_id;
424 424
             $tmp = R::store($pb);
425
-            $rem_id=getPositionInArray($delete_badge,$tmp);
426
-            if($rem_id != 0)
427
-                array_splice($delete_badge,$rem_id,1); //RIMUOVO GLI ELEMENTI CHE HO MODIFICATO
425
+            $rem_id = getPositionInArray($delete_badge, $tmp);
426
+            if ($rem_id != 0)
427
+                array_splice($delete_badge, $rem_id, 1); //RIMUOVO GLI ELEMENTI CHE HO MODIFICATO
428 428
         }
429 429
 
430
-        foreach($delete_badge as $d){
430
+        foreach ($delete_badge as $d) {
431 431
             //RIMUOVO REALMENTE DAL DB LE COSE CHE HO LASCIATO FUORI DALLA PUT (PRESENTI NEL DB MA NON NELLA NUOVA VERSIONE ODIO LE PUT)
432
-            $badge = R::load("partbadge",[$d->id]);//FORSE RILOADARLI NON È NECESSARIO
433
-            $badge->deleted=true;
432
+            $badge = R::load("partbadge", [$d->id]); //FORSE RILOADARLI NON È NECESSARIO
433
+            $badge->deleted = true;
434 434
             R::store($badge);
435 435
         }
436 436
 
@@ -439,17 +439,17 @@  discard block
 block discarded – undo
439 439
         return JsonResponse::create($res, 201, $headers)->setSharedMaxAge(300);
440 440
     }
441 441
 
442
-    public function deletePart($id,$part_id, Request $request) {
442
+    public function deletePart($id, $part_id, Request $request) {
443 443
         $user_id = $this->getSessionId();
444
-        $part = R::load("part",$part_id);
445
-            $part->deleted=true;
444
+        $part = R::load("part", $part_id);
445
+            $part->deleted = true;
446 446
         R::store($part);
447 447
 
448 448
 
449
-        $delete_badge=R::findAll("partbadge","WHERE part = ?",[$part_id]);
450
-        foreach($delete_badge as $d){
451
-            $badge = R::load("partbadge",[$d->id]);//FORSE RILOADARLI NON È NECESSARIO BASTA FARE $d->deleted=true; e store($d)
452
-                $badge->deleted=true;
449
+        $delete_badge = R::findAll("partbadge", "WHERE part = ?", [$part_id]);
450
+        foreach ($delete_badge as $d) {
451
+            $badge = R::load("partbadge", [$d->id]); //FORSE RILOADARLI NON È NECESSARIO BASTA FARE $d->deleted=true; e store($d)
452
+                $badge->deleted = true;
453 453
             R::store($badge);
454 454
         }
455 455
 
@@ -461,13 +461,13 @@  discard block
 block discarded – undo
461 461
         $response->setSharedMaxAge(300);
462 462
     }
463 463
 
464
-    private function getPoint($badge_id,$badges){
465
-        foreach($badges as $b){
466
-            if($b->id === $badge_id){
467
-                if($b->completed === True){
464
+    private function getPoint($badge_id, $badges) {
465
+        foreach ($badges as $b) {
466
+            if ($b->id === $badge_id) {
467
+                if ($b->completed === True) {
468 468
                     echo "CASO 1;<BR />";
469 469
                     return $this->POINT_FOR_USING_A_CONQUERED_BADGE;
470
-                }else{
470
+                }else {
471 471
                     echo "CASO 2;<BR />";
472 472
                     return $this->POINT_FOR_USING_A_BADGE;
473 473
                 }
@@ -476,16 +476,16 @@  discard block
 block discarded – undo
476 476
         echo "CASO 3;<BR />";
477 477
         return $this->POINT_DEFAULT;
478 478
     }
479
-    public function checkin($id,$part_id, Request $request) {
479
+    public function checkin($id, $part_id, Request $request) {
480 480
         $user_id = $this->getSessionId();
481 481
 
482
-        $badges = R::findAll("partbadge","part = ? AND deleted = 0",[$part_id]);
483
-        $u_badges = R::findAll("userbadge","user = ? AND deleted = 0",[$user_id]);
482
+        $badges = R::findAll("partbadge", "part = ? AND deleted = 0", [$part_id]);
483
+        $u_badges = R::findAll("userbadge", "user = ? AND deleted = 0", [$user_id]);
484 484
 
485 485
         $point_earned = 0;
486
-        foreach($badges as $b){ //SE CI SONO DEI BADGE
487
-            $point = $this->getPoint($b->id,$u_badges);
488
-            if($point != $this->POINT_DEFAULT){ //SE SEI IN CAMMINO PER QUEI BADGE O SE LI POSSIEDI GIÀ
486
+        foreach ($badges as $b) { //SE CI SONO DEI BADGE
487
+            $point = $this->getPoint($b->id, $u_badges);
488
+            if ($point != $this->POINT_DEFAULT) { //SE SEI IN CAMMINO PER QUEI BADGE O SE LI POSSIEDI GIÀ
489 489
                 echo "PUNTI:".$point;
490 490
                 $point_earned = $point_earned + $point;
491 491
                 $pb = R::dispense("cero");
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
                     $pb->points = $point;
497 497
                 $tmp = R::store($pb);
498 498
 
499
-                if($point === $this->POINT_FOR_USING_A_BADGE){ //SE SEI IN CAMMINO MA NON LI HAI ANCORA RAGGIUNTI
499
+                if ($point === $this->POINT_FOR_USING_A_BADGE) { //SE SEI IN CAMMINO MA NON LI HAI ANCORA RAGGIUNTI
500 500
                     $ubc = R::dispense("userbadgeclove");
501 501
                         $ubc->user = $user_id;
502 502
                         $ubc->badge = $b->id;
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
             }
508 508
         }
509 509
 
510
-        if($point_earned <= 0){ //SE NON CI SONO BADGE O SE TU NON SEI IN CAMMINO PER NESSUNO DI LORO
510
+        if ($point_earned <= 0) { //SE NON CI SONO BADGE O SE TU NON SEI IN CAMMINO PER NESSUNO DI LORO
511 511
             $pb = R::dispense("cero");
512 512
                 $pb->user = $user_id;
513 513
                 $pb->part = $part_id;
@@ -521,13 +521,13 @@  discard block
 block discarded – undo
521 521
 
522 522
     }
523 523
 
524
-    public function deleteCheckin($id,$part_id, Request $request) {
524
+    public function deleteCheckin($id, $part_id, Request $request) {
525 525
         $user_id = $this->getSessionId();
526 526
 
527
-        $u_badges = R::findAll("userbadge","user = ? AND part = ?",[$user_id,$part_id]);
527
+        $u_badges = R::findAll("userbadge", "user = ? AND part = ?", [$user_id, $part_id]);
528 528
         R::trashAll($u_badges);
529 529
 
530
-        $cero = R::findAll("cero","user = ? AND part = ?",[$user_id,$part_id]);
530
+        $cero = R::findAll("cero", "user = ? AND part = ?", [$user_id, $part_id]);
531 531
         R::trashAll($cero);
532 532
 
533 533
         $response = new Response();
Please login to merge, or discard this patch.