It seems like the GitHub access token used for retrieving details about this repository from
GitHub became invalid. This might prevent certain types of inspections from being run (in
particular,
everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
8
{
9
/**
10
* @var \BFW\Memcache\MemcacheInterface|null $memcached The class used
11
* to connect to memcache(d) server.
12
* The class name should be declared into config file.
13
*/
14
protected $memcached;
15
16
/**
17
* {@inheritdoc}
18
*/
19
public function __invoke()
20
{
21
return $this->memcached;
22
}
23
24
/**
25
* Getter accessor to property memcached
26
*
27
* @return \BFW\Memcache\MemcacheInterface|null
28
*/
29
public function getMemcached()
30
{
31
return $this->memcached;
32
}
33
34
/**
35
* {@inheritdoc}
36
* Load and initialize le memcached object
37
*/
38
public function init()
39
{
40
$this->loadMemcached();
41
$this->initStatus = true;
42
}
43
44
/**
45
* Connect to memcache(d) server with the class declared in config file
46
*
47
* @return Object
48
*
49
* @throws Exception If memcached is enabled but no class is define. Or if
50
* The class declared into the config is not found.
The method getConfig does not exist on object<BFW\Application>? Since you implemented __call, maybe consider adding a @method annotation.
If you implement __call and you know which methods are available, you
can improve IDE auto-completion and static analysis by adding a @method annotation to
the class.
This is often the case, when __call is implemented by a parent class and
only the child class knows which methods exist:
classParentClass{private$data=array();publicfunction__call($method,array$args){if(0===strpos($method,'get')){return$this->data[strtolower(substr($method,3))];}thrownew\LogicException(sprintf('Unsupported method: %s',$method));}}/** * If this class knows which fields exist, you can specify the methods here: * * @method string getName() */classSomeClassextendsParentClass{}
It seems like new \BFW\Memcached() of type object<BFW\Memcached> is incompatible with the declared type object<BFW\Memcache\MemcacheInterface>|null of property $memcached.
Our type inference engine has found an assignment to a property that is incompatible
with the declared type of that property.
Either this assignment is in error or the assigned type should be added
to the documentation/type hint for that property..
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.