Method execute
has 30 lines of code (exceeds 25 allowed). Consider refactoring.
public function execute(Command $command) : CollectionInterface
{
$xml = $this->connection->execute($command, self::GRAMMAR_PATH);
$errorCode = (int) $xml->error['code'];
$dataSource = $xml->datasource;
Function execute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
public function execute(Command $command) : CollectionInterface
{
$xml = $this->connection->execute($command, self::GRAMMAR_PATH);
$errorCode = (int) $xml->error['code'];
$dataSource = $xml->datasource;
Function createRecord
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
private function createRecord(SimpleXMLElement $recordData, array $metadata, int $prefixLength = 0) : array
{
$record = [
'record-id' => (int) $recordData['record-id'],
'mod-id' => (int) $recordData['mod-id'],
Function parseRecord
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
private function parseRecord(SimpleXMLElement $recordData, array $metadata) : array
{
$record = $this->createRecord($recordData, $metadata);
if (isset($recordData->relatedset)) {
The class ResultSetClient has a coupling between objects value of 17. Consider to reduce the number of dependencies under 13.
final class ResultSetClient implements ResultSetClientInterface
{
const GRAMMAR_PATH = '/fmi/xml/fmresultset.xml';
/**
Avoid using static access to class '\Soliant\SimpleFM\Client\Exception\FileMakerException' in method 'execute'.
throw FileMakerException::fromErrorCode($errorCode);
Avoid using static access to class '\Soliant\SimpleFM\Client\ResultSet\Exception\ParseException' in method 'execute'.
throw ParseException::fromConcreteException(
(string) $dataSource['database'],
(string) $dataSource['table'],
(string) $dataSource['layout'],
$e
Avoid using static access to class '\Soliant\SimpleFM\Client\ResultSet\Exception\UnknownFieldException' in method 'getFieldTransformer'.
throw UnknownFieldException::fromUnknownField();
Avoid using static access to class '\Soliant\SimpleFM\Client\ResultSet\Exception\ParseException' in method 'getFieldTransformer'.
throw ParseException::fromInvalidFieldType(
(string) $fieldDefinition['name'],
(string) $fieldDefinition['result']
);
Avoid using static access to class '\Soliant\SimpleFM\Client\ResultSet\Exception\UnknownFieldException' in method 'execute'.
throw UnknownFieldException::fromConcreteException(
(string) $dataSource['database'],
(string) $dataSource['table'],
(string) $dataSource['layout'],
$e
There are no issues that match your filters.