MagicTrait::__toArray()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
0 ignored issues
show
Coding Style introduced by
Trait found in ".php" file; use ".inc" extension instead
Loading history...
Coding Style introduced by
This file is missing a doc 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 "MagicTrait.php" doesn't match the expected filename "magictrait.php"
Loading history...
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
declare(strict_types=1);
4
5
namespace PHPAbles\Arrayable;
6
7
trait MagicTrait 
0 ignored issues
show
Coding Style introduced by
Missing doc comment for trait MagicTrait
Loading history...
8
{
0 ignored issues
show
Coding Style introduced by
Expected 0 spaces before opening brace; 1 found
Loading history...
Coding Style introduced by
Opening brace should be on the same line as the declaration for trait MagicTrait
Loading history...
9
    final public function __toArray(): array
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 0 found
Loading history...
Coding Style introduced by
Method name "MagicTrait::__toArray" is invalid; only PHP magic methods should be prefixed with a double underscore
Loading history...
Coding Style introduced by
Public method name "MagicTrait::__toArray" must not be prefixed with an underscore
Loading history...
Coding Style introduced by
Missing doc comment for function __toArray()
Loading history...
10
    {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on the same line as the declaration
Loading history...
11
        return $this->toArray();
12
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 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 __toArray()
Loading history...
13
    
14
    abstract public function toArray(): array;
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function toArray()
Loading history...
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
15
}
0 ignored issues
show
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...
16