Skip to content

Commit 0666ffe

Browse files
scrutinizer-auto-fixertabacitu
authored andcommitted
Scrutinizer Auto-Fixes (#40)
* Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com * Applied fixes from StyleCI [ci skip] [skip ci]
1 parent 1eb7546 commit 0666ffe

File tree

6 files changed

+16
-12
lines changed

6 files changed

+16
-12
lines changed

src/CrudPanel.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
namespace Backpack\CRUD;
44

5-
use Backpack\CRUD\PanelTraits\Create;
6-
use Backpack\CRUD\PanelTraits\Read;
7-
use Backpack\CRUD\PanelTraits\Update;
8-
use Backpack\CRUD\PanelTraits\Delete;
9-
use Backpack\CRUD\PanelTraits\Reorder;
105
use Backpack\CRUD\PanelTraits\Access;
6+
use Backpack\CRUD\PanelTraits\AutoSet;
7+
use Backpack\CRUD\PanelTraits\Buttons;
118
use Backpack\CRUD\PanelTraits\Columns;
9+
use Backpack\CRUD\PanelTraits\Create;
10+
use Backpack\CRUD\PanelTraits\Delete;
11+
use Backpack\CRUD\PanelTraits\FakeColumns;
12+
use Backpack\CRUD\PanelTraits\FakeFields;
1213
use Backpack\CRUD\PanelTraits\Fields;
1314
use Backpack\CRUD\PanelTraits\Query;
14-
use Backpack\CRUD\PanelTraits\Buttons;
15-
use Backpack\CRUD\PanelTraits\AutoSet;
16-
use Backpack\CRUD\PanelTraits\FakeFields;
17-
use Backpack\CRUD\PanelTraits\FakeColumns;
15+
use Backpack\CRUD\PanelTraits\Read;
16+
use Backpack\CRUD\PanelTraits\Reorder;
17+
use Backpack\CRUD\PanelTraits\Update;
1818

1919
class CrudPanel
2020
{

src/PanelTraits/Access.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ public function hasAccessToAll($permission_array)
7878
* Check if a permission is enabled for a Crud Panel. Fail if not.
7979
*
8080
* @param [string] Permission.
81+
* @param string $permission
8182
*
82-
* @return bool
83+
* @return bool|null
8384
*/
8485
public function hasAccessOrFail($permission)
8586
{

src/PanelTraits/Columns.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ public function removeColumn($column)
134134
return $this->removeColumns([$column]);
135135
}
136136

137+
/**
138+
* @param string $entity
139+
*/
137140
public function remove($entity, $fields)
138141
{
139142
return array_values(array_filter($this->{$entity}, function ($field) use ($fields) {

src/PanelTraits/Delete.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ trait Delete
1414
* Delete a row from the database.
1515
*
1616
* @param [int] The id of the item to be deleted.
17+
* @param int $id
1718
*
1819
* @return [bool] Deletion confirmation.
1920
*

src/PanelTraits/Fields.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ trait Fields
1111
/**
1212
* Add a field to the create/update form or both.
1313
*
14-
* @param [string] $name Field name (the column name in the db in most cases)
15-
* @param [array] $options Field-type-specific information.
1614
* @param string $form The form to add the field to (create/update/both)
1715
*/
1816
public function addField($field, $form = 'both')

src/PanelTraits/Update.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public function update($id, $data)
3232
* Get all fields needed for the EDIT ENTRY form.
3333
*
3434
* @param [integer] The id of the entry that is being edited.
35+
* @param int $id
3536
*
3637
* @return [array] The fields with attributes, fake attributes and values.
3738
*/

0 commit comments

Comments
 (0)