We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -334,6 +334,7 @@ discard block |
||
334 | 334 | * Delete a row from the database. |
335 | 335 | * |
336 | 336 | * @param [int] The id of the item to be deleted. |
337 | + * @param integer $id |
|
337 | 338 | * @return [bool] Deletion confirmation. |
338 | 339 | * |
339 | 340 | * TODO: should this delete items with relations to it too? |
@@ -452,7 +453,8 @@ discard block |
||
452 | 453 | * Check if a permission is enabled for a Crud Panel. Fail if not. |
453 | 454 | * |
454 | 455 | * @param [string] Permission. |
455 | - * @return boolean |
|
456 | + * @param string $permission |
|
457 | + * @return boolean|null |
|
456 | 458 | */ |
457 | 459 | public function hasAccessOrFail($permission) |
458 | 460 | { |
@@ -481,6 +483,7 @@ discard block |
||
481 | 483 | * All Create-Read-Update-Delete operations are done using that Eloquent Collection. |
482 | 484 | * |
483 | 485 | * @param [string] Full model namespace. Ex: App\Models\Article |
486 | + * @param string $model_namespace |
|
484 | 487 | */ |
485 | 488 | public function setModel($model_namespace) |
486 | 489 | { |
@@ -508,6 +511,7 @@ discard block |
||
508 | 511 | * |
509 | 512 | * @param [string] Route name. |
510 | 513 | * @param [array] Parameters. |
514 | + * @param string $route |
|
511 | 515 | */ |
512 | 516 | public function setRoute($route) |
513 | 517 | { |
@@ -540,7 +544,7 @@ discard block |
||
540 | 544 | * - $this->crud->setRouteName('admin.article') |
541 | 545 | * - $this->crud->route = "admin/article" |
542 | 546 | * |
543 | - * @return [string] |
|
547 | + * @return string |
|
544 | 548 | */ |
545 | 549 | public function getRoute() |
546 | 550 | { |
@@ -553,6 +557,8 @@ discard block |
||
553 | 557 | * |
554 | 558 | * @param [string] Entity name, in singular. Ex: article |
555 | 559 | * @param [string] Entity name, in plural. Ex: articles |
560 | + * @param string $singular |
|
561 | + * @param string $plural |
|
556 | 562 | */ |
557 | 563 | public function setEntityNameStrings($singular, $plural) { |
558 | 564 | $this->entity_name = $singular; |
@@ -731,8 +737,6 @@ discard block |
||
731 | 737 | |
732 | 738 | /** |
733 | 739 | * Add a field to the create/update form or both. |
734 | - * @param [string] $name Field name (the column name in the db in most cases) |
|
735 | - * @param [array] $options Field-type-specific information. |
|
736 | 740 | * @param string $form The form to add the field to (create/update/both) |
737 | 741 | */ |
738 | 742 | public function addField($field, $form='both') |
@@ -1374,6 +1378,9 @@ discard block |
||
1374 | 1378 | // return array_filter($this->{$entity}[] = $this->syncField($field)); |
1375 | 1379 | // } |
1376 | 1380 | |
1381 | + /** |
|
1382 | + * @param string $entity |
|
1383 | + */ |
|
1377 | 1384 | public function addMultiple($entity, $field) |
1378 | 1385 | { |
1379 | 1386 | $this->{$entity} = array_filter(array_map([$this, 'syncField'], $fields)); |
@@ -1398,11 +1405,17 @@ discard block |
||
1398 | 1405 | // return array_values(array_filter($this->{$entity}, function($field) use ($fields) { return !in_array($field['name'], (array)$fields);})); |
1399 | 1406 | // } |
1400 | 1407 | |
1408 | + /** |
|
1409 | + * @param string $items |
|
1410 | + */ |
|
1401 | 1411 | public function setSort($items, $order) |
1402 | 1412 | { |
1403 | 1413 | $this->sort[$items] = $order; |
1404 | 1414 | } |
1405 | 1415 | |
1416 | + /** |
|
1417 | + * @param string $items |
|
1418 | + */ |
|
1406 | 1419 | public function sort($items) |
1407 | 1420 | { |
1408 | 1421 | if (array_key_exists($items, $this->sort)) |
@@ -1438,6 +1451,10 @@ discard block |
||
1438 | 1451 | } |
1439 | 1452 | |
1440 | 1453 | // face un fel de merge intre ce ii dai si ce e in CRUD |
1454 | + |
|
1455 | + /** |
|
1456 | + * @param string $entity |
|
1457 | + */ |
|
1441 | 1458 | public function syncRelations($entity) |
1442 | 1459 | { |
1443 | 1460 | foreach ($this->relations as $field => $relation) { |