Skip to content

Commit b4655b7

Browse files
committed
Refactors RO class and removes unused code
Simplifies the `RO` class by removing redundant use statements and unused methods. Updates references to static `Functions` methods for clarity and consistency. Cleans up unnecessary whitespace and comments in both `RO` and `RW` classes. Removes an incomplete and unused test case from `ROTest`.
1 parent da0f152 commit b4655b7

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
lines changed

src/AbraFlexi/RO.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
namespace AbraFlexi;
1616

17-
use AbraFlexi\Functions;
18-
1917
/**
2018
* Základní třída pro čtení z AbraFlexi.
2119
*
@@ -933,7 +931,7 @@ public function updateApiURL(): void
933931
}
934932

935933
if (!empty($rowIdentifier)) {
936-
$this->apiURL .= '/'. Functions::urlEncode((string) $rowIdentifier);
934+
$this->apiURL .= '/'.Functions::urlEncode((string) $rowIdentifier);
937935
}
938936

939937
$this->apiURL .= '.'.$this->format;
@@ -1644,7 +1642,7 @@ public function getDataForJSON(?array $data = null): array
16441642
$data = $this->getData();
16451643
}
16461644

1647-
$dataForJson = [$this->getEvidence() => $this->objectToID($data)];
1645+
$dataForJson = [$this->getEvidence() => Functions::objectToID($data)];
16481646

16491647
if (null !== $this->action) {
16501648
$dataForJson[$this->evidence.'@action'] = $this->action;
@@ -2487,7 +2485,6 @@ public function sendByMail($to, $subject, $body, $cc = ''): bool
24872485
return $this->lastResponseCode === 200;
24882486
}
24892487

2490-
24912488
/**
24922489
* Získá dokument v daném formátu
24932490
* Obtain document in given format.

src/AbraFlexi/RW.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ public function takeData(array $data): int
323323
return parent::takeData($data);
324324
}
325325

326-
327326
/**
328327
* Control data for ReadOnly columns presence.
329328
*

tests/src/AbraFlexi/ROTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -340,18 +340,6 @@ protected function tearDown(): void
340340
// }
341341
//
342342
// /**
343-
// * @covers \AbraFlexi\RO::objectToID
344-
// *
345-
// * @todo Implement testobjectToID().
346-
// */
347-
// public function testobjectToID(): void
348-
// {
349-
// $this->assertEquals('', $this->object->objectToID());
350-
// // Remove the following lines when you implement this test.
351-
// $this->markTestIncomplete('This test has not been implemented yet.');
352-
// }
353-
//
354-
// /**
355343
// * @covers \AbraFlexi\RO::getEvidenceURL
356344
// *
357345
// * @todo Implement testgetEvidenceURL().

0 commit comments

Comments
 (0)