Issues (200)

ByteStream/ByteReaderDisableWriteAccessTrait.php (3 issues)

Severity
1
<?php
2
3
/**
4
 * This file is part of the sj-i/php-profiler package.
5
 *
6
 * (c) sji <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace PhpProfiler\Lib\ByteStream;
15
16
use LogicException;
17
18
trait ByteReaderDisableWriteAccessTrait
19
{
20
    /**
21
     * @param mixed $offset
22
     * @param mixed $value
23
     */
24
    public function offsetSet($offset, $value): void
0 ignored issues
show
The parameter $value 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

24
    public function offsetSet($offset, /** @scrutinizer ignore-unused */ $value): void

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...
The parameter $offset 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

24
    public function offsetSet(/** @scrutinizer ignore-unused */ $offset, $value): void

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...
25
    {
26
        throw new LogicException('write access is forbidden for ByteReaderInteface');
27
    }
28
29
    /** @param mixed $offset */
30
    public function offsetUnset($offset): void
0 ignored issues
show
The parameter $offset 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

30
    public function offsetUnset(/** @scrutinizer ignore-unused */ $offset): void

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...
31
    {
32
        throw new LogicException('write access is forbidden for ByteReaderInteface');
33
    }
34
}
35