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...
16
{
17
/**
18
* Add resource.
19
*
20
* @param \SimpleAcl\Resource $resource
21
8
*/
22
public function addResource(\SimpleAcl\Resource $resource)
It seems like you call parent on a different method (addObject() instead of addResource()). Are you sure this is correct? If so, you might want to change this to $this->addObject().
This check looks for a call to a parent method whose name is different than
the method from which it is called.
It seems like you call parent on a different method (removeObjects() instead of removeResources()). Are you sure this is correct? If so, you might want to change this to $this->removeObjects().
This check looks for a call to a parent method whose name is different than
the method from which it is called.
It seems like $resourceName defined by parameter $resourceName on line 41 can also be of type object; however, SimpleAcl\Object\ObjectAggregate::removeObject() does only seem to accept object<SimpleAcl\BaseObject>|string, maybe add an additional type check?
This check looks at variables that have been passed in as parameters and are passed out again
to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
It seems like you call parent on a different method (removeObject() instead of removeResource()). Are you sure this is correct? If so, you might want to change this to $this->removeObject().
This check looks for a call to a parent method whose name is different than
the method from which it is called.
It seems like you call parent on a different method (setObjects() instead of setResources()). Are you sure this is correct? If so, you might want to change this to $this->setObjects().
This check looks for a call to a parent method whose name is different than
the method from which it is called.
It seems like you call parent on a different method (getObjects() instead of getResources()). Are you sure this is correct? If so, you might want to change this to $this->getObjects().
This check looks for a call to a parent method whose name is different than
the method from which it is called.
It seems like you call parent on a different method (getObjectNames() instead of getResourcesNames()). Are you sure this is correct? If so, you might want to change this to $this->getObjectNames().
This check looks for a call to a parent method whose name is different than
the method from which it is called.
It seems like you call parent on a different method (getObject() instead of getResource()). Are you sure this is correct? If so, you might want to change this to $this->getObject().
This check looks for a call to a parent method whose name is different than
the method from which it is called.
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.