Completed
Push — master ( f172d4...76e139 )
by devosc
02:14
created

src/Config/ReadOnly.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 *
4
 */
5
6
namespace Mvc5\Config;
7
8
use Exception;
9
10
trait ReadOnly
11
{
12
    /**
13
     *
14
     */
15
    use Config {
16
        remove as private;
17
        set as private;
18
    }
19
20
    /**
21
     * @param mixed $name
22
     * @param mixed $value
23
     * @return mixed $value
24
     * @throws Exception
25
     */
26 1
    function offsetSet($name, $value)
0 ignored issues
show
The parameter $name is not used and could be removed.

This check looks from 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.

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

Loading history...
27
    {
28 1
        throw new Exception('Invalid operation: object cannot be modified');
29
    }
30
31
    /**
32
     * @param mixed $name
33
     * @param mixed $value
34
     * @return mixed
35
     * @throws Exception
36
     */
37 1
    function __set($name, $value)
38
    {
39 1
        throw new Exception('Invalid operation: object cannot be modified');
40
    }
41
}
42