diff --git a/module/VuFind/src/VuFind/Cover/Generator.php b/module/VuFind/src/VuFind/Cover/Generator.php index b19128a5eb736bb085545721fb81b7e63ccc9461..f75268d4b13a9246d2319ad2e5f93f382b85f83f 100644 --- a/module/VuFind/src/VuFind/Cover/Generator.php +++ b/module/VuFind/src/VuFind/Cover/Generator.php @@ -341,7 +341,8 @@ class Generator $im, '...', 5, - $this->settings->topPadding + $this->settings->maxLines * $lineHeight, + $this->settings->topPadding + + $this->settings->maxLines * $lineHeight, $this->settings->titleFont, $this->settings->fontSize + 1, $this->black, @@ -495,7 +496,9 @@ class Generator $v = $k / 2 < 1 ? $box : -$box; for ($i = 0;$i < 16;$i++) { if ($bc[$i] == "1") { - imagefilledrectangle($im, $x, $y, $x + $box - 1, $y + $box - 1, $color); + imagefilledrectangle( + $im, $x, $y, $x + $box - 1, $y + $box - 1, $color + ); } $x += $u; if ($x >= $this->settings->size || $x < 0) { diff --git a/module/VuFind/src/VuFind/ILS/Driver/PICA.php b/module/VuFind/src/VuFind/ILS/Driver/PICA.php index 2db621e19e67255c0fc83daaad68f0c7a2299287..b0d349154eaeb291a455e2863c99d1b11fca918b 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/PICA.php +++ b/module/VuFind/src/VuFind/ILS/Driver/PICA.php @@ -256,7 +256,8 @@ class PICA extends DAIA if ($position_state !== null && substr($postit, $position_state + 24, 8) !== 'bestellt' ) { - $reservations[] = substr($postit, $position_reservations + 24, 1); + $reservations[] + = substr($postit, $position_reservations + 24, 1); $expiration[] = substr($postit, $position_expire + 24, 10); $renewals[] = $this->getRenewals($completeValue); $closing_title = strpos($postit, '</td>', $position_title); @@ -437,7 +438,8 @@ class PICA extends DAIA // first class=plain => description // length = position of next </td> - startposition $nextClosingTd = strpos($postit, '</td>', $pos); - $description[$i] = substr($postit, $pos + 18, ($nextClosingTd - $pos - 18)); + $description[$i] + = substr($postit, $pos + 18, ($nextClosingTd - $pos - 18)); $position = $pos + 1; // next class=plain => date of fee creation $pos = strpos($postit, '<td class="plain"', $position); @@ -567,7 +569,9 @@ class PICA extends DAIA $position = strpos( $postit_lol, '<td class="value-small">bestellt</td>', $position + 1 ); - $pos = strpos($postit_lol, '<td class="value-small">', ($position - 100)); + $pos = strpos( + $postit_lol, '<td class="value-small">', ($position - 100) + ); $nextClosingTd = strpos($postit_lol, '</td>', $pos); $value = substr($postit_lol, $pos + 27, ($nextClosingTd - $pos - 27)); $ppns[] = $this->getPpnByBarcode($value); diff --git a/module/VuFind/src/VuFind/Statistics/Record.php b/module/VuFind/src/VuFind/Statistics/Record.php index b1d46cd841e2a90e465f00d06cc3f6eee7352f8f..f4cfe198f86b04abfdfd720277aa096661436091 100644 --- a/module/VuFind/src/VuFind/Statistics/Record.php +++ b/module/VuFind/src/VuFind/Statistics/Record.php @@ -99,7 +99,8 @@ class Record extends AbstractBase 'source' => $source ]; // Insert sort (limit to listLength) - for ($i = 0;$i < $listLength - 1 && $i < count($reference);$i++) { + $refCount = count($reference); + for ($i = 0; $i < $listLength - 1 && $i < $refCount; $i++) { if ($count > $reference[$i]['count']) { // Insert in order array_splice($reference, $i, 0, [$newRecord]); diff --git a/module/VuFind/src/VuFind/Statistics/Search.php b/module/VuFind/src/VuFind/Statistics/Search.php index 6daefcf6e075e25cfd5df0b23a5d3130e0faff7c..ebc6f3fb76834e54e43e247746027cf262bd3f8d 100644 --- a/module/VuFind/src/VuFind/Statistics/Search.php +++ b/module/VuFind/src/VuFind/Statistics/Search.php @@ -113,7 +113,8 @@ class Search extends AbstractBase 'source' => $source ]; // Insert sort (limit to listLength) - for ($i = 0;$i < $listLength - 1 && $i < count($reference);$i++) { + $refCount = count($reference); + for ($i = 0; $i < $listLength - 1 && $i < $refCount; $i++) { if ($count > $reference[$i]['count']) { // Insert in order array_splice($reference, $i, 0, [$newRecord]);