Issues (480)

src/Config/ReadOnly.php (3 issues)

Severity
1
<?php
2
/**
3
 *
4
 */
5
6
namespace Mvc5\Config;
7
8
trait ReadOnly
9
{
10
    /**
11
     *
12
     */
13
    use Config {
14
        remove as protected;
15
        set as protected;
16
    }
17
18
    /**
19
     * @param string $name
20
     * @param mixed $value
21
     * @throws \Exception
22
     */
23 1
    function offsetSet($name, $value)
0 ignored issues
show
The parameter $name 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

23
    function offsetSet(/** @scrutinizer ignore-unused */ $name, $value)

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 $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

23
    function offsetSet($name, /** @scrutinizer ignore-unused */ $value)

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...
24
    {
25 1
        throw new \Exception('Invalid operation: object cannot be modified');
26
    }
27
28
    /**
29
     * @param string $name
30
     * @throws \Exception
31
     */
32 1
    function offsetUnset($name) : void
0 ignored issues
show
The parameter $name 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

32
    function offsetUnset(/** @scrutinizer ignore-unused */ $name) : 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...
33
    {
34 1
        throw new \Exception('Invalid operation: object cannot be modified');
35
    }
36
37
    /**
38
     * @param string $name
39
     * @param mixed $value
40
     * @throws \Exception
41
     */
42 1
    function __set($name, $value)
43
    {
44 1
        throw new \Exception('Invalid operation: object cannot be modified');
45
    }
46
47
    /**
48
     * @param string $name
49
     * @throws \Exception
50
     */
51 1
    function __unset($name) : void
52
    {
53 1
        throw new \Exception('Invalid operation: object cannot be modified');
54
    }
55
}
56