Skip to content

Commit

Permalink
phpcbf
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Apr 18, 2024
1 parent b322c26 commit 922b186
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions galette/lib/Galette/IO/PdfMembersCards.php
Expand Up @@ -139,7 +139,7 @@ public function init(): void
$print_logo = new PrintLogo();
$this->logofile = $print_logo->getPath();

// Set logo size to max 20% width or max 25% height
// Set logo size to max 20% width or max 25% height
$ratio = $print_logo->getWidth() / $print_logo->getHeight();
if ($ratio < 1.71) {
if ($print_logo->getHeight() > 0.25 * $this->wi * 3.78) {
Expand Down Expand Up @@ -232,8 +232,8 @@ public function drawCards(array $members): void
$photofile = $photo->getPath();

// Photo 100x130 and logo
$this->Image($photofile, $x0 + 1 , $y0 + 1, round($this->wi / 3.5));
$this->Image($this->logofile, $xl - 1 , $y0 + 1, round($this->wlogo));
$this->Image($photofile, $x0 + 1, $y0 + 1, round($this->wi / 3.5));
$this->Image($this->logofile, $xl - 1, $y0 + 1, round($this->wlogo));

// Color=#8C8C8C: Shadow of the year
$this->SetTextColor(140);
Expand All @@ -251,7 +251,7 @@ public function drawCards(array $members): void
'B',
$this->year_font_size
) / 2 ;
$this->SetXY($xan_cot , $y0 + 1 );
$this->SetXY($xan_cot, $y0 + 1);
$this->writeHTML('<strong>' . $an_cot . '</strong>', false, 0);

Check failure on line 255 in galette/lib/Galette/IO/PdfMembersCards.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.1

Parameter #3 $fill of method TCPDF::writeHTML() expects bool, int given.

Check failure on line 255 in galette/lib/Galette/IO/PdfMembersCards.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.3

Parameter #3 $fill of method TCPDF::writeHTML() expects bool, int given.

Check failure on line 255 in galette/lib/Galette/IO/PdfMembersCards.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.1

Parameter #3 $fill of method TCPDF::writeHTML() expects bool, int given.

Check failure on line 255 in galette/lib/Galette/IO/PdfMembersCards.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.3

Parameter #3 $fill of method TCPDF::writeHTML() expects bool, int given.
// Colored Text (Big label, id, year)
$this->SetTextColor($fcol['R'], $fcol['G'], $fcol['B']);
Expand Down Expand Up @@ -288,7 +288,7 @@ public function drawCards(array $members): void
8,
'B'
);
$this->SetXY($x0 + round($this->wi / 3.5) + 2 , $y0 + $this->hlogo + 3);
$this->SetXY($x0 + round($this->wi / 3.5) + 2, $y0 + $this->hlogo + 3);
//$this->setX($x0 + 27);
$this->writeHTML('<strong>' . $nom_adh_ext . '</strong>', true, 0);

Check failure on line 293 in galette/lib/Galette/IO/PdfMembersCards.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.1

Parameter #3 $fill of method TCPDF::writeHTML() expects bool, int given.

Check failure on line 293 in galette/lib/Galette/IO/PdfMembersCards.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.3

Parameter #3 $fill of method TCPDF::writeHTML() expects bool, int given.

Check failure on line 293 in galette/lib/Galette/IO/PdfMembersCards.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.1

Parameter #3 $fill of method TCPDF::writeHTML() expects bool, int given.

Check failure on line 293 in galette/lib/Galette/IO/PdfMembersCards.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.3

Parameter #3 $fill of method TCPDF::writeHTML() expects bool, int given.

Expand Down Expand Up @@ -360,10 +360,10 @@ public static function getCols(): int
{
global $preferences;

$nbcols = round(((210 - $preferences->pref_card_marges_h * 2) / $preferences->pref_card_hsize),0,PHP_ROUND_HALF_DOWN) ;
$nbcols = round(((210 - $preferences->pref_card_marges_h * 2) / $preferences->pref_card_hsize), 0, PHP_ROUND_HALF_DOWN) ;
if ((($nbcols - 1) * $preferences->pref_card_hspace + $preferences->pref_card_marges_h * 2 + $preferences->pref_card_hsize * $nbcols) > 210) {
$nbcols = $nbcols - 1 ;
}
}
return $nbcols ;

Check failure on line 367 in galette/lib/Galette/IO/PdfMembersCards.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.1

Method Galette\IO\PdfMembersCards::getCols() should return int but returns float.

Check failure on line 367 in galette/lib/Galette/IO/PdfMembersCards.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.3

Method Galette\IO\PdfMembersCards::getCols() should return int but returns float.

Check failure on line 367 in galette/lib/Galette/IO/PdfMembersCards.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.1

Method Galette\IO\PdfMembersCards::getCols() should return int but returns float.

Check failure on line 367 in galette/lib/Galette/IO/PdfMembersCards.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.3

Method Galette\IO\PdfMembersCards::getCols() should return int but returns float.
}

Expand All @@ -376,10 +376,10 @@ public static function getRows(): int
{
global $preferences;

$nbrows = round(((297 - $preferences->pref_card_marges_v * 2) / $preferences->pref_card_vsize),0,PHP_ROUND_HALF_DOWN) ;
$nbrows = round(((297 - $preferences->pref_card_marges_v * 2) / $preferences->pref_card_vsize), 0, PHP_ROUND_HALF_DOWN) ;
if ((($nbrows - 1) * $preferences->pref_card_vspace + $preferences->pref_card_marges_v * 2 + $preferences->pref_card_vsize * $nbrows) > 297) {
$nbrows = $nbrows - 1 ;
}
}

return $nbrows ;

Check failure on line 384 in galette/lib/Galette/IO/PdfMembersCards.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.1

Method Galette\IO\PdfMembersCards::getRows() should return int but returns float.

Check failure on line 384 in galette/lib/Galette/IO/PdfMembersCards.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.3

Method Galette\IO\PdfMembersCards::getRows() should return int but returns float.

Check failure on line 384 in galette/lib/Galette/IO/PdfMembersCards.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.1

Method Galette\IO\PdfMembersCards::getRows() should return int but returns float.

Check failure on line 384 in galette/lib/Galette/IO/PdfMembersCards.php

View workflow job for this annotation

GitHub Actions / Lint on PHP 8.3

Method Galette\IO\PdfMembersCards::getRows() should return int but returns float.
}
Expand Down

0 comments on commit 922b186

Please sign in to comment.