| Total Complexity | 2 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class SlackAdmin extends ModelAdmin |
||
| 14 | { |
||
| 15 | private static $managed_models = [ |
||
|
1 ignored issue
–
show
|
|||
| 16 | SlackInvite::class |
||
| 17 | ]; |
||
| 18 | |||
| 19 | private static $url_segment = 'SlackInvite'; |
||
|
1 ignored issue
–
show
|
|||
| 20 | |||
| 21 | private static $menu_title = 'Slack Invites'; |
||
|
1 ignored issue
–
show
|
|||
| 22 | |||
| 23 | private static $menu_icon = '/stripeslack/img/slack_logo.png'; |
||
|
1 ignored issue
–
show
|
|||
| 24 | |||
| 25 | |||
| 26 | public function getEditForm($id = null, $fields = null) |
||
| 27 | { |
||
| 28 | /** @var $this |Form $form */ |
||
| 29 | $form = parent::getEditForm($id, $fields); |
||
| 30 | // Slightly pointless because it only manages 1 model, but ¯\_(ツ)_/¯ |
||
| 31 | if ($this->modelClass === 'SlackInvite') { |
||
| 32 | $form->Fields() |
||
| 33 | ->fieldByName('SlackInvite') |
||
| 34 | ->getConfig() |
||
| 35 | ->addComponent( |
||
| 36 | new GridfieldInviteResendAction() |
||
| 37 | ); |
||
| 38 | } |
||
| 39 | |||
| 40 | return $form; |
||
| 41 | } |
||
| 43 |
This check marks private properties in classes that are never used. Those properties can be removed.