Review main Merged

37402[TASK] Code cleanup: Clipboard.php

Michael Oehlhof CR +2 V +2 Normal +54 −26 updated 03/02/15, 20:51

Commit message

backend/Classes/Clipboard/Clipboard.php
To get it "green" in PhpStorm several changes were made:

- set correct parameter type in PhpDoc comment
- set correct return type in PhpDoc comment
- add missing return values
- add getter for LanguageService
- add getter for BackendUser
- add getter for DatabaseConnection

Review

  • Code review CR +2
    • Christian Kuhn +2
  • Verified V +2
    • Christian Kuhn +2

Issues 1

Files 1

Review log 5

  1. Michael Oehlhof uploaded patch set 1 03/01/15, 11:30

  2. Christian Kuhn commented on patch set 1 03/01/15, 11:51

    Clipboard.php:843

    did you check if this may give headaches on usage? it changes the return value, was null before if the above if did not match ...
  3. Michael Oehlhof commented on patch set 1 03/01/15, 18:17

    The return value is always used as an array, no check for NULL. In backend/Classes/Clickmenu/Clickmenu.php line 284ff: $selItem = $this->clipObj->getSelectedRecord(); $elInfo = array( GeneralUtility::fixed_lgd_cs($selItem['_RECORD_TITLE'], $this->backendUser->uc['titleLen']), and in Clipboard.php at line 648: $selItem = $this->getSelectedRecord(); $selRecTitle = $selItem['_RECORD_TITLE'];
  4. Christian Kuhn voted on patch set 1 CR +2 V +2 03/02/15, 20:50

  5. Christian Kuhn merged patch set 1 03/02/15, 20:51