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
|
|||
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) |
|
0 ignored issues
–
show
|
|||
38 | { |
||
39 | 1 | throw new Exception('Invalid operation: object cannot be modified'); |
|
40 | } |
||
41 | } |
||
42 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.