modules/stanford_person/modules/stanford_person_importer/src/Cap.php
Method insertOrgData
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function insertOrgData(array $org_data, TermInterface $parent = NULL): void {
if (!isset($org_data['orgCodes'])) {
return;
}
The class Cap has a coupling between objects value of 13. Consider to reduce the number of dependencies under 13. Open
Open
class Cap implements CapInterface {
use StringTranslationTrait;
/**
- Read upRead up
- Exclude checks
CouplingBetweenObjects
Since: 1.1.0
A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability
Example
class Foo {
/**
* @var \foo\bar\X
*/
private $x = null;
/**
* @var \foo\bar\Y
*/
private $y = null;
/**
* @var \foo\bar\Z
*/
private $z = null;
public function setFoo(\Foo $foo) {}
public function setBar(\Bar $bar) {}
public function setBaz(\Baz $baz) {}
/**
* @return \SplObjectStorage
* @throws \OutOfRangeException
* @throws \InvalidArgumentException
* @throws \ErrorException
*/
public function process(\Iterator $it) {}
// ...
}
Source https://phpmd.org/rules/design.html#couplingbetweenobjects
Missing class import via use statement (line '156', column '17'). Open
Open
throw new \Exception($e->getMessage());
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Declaration of function setClientSecret(string $secret) : \Drupal\stanford_person_importer\Cap
should be compatible with function setClientSecret(string $secret) : \Drupal\stanford_person_importer\CapInterface
(method returning '\Drupal\stanford_person_importer\Cap'
cannot override method returning '\Drupal\stanford_person_importer\CapInterface')
defined in /code/modules/stanford_person/modules/stanford_person_importer/src/CapInterface.php:49
Open
Open
public function setClientSecret(string $secret): self {
- Exclude checks
Declaration of function setClientId(string $client_id) : \Drupal\stanford_person_importer\Cap
should be compatible with function setClientId(string $client_id) : \Drupal\stanford_person_importer\CapInterface
(method returning '\Drupal\stanford_person_importer\Cap'
cannot override method returning '\Drupal\stanford_person_importer\CapInterface')
defined in /code/modules/stanford_person/modules/stanford_person_importer/src/CapInterface.php:38
Open
Open
public function setClientId(string $client_id): self {
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must start with a capital letter Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must start with a capital letter Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must start with a capital letter Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must start with a capital letter Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must start with a capital letter Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must start with a capital letter Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must end with a full stop Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must start with a capital letter Open
Open
* {@inheritDoc}
- Exclude checks
Doc comment short description must start with a capital letter Open
Open
* {@inheritDoc}
- Exclude checks