Admidio/admidio

View on GitHub
adm_program/modules/photos/photos.php

Summary

Maintainability
B
5 hrs
Test Coverage

File photos.php has 329 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 ***********************************************************************************************
 * Show a list of all photo albums
 *
Severity: Minor
Found in adm_program/modules/photos/photos.php - About 3 hrs to fix

    Avoid deeply nested control flow statements.
    Open

                        if (strlen($albumDescription) > 200) {
                            // read first 200 chars of text, then search for last space and cut the text there. After that add a "more" link
                            $textPrev = substr($albumDescription, 0, 200);
                            $maxPosPrev = strrpos($textPrev, ' ');
                            $albumDescription = substr($textPrev, 0, $maxPosPrev) .
    Severity: Major
    Found in adm_program/modules/photos/photos.php - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if ((bool)$childPhotoAlbum->getValue('pho_locked') === false) {
                              $htmlLock = '<li><a class="dropdown-item admidio-album-lock" href="javascript:void(0)" data-id="' . $childPhotoAlbum->getValue('pho_uuid') . '" data-mode="lock">
                                                  <i class="bi bi-lock" data-bs-toggle="tooltip"></i> ' . $gL10n->get('SYS_LOCK_ALBUM') . '</a>
                                       </li>';
                          }
      Severity: Major
      Found in adm_program/modules/photos/photos.php - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status