Passed
Push — v5.x ( 26d105...7911f3 )
by Thierry
03:11
created

Page   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 7
c 1
b 0
f 0
dl 0
loc 22
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
/**
4
 * Page.php - A page link for the Jaxon Paginator
5
 *
6
 * @package jaxon-core
0 ignored issues
show
Coding Style introduced by
Package name "jaxon-core" is not valid; consider "Jaxoncore" instead
Loading history...
7
 * @copyright 2024 Thierry Feuzeu
8
 * @license https://opensource.org/licenses/MIT MIT License
9
 * @link https://github.com/jaxon-php/jaxon-core
10
 */
0 ignored issues
show
Coding Style introduced by
PHP version not specified
Loading history...
Coding Style introduced by
Missing @category tag in file comment
Loading history...
Coding Style introduced by
Missing @author tag in file comment
Loading history...
11
12
namespace Jaxon\Plugin\Response\Paginator;
13
14
class Page
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class Page
Loading history...
15
{
16
    /**
17
     * @var string
18
     */
19
    public $sType;
0 ignored issues
show
Coding Style introduced by
Expected 1 blank line(s) before first member var; 0 found
Loading history...
20
21
    /**
22
     * @var string
23
     */
24
    public $sText;
25
26
    /**
27
     * @var string
28
     */
29
    public $nNumber;
30
31
    public function __construct(string $sType, string $sText, int $nNumber)
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function __construct()
Loading history...
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
32
    {
33
        $this->sType = $sType;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 3 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
34
        $this->sText = $sText;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 3 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
35
        $this->nNumber = $nNumber;
36
    }
37
}