Passed
Push — master ( 41bbc1...0e967e )
by Conrad
01:56
created

src/Extensions/GroupExtension.php (1 issue)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace AdvancedLearning\Oauth2Server\Extensions;
4
5
use AdvancedLearning\Oauth2Server\Models\Scope;
6
use SilverStripe\Forms\FieldList;
7
use SilverStripe\Forms\GridField\GridField;
8
use SilverStripe\Forms\GridField\GridFieldConfig_RelationEditor;
9
use SilverStripe\ORM\DataExtension;
10
11
/**
12
 * Optionally adds scopes to groups, allows checking permissions for a Member based on scopes.
13
 *
14
 * @package AdvancedLearning\Oauth2Server\Extensions
15
 */
16
class GroupExtension extends DataExtension
17
{
18
    private static $many_many = [
19
        'Scopes' => Scope::class
20
    ];
21
22
    public function updateCMSFields(FieldList $fields)
23
    {
24
        $fields->addFieldToTab('Root.Oauth', GridField::create(
25
            'Scopes',
26
            'Scopes',
27
            $this->Scopes(),
0 ignored issues
show
The method Scopes() does not seem to exist on object<AdvancedLearning\...ensions\GroupExtension>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
28
            GridFieldConfig_RelationEditor::create()
29
        ));
30
    }
31
}