Issues (480)

src/Config/PropertyAccess.php (3 issues)

Labels
Severity
1
<?php
2
/**
3
 *
4
 */
5
6
namespace Mvc5\Config;
7
8
trait PropertyAccess
9
{
10
    /**
11
     * @param string $name
12
     * @return mixed
13
     */
14 1
    function __get($name)
15
    {
16 1
        return $this->get($name);
0 ignored issues
show
It seems like get() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

16
        return $this->/** @scrutinizer ignore-call */ get($name);
Loading history...
17
    }
18
19
    /**
20
     * @param string $name
21
     * @return bool
22
     */
23 2
    function __isset($name) : bool
24
    {
25 2
        return $this->has($name);
26
    }
27
28
    /**
29
     * @param string $name
30
     * @param mixed $value
31
     * @return mixed
32
     */
33 3
    function __set($name, $value)
34
    {
35 3
        return $this->set($name, $value);
0 ignored issues
show
It seems like set() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

35
        return $this->/** @scrutinizer ignore-call */ set($name, $value);
Loading history...
36
    }
37
38
    /**
39
     * @param string $name
40
     */
41 1
    function __unset($name) : void
42
    {
43 1
        $this->remove($name);
0 ignored issues
show
It seems like remove() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

43
        $this->/** @scrutinizer ignore-call */ 
44
               remove($name);
Loading history...
44 1
    }
45
}
46