Review main Abandoned

57464[TASK] Merge multiple isset calls to one statement

Wouter Wolters CR 0 V 0 Hard +127 −241 updated 10/28/18, 16:13

Commit message

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 49

Show 29 more files

Review log 711

  1. Wouter Wolters uploaded patch set 1 07/04/18, 18:04

  2. TYPO3com voted on patch set 1 V -1 07/04/18, 18:04 Completed build in 17s on Wed, 4 Jul, 08:04 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-25087

  3. Wouter Wolters uploaded patch set 2 07/04/18, 18:04

  4. TYPO3com voted on patch set 2 V +1 07/04/18, 18:12 Completed build in 07m 45s on Wed, 4 Jul, 08:12 PM Test Summary: 32880 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-25088

  5. Mathias Brodala commented on patch set 2 CR -1 07/05/18, 08:03

    In general I would prefer if the isset() arguments would be on their own line to a) improve readability and b) reduce the diff for following changes.

    BackendModuleRepository.php:207

    This can be merged into a single check.

    FormProtectionFactory.php:142

    This should be reverted since the current version properly checks from the outside whereas the new version makes an assumption in between only to check the base for that assumption afterwards.

    Typo3DbBackend.php:599

    This can be dropped since it is covered by the following two isset() checks. BTW: why where these not merged?

    Typo3DbBackend.php:602

    The isset can be dropped here since it is checked one line above already.

    EmConfUtility.php:88

    This can be removed since it is covered by the following checks.

    EmConfUtility.php:99

    Same here.

    EmConfUtility.php:102

    Same here.

    SaveToDatabaseFinisher.php:222

    This looks very confusing and should be reordered to group the $elementValue checks and the other checks. BTW, the basic "$elementsConfiguration[$elementIdentifier]" check can be dropped since it is covered by the other checks.

    FormDefinition.php:495

    While technically working it does not make sense to check for an array key and only afterwards if the subject is an array at all. This should be reverted or rewritten e.g. using the null coalesce operator.

    AbstractRenderable.php:186

    Same here.

    FormDefinitionArrayConverter.php:96

    Same here. Also the is_int($key) check should come first.

    ContentObjectRenderer.php:1120

    This does not make sense since the current version ensures that the $layoutKey is not empty before using it as array key.

    ContentObjectRenderer.php:1723

    Same here.

    ExtensionConfigurationService.php:226

    This can be dropped.

    BrowseLinksController.php:223

    Indentation is off here.

    RichTextNodeResolver.php:55

    This can be simplified a bit using the null coalesce operator.
  6. Wouter Wolters uploaded patch set 3 07/23/18, 19:13

  7. TYPO3com voted on patch set 3 V -1 07/23/18, 19:14 Completed build in 18s on Mon, 23 Jul, 09:14 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-25688

  8. Wouter Wolters uploaded patch set 4 07/23/18, 19:19

  9. TYPO3com voted on patch set 4 V +1 07/23/18, 19:29 Completed build in 09m 21s on Mon, 23 Jul, 09:29 PM Test Summary: 33448 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-25690

  10. Susi Moog commented on patch set 4 CR -1 07/29/18, 13:36

    BackendUserAuthentication.php:601

    why are these not merged?

    BackendUserAuthentication.php:2722

    accessing "user" potentially on a non-object now as the instanceof check isn't done before.

    TcaMigration.php:1999

    braces missing, the evaluation of the condition now changed as the last part (OR) is now an OR for everything instead of just for enableRichtext

    DateTimeConverter.php:181

    why keep the year separate?

    SaveToDatabaseFinisher.php:223

    recheck this condition please, I guess it's wrong now (should be semantically: if value is null or empty and skipIfValueIsEmpty is enabled, continue) - in this case for readability / following the logic I think it makes sense to keep the order (value check, then isset // skip)

    AbstractRenderable.php:209

    is_array will now throw a notice if $validatorIdentifier is not set.

    ExtensionConfigurationService.php:222

    results in "undefined index" subcat_name (as the isset only takes care of the notice on subCategories, not of configurationOption)

    RichTextNodeResolver.php:54

    the comment doesn't make sense anymore at this place. either get back the old comments and add them to the according places or remove fully.

    GridDataService.php:480

    can these be merged, too?
  11. Benni Mack abandoned the change 10/28/18, 16:13

    abandoned, we'll go with another take on this.