Passed
Push — v5.x ( 00e299...57c2ac )
by Thierry
11:16
created

QuestionTrait::confirm()   A

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 2
1
<?php
2
3
/**
4
 * QuestionTrait.php - Default methods for confirm question.
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
 * @author Thierry Feuzeu <[email protected]>
8
 * @copyright 2024 Thierry Feuzeu <[email protected]>
9
 * @license https://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License
10
 * @link https://github.com/jaxon-php/jaxon-core
11
 */
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...
12
13
namespace Jaxon\App\Dialog\Library;
14
15
trait QuestionTrait
0 ignored issues
show
Coding Style introduced by
Missing doc comment for trait QuestionTrait
Loading history...
16
{
17
    /**
18
     * Add a confirm question to a function call.
19
     *
20
     * @param string $sQuestion
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
21
     * @param array $aArgs
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
Coding Style introduced by
Expected 2 spaces after parameter type; 1 found
Loading history...
22
     *
23
     * @return array
24
     */
25
    public function confirm(string $sQuestion, array $aArgs = []): array
0 ignored issues
show
Unused Code introduced by
The parameter $sQuestion is not used and could be removed. ( Ignorable by Annotation )

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

25
    public function confirm(/** @scrutinizer ignore-unused */ string $sQuestion, array $aArgs = []): array

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $aArgs is not used and could be removed. ( Ignorable by Annotation )

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

25
    public function confirm(string $sQuestion, /** @scrutinizer ignore-unused */ array $aArgs = []): array

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Coding Style introduced by
Expected 2 blank lines before function; 0 found
Loading history...
26
    {
27
        return [];
28
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
29
}
30