AdsenseFacade   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 2
dl 0
loc 8
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getFacadeAccessor() 0 3 1
1
<?php
0 ignored issues
show
Coding Style introduced by
Class found in ".php" file; use ".inc" extension instead
Loading history...
Coding Style introduced by
There must be no blank lines before the file comment
Loading history...
Coding Style introduced by
The PHP open tag does not have a corresponding PHP close tag
Loading history...
Coding Style introduced by
Filename "AdsenseFacade.php" doesn't match the expected filename "adsensefacade.php"
Loading history...
2
3
/**
0 ignored issues
show
introduced by
Namespaced classes, interfaces and traits should not begin with a file doc comment
Loading history...
4
 * Google Adsense Ads for Laravel.
5
 *
6
 * Package for easily including Google Adsense Ad units
7
 * in Laravel and Lumen.
8
 *
9
 * @developer Martin Butt <https://www.martinbutt.com/>
0 ignored issues
show
Coding Style introduced by
The tag in position 1 should be the @package tag
Loading history...
10
 *
11
 * @copyright Copyright (c) 2021 Martin Butt
0 ignored issues
show
Coding Style Documentation introduced by
Expected "xxxx-xxxx Squiz Pty Ltd (ABN 77 084 670 600)" for copyright declaration
Loading history...
Coding Style introduced by
The tag in position 2 should be the @subpackage tag
Loading history...
Coding Style introduced by
@copyright tag must contain a year and the name of the copyright holder
Loading history...
12
 * @license   MIT
0 ignored issues
show
Coding Style introduced by
The tag in position 3 should be the @author tag
Loading history...
Coding Style introduced by
@license tag must contain a URL and a license name
Loading history...
introduced by
Tag value indented incorrectly; expected 1 space but found 3
Loading history...
13
 *
14
 * Copyright (c) 2016 Galen Han
15
 * Copyright (c) 2019 Crypto Technology srl
16
 * Copyright (c) 2021 Martin Butt
17
 *
18
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
0 ignored issues
show
introduced by
Line exceeds 80 characters; contains 82 characters
Loading history...
19
 * this software and associated documentation files (the "Software"), to deal in
20
 * the Software without restriction, including without limitation the rights to
21
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
0 ignored issues
show
introduced by
Line exceeds 80 characters; contains 83 characters
Loading history...
22
 * the Software, and to permit persons to whom the Software is furnished to do so,
0 ignored issues
show
introduced by
Line exceeds 80 characters; contains 82 characters
Loading history...
23
 * subject to the following conditions:
24
 *
25
 * The above copyright notice and this permission notice shall be included in all
0 ignored issues
show
introduced by
Line exceeds 80 characters; contains 81 characters
Loading history...
26
 * copies or substantial portions of the Software.
27
 *
28
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
0 ignored issues
show
introduced by
Line exceeds 80 characters; contains 83 characters
Loading history...
30
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
0 ignored issues
show
introduced by
Line exceeds 80 characters; contains 81 characters
Loading history...
31
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
0 ignored issues
show
introduced by
Line exceeds 80 characters; contains 81 characters
Loading history...
32
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
33
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34
 */
0 ignored issues
show
Coding Style introduced by
PHP version not specified
Loading history...
Coding Style Documentation introduced by
Missing @package tag in file comment
Loading history...
Coding Style Documentation introduced by
Missing @subpackage tag in file comment
Loading history...
Coding Style Documentation introduced by
Missing @author tag in file comment
Loading history...
Coding Style introduced by
Missing @category tag in file comment
Loading history...
Coding Style introduced by
Missing @link tag in file comment
Loading history...
35
36
declare(strict_types=1);
37
38
namespace MartinButt\Laravel\Adsense\Facades;
39
40
use Illuminate\Support\Facades\Facade;
41
42
/**
43
 * Class AdsenseFacade.
44
 *
45
 * @method static \Illuminate\View\View|\Illuminate\Contracts\View\Factory ads(string $ads)
0 ignored issues
show
Coding Style Documentation introduced by
@method tag is not allowed in class comment
Loading history...
46
 * @method static \Illuminate\View\View|\Illuminate\Contracts\View\Factory javascript()
0 ignored issues
show
Coding Style Documentation introduced by
@method tag is not allowed in class comment
Loading history...
47
 *
48
 * @see \Illuminate\Support\Facades\Facade
0 ignored issues
show
Coding Style Documentation introduced by
@see tag is not allowed in class comment
Loading history...
49
 */
0 ignored issues
show
introduced by
The class short comment should describe what the class does and not simply repeat the class name
Loading history...
Coding Style introduced by
Missing @category tag in class comment
Loading history...
Coding Style introduced by
Missing @package tag in class comment
Loading history...
Coding Style introduced by
Missing @author tag in class comment
Loading history...
Coding Style introduced by
Missing @license tag in class comment
Loading history...
Coding Style introduced by
Missing @link tag in class comment
Loading history...
50
final class AdsenseFacade extends Facade
51
{
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration for class AdsenseFacade
Loading history...
introduced by
Opening brace should be on the same line as the declaration
Loading history...
52
    /**
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 2 spaces, found 4
Loading history...
53
     * {@inheritdoc}
54
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
55 1
    protected static function getFacadeAccessor()
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 2 spaces, found 4
Loading history...
Coding Style introduced by
Expected 1 blank line before function; 0 found
Loading history...
56
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
57 1
        return 'adsense';
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 4 spaces, found 8
Loading history...
58
    }
0 ignored issues
show
Coding Style introduced by
Line indented incorrectly; expected 2 spaces, found 4
Loading history...
Coding Style introduced by
Expected 1 blank line after function; 0 found
Loading history...
Coding Style introduced by
Expected 1 blank line before closing function brace; 0 found
Loading history...
Coding Style introduced by
Expected //end getFacadeAccessor()
Loading history...
59
}
0 ignored issues
show
Coding Style introduced by
Expected //end class
Loading history...
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
60