Total Complexity | 4 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | class Report extends RW { |
||
18 | |||
19 | /** |
||
20 | * Evidence užitá objektem. |
||
21 | * Evidence used by object. |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | public $evidence = 'report'; |
||
26 | |||
27 | /** |
||
28 | * Načte záznam z FlexiBee a uloží v sobě jeho data |
||
29 | * Read FlexiBee record and store it inside od object |
||
30 | * |
||
31 | * @param int|string $id ID or conditions |
||
32 | * |
||
33 | * @return int počet načtených položek |
||
34 | */ |
||
35 | public function loadFromAbraFlexi($id = null) { |
||
36 | if (strstr($id, 'code:')) { //Dirty Hack ⚠ Error 400: Entita 'Report' neobsahuje kód nebo ho nelze použít jako ID (není unikátní) |
||
37 | $candidates = $this->getColumnsFromAbraFlexi(['id', 'kod'], null, 'kod'); |
||
38 | if (array_key_exists(\FlexiPeeHP\RO::uncode($id), $candidates)) { |
||
39 | $id = intval($candidates[\FlexiPeeHP\RO::uncode($id)]['id']); |
||
40 | } |
||
41 | } |
||
42 | return parent::loadFromAbraFlexi($id); |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * Update $this->apiURL |
||
47 | */ |
||
48 | public function updateApiURL() { |
||
54 | } |
||
55 | |||
57 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.