Passed
Push — master ( ca7167...276d5c )
by Fabian
06:10
created

AddUserTab::beforeToHtml()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 14
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 1
1
<?php
2
3
namespace Firegento\DevDashboard\Plugin;
4
5
6
class AddUserTab
7
{
8
9
    /**
10
     * @param \Magento\User\Block\User\Edit\Tabs $subject
11
     * @throws \Exception
12
     * @throws \Magento\Framework\Exception\LocalizedException
13
     */
14
    public function beforeToHtml(\Magento\User\Block\User\Edit\Tabs $subject)
0 ignored issues
show
Bug introduced by
The type Magento\User\Block\User\Edit\Tabs was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
15
    {
16
        $subject->addTabAfter(
17
            'devdashboardconfig',
18
            [
19
                'label' => __('Dashboard Config'),
0 ignored issues
show
Bug introduced by
The function __ was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
                'label' => /** @scrutinizer ignore-call */ __('Dashboard Config'),
Loading history...
20
                'title' => __('Dashboard Config'),
21
                'content' => $subject->getLayout()->createBlock('\Firegento\DevDashboard\Block\UserEditTab')->toHtml(),
22
                'active' => true
23
            ],
24
            'roles_section'
25
        );
26
27
        return [];
28
29
    }
30
}