Remove &$same_wide_width param (#18234)
* Remove $same_wide_width in Eps Signed-off-by: Kamil Tekiela <tekiela246@gmail.com> * Remove $same_wide_width in Svg Signed-off-by: Kamil Tekiela <tekiela246@gmail.com> --------- Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
parent
529119cb1c
commit
d2ff77c73f
@ -14,6 +14,7 @@ use PhpMyAdmin\Version;
|
||||
use function __;
|
||||
use function date;
|
||||
use function in_array;
|
||||
use function max;
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
@ -78,11 +79,11 @@ class EpsRelationSchema extends ExportRelationSchema
|
||||
$this->diagram->getFont(),
|
||||
$this->diagram->getFontSize(),
|
||||
$this->pageNumber,
|
||||
$this->tablewidth,
|
||||
$this->showKeys,
|
||||
$this->tableDimension,
|
||||
$this->offline,
|
||||
);
|
||||
$this->tablewidth = max($this->tablewidth, $this->tables[$table]->width);
|
||||
}
|
||||
|
||||
if (! $this->sameWide) {
|
||||
@ -188,10 +189,10 @@ class EpsRelationSchema extends ExportRelationSchema
|
||||
$font,
|
||||
$fontSize,
|
||||
$this->pageNumber,
|
||||
$this->tablewidth,
|
||||
false,
|
||||
$tableDimension,
|
||||
);
|
||||
$this->tablewidth = max($this->tablewidth, $this->tables[$masterTable]->width);
|
||||
}
|
||||
|
||||
if (! isset($this->tables[$foreignTable])) {
|
||||
@ -202,10 +203,10 @@ class EpsRelationSchema extends ExportRelationSchema
|
||||
$font,
|
||||
$fontSize,
|
||||
$this->pageNumber,
|
||||
$this->tablewidth,
|
||||
false,
|
||||
$tableDimension,
|
||||
);
|
||||
$this->tablewidth = max($this->tablewidth, $this->tables[$foreignTable]->width);
|
||||
}
|
||||
|
||||
$this->relations[] = new RelationStatsEps(
|
||||
|
||||
@ -36,17 +36,16 @@ class TableStatsEps extends TableStats
|
||||
* @see TableStatsEps::setWidthTable
|
||||
* @see TableStatsEps::setHeightTable
|
||||
*
|
||||
* @param Eps $diagram The EPS diagram
|
||||
* @param string $db The database name
|
||||
* @param string $tableName The table name
|
||||
* @param string $font The font name
|
||||
* @param int $fontSize The font size
|
||||
* @param int $pageNumber Page number
|
||||
* @param int|float $same_wide_width The max width among tables
|
||||
* @param bool $showKeys Whether to display keys or not
|
||||
* @param bool $tableDimension Whether to display table position or not
|
||||
* @param bool $offline Whether the coordinates are sent
|
||||
* from the browser
|
||||
* @param Eps $diagram The EPS diagram
|
||||
* @param string $db The database name
|
||||
* @param string $tableName The table name
|
||||
* @param string $font The font name
|
||||
* @param int $fontSize The font size
|
||||
* @param int $pageNumber Page number
|
||||
* @param bool $showKeys Whether to display keys or not
|
||||
* @param bool $tableDimension Whether to display table position or not
|
||||
* @param bool $offline Whether the coordinates are sent
|
||||
* from the browser
|
||||
*/
|
||||
public function __construct(
|
||||
$diagram,
|
||||
@ -55,7 +54,6 @@ class TableStatsEps extends TableStats
|
||||
$font,
|
||||
$fontSize,
|
||||
$pageNumber,
|
||||
&$same_wide_width,
|
||||
$showKeys = false,
|
||||
$tableDimension = false,
|
||||
$offline = false,
|
||||
@ -67,11 +65,6 @@ class TableStatsEps extends TableStats
|
||||
// setWidth must me after setHeight, because title
|
||||
// can include table height which changes table width
|
||||
$this->setWidthTable($font, $fontSize);
|
||||
if ($same_wide_width >= $this->width) {
|
||||
return;
|
||||
}
|
||||
|
||||
$same_wide_width = $this->width;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -89,11 +89,11 @@ class SvgRelationSchema extends ExportRelationSchema
|
||||
$this->diagram->getFont(),
|
||||
$this->diagram->getFontSize(),
|
||||
$this->pageNumber,
|
||||
$this->tablewidth,
|
||||
$this->showKeys,
|
||||
$this->tableDimension,
|
||||
$this->offline,
|
||||
);
|
||||
$this->tablewidth = max($this->tablewidth, $this->tables[$table]->width);
|
||||
}
|
||||
|
||||
if ($this->sameWide) {
|
||||
@ -219,10 +219,10 @@ class SvgRelationSchema extends ExportRelationSchema
|
||||
$font,
|
||||
$fontSize,
|
||||
$this->pageNumber,
|
||||
$this->tablewidth,
|
||||
false,
|
||||
$tableDimension,
|
||||
);
|
||||
$this->tablewidth = max($this->tablewidth, $this->tables[$masterTable]->width);
|
||||
$this->setMinMax($this->tables[$masterTable]);
|
||||
}
|
||||
|
||||
@ -234,10 +234,10 @@ class SvgRelationSchema extends ExportRelationSchema
|
||||
$font,
|
||||
$fontSize,
|
||||
$this->pageNumber,
|
||||
$this->tablewidth,
|
||||
false,
|
||||
$tableDimension,
|
||||
);
|
||||
$this->tablewidth = max($this->tablewidth, $this->tables[$foreignTable]->width);
|
||||
$this->setMinMax($this->tables[$foreignTable]);
|
||||
}
|
||||
|
||||
|
||||
@ -37,16 +37,15 @@ class TableStatsSvg extends TableStats
|
||||
* @see TableStatsSvg::setWidthTable
|
||||
* @see TableStatsSvg::setHeightTable
|
||||
*
|
||||
* @param Svg $diagram The current SVG image document
|
||||
* @param string $db The database name
|
||||
* @param string $tableName The table name
|
||||
* @param string $font Font face
|
||||
* @param int $fontSize The font size
|
||||
* @param int $pageNumber Page number
|
||||
* @param int|float $same_wide_width The max. width among tables
|
||||
* @param bool $showKeys Whether to display keys or not
|
||||
* @param bool $tableDimension Whether to display table position or not
|
||||
* @param bool $offline Whether the coordinates are sent
|
||||
* @param Svg $diagram The current SVG image document
|
||||
* @param string $db The database name
|
||||
* @param string $tableName The table name
|
||||
* @param string $font Font face
|
||||
* @param int $fontSize The font size
|
||||
* @param int $pageNumber Page number
|
||||
* @param bool $showKeys Whether to display keys or not
|
||||
* @param bool $tableDimension Whether to display table position or not
|
||||
* @param bool $offline Whether the coordinates are sent
|
||||
*/
|
||||
public function __construct(
|
||||
$diagram,
|
||||
@ -55,7 +54,6 @@ class TableStatsSvg extends TableStats
|
||||
$font,
|
||||
$fontSize,
|
||||
$pageNumber,
|
||||
&$same_wide_width,
|
||||
$showKeys = false,
|
||||
$tableDimension = false,
|
||||
$offline = false,
|
||||
@ -67,11 +65,6 @@ class TableStatsSvg extends TableStats
|
||||
// setWidth must me after setHeight, because title
|
||||
// can include table height which changes table width
|
||||
$this->setWidthTable($font, $fontSize);
|
||||
if ($same_wide_width >= $this->width) {
|
||||
return;
|
||||
}
|
||||
|
||||
$same_wide_width = $this->width;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user