Merge pull request #18423 from kamil-tekiela/TableStatsEps-tableDraw

Fix tableDraw in TableStatsEps
This commit is contained in:
Maurício Meneghini Fauth 2023-05-18 18:42:30 -03:00 committed by GitHub
commit d362f79fa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 3 additions and 30 deletions

View File

@ -233,13 +233,11 @@ class EpsRelationSchema extends ExportRelationSchema
/**
* Draws tables
*
* @see TableStatsEps::Table_Stats_tableDraw()
*/
private function drawTables(): void
{
foreach ($this->tables as $table) {
$table->tableDraw($this->showColor);
$table->tableDraw();
}
}
}

View File

@ -120,10 +120,8 @@ class TableStatsEps extends TableStats
* @see Eps
* @see Eps::line
* @see Eps::rect
*
* @param bool $showColor Whether to display color
*/
public function tableDraw(bool $showColor): void
public function tableDraw(): void
{
$this->diagram->rect($this->x, $this->y + 12, $this->width, $this->heightCell, 1);
$this->diagram->showXY($this->getTitle(), $this->x + 5, $this->y + 14);

View File

@ -8,10 +8,7 @@ declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Schema\Svg;
use PhpMyAdmin\Dbal\DatabaseName;
use PhpMyAdmin\Plugins\Schema\Dia\TableStatsDia;
use PhpMyAdmin\Plugins\Schema\Eps\TableStatsEps;
use PhpMyAdmin\Plugins\Schema\ExportRelationSchema;
use PhpMyAdmin\Plugins\Schema\Pdf\TableStatsPdf;
use PhpMyAdmin\Version;
use function __;
@ -36,7 +33,7 @@ use function sprintf;
*/
class SvgRelationSchema extends ExportRelationSchema
{
/** @var TableStatsDia[]|TableStatsEps[]|TableStatsPdf[]|TableStatsSvg[] */
/** @var TableStatsSvg[] */
private array $tables = [];
/** @var RelationStatsSvg[] Relations */
@ -266,8 +263,6 @@ class SvgRelationSchema extends ExportRelationSchema
/**
* Draws tables
*
* @see TableStatsSvg::Table_Stats_tableDraw()
*/
private function drawTables(): void
{

View File

@ -6770,11 +6770,6 @@ parameters:
count: 1
path: libraries/classes/Plugins/Schema/Svg/SvgRelationSchema.php
-
message: "#^Parameter \\#1 \\$table of method PhpMyAdmin\\\\Plugins\\\\Schema\\\\Svg\\\\SvgRelationSchema\\:\\:setMinMax\\(\\) expects PhpMyAdmin\\\\Plugins\\\\Schema\\\\Svg\\\\TableStatsSvg, PhpMyAdmin\\\\Plugins\\\\Schema\\\\Dia\\\\TableStatsDia\\|PhpMyAdmin\\\\Plugins\\\\Schema\\\\Eps\\\\TableStatsEps\\|PhpMyAdmin\\\\Plugins\\\\Schema\\\\Pdf\\\\TableStatsPdf\\|PhpMyAdmin\\\\Plugins\\\\Schema\\\\Svg\\\\TableStatsSvg given\\.$#"
count: 1
path: libraries/classes/Plugins/Schema/Svg/SvgRelationSchema.php
-
message: "#^Parameter \\#4 \\$masterField of method PhpMyAdmin\\\\Plugins\\\\Schema\\\\Svg\\\\SvgRelationSchema\\:\\:addRelation\\(\\) expects string, \\(int\\|string\\) given\\.$#"
count: 1

View File

@ -10908,9 +10908,6 @@
<code><![CDATA[$this->y + 14]]></code>
<code><![CDATA[$this->y + 14 + $this->currentCell]]></code>
</PossiblyInvalidArgument>
<PossiblyUnusedParam>
<code>$showColor</code>
</PossiblyUnusedParam>
<PossiblyUnusedProperty>
<code>$height</code>
</PossiblyUnusedProperty>
@ -11290,9 +11287,6 @@
</PossiblyUnusedProperty>
</file>
<file src="libraries/classes/Plugins/Schema/Svg/SvgRelationSchema.php">
<InvalidArgument>
<code><![CDATA[$this->showColor]]></code>
</InvalidArgument>
<MixedArgument>
<code>$oneField</code>
<code><![CDATA[$oneKey['ref_index_list'][$index]]]></code>
@ -11322,13 +11316,6 @@
<code>$oneKey</code>
<code>$rel</code>
</MixedAssignment>
<PossiblyInvalidArgument>
<code><![CDATA[$this->tables[$table]]]></code>
</PossiblyInvalidArgument>
<TooFewArguments>
<code>tableDraw</code>
<code>tableDraw</code>
</TooFewArguments>
</file>
<file src="libraries/classes/Plugins/Schema/Svg/TableStatsSvg.php">
<MixedArgument>