@@ -484,12 +484,11 @@ private function setDisplayPartsForSelect(DisplayParts $displayParts): DisplayPa
484484 *
485485 * @see getTable()
486486 *
487- * @return array<int, DisplayParts| int|mixed> the first element is a {@see DisplayParts} object
487+ * @return array{DisplayParts, int} the first element is a {@see DisplayParts} object
488488 * the second element is the total number of rows returned
489489 * by the SQL query without any programmatically appended
490490 * LIMIT clause (just a copy of $unlim_num_rows if it exists,
491491 * else computed inside this function)
492- * @psalm-return array{DisplayParts, int}
493492 */
494493 private function setDisplayPartsAndTotal (DisplayParts $ displayParts ): array
495494 {
@@ -1875,13 +1874,11 @@ private function getTableBody(
18751874
18761875 // 1.2.1 Modify link(s) - update row case
18771876 if ($ displayParts ->hasEditLink ) {
1878- [
1879- $ editUrl ,
1880- $ copyUrl ,
1881- $ editString ,
1882- $ copyString ,
1883- $ editCopyUrlParams ,
1884- ] = $ this ->getModifiedLinks ($ whereClause , $ clauseIsUnique , $ urlSqlQuery );
1877+ $ editCopyUrlParams = $ this ->getUrlParams ($ whereClause , $ clauseIsUnique , $ urlSqlQuery );
1878+ $ editUrl = Url::getFromRoute ('/table/change ' );
1879+ $ copyUrl = Url::getFromRoute ('/table/change ' );
1880+ $ editString = $ this ->getActionLinkContent ('b_edit ' , __ ('Edit ' ));
1881+ $ copyString = $ this ->getActionLinkContent ('b_insrow ' , __ ('Copy ' ));
18851882 }
18861883
18871884 // 1.2.2 Delete/Kill link(s)
@@ -2440,23 +2437,10 @@ private function getRepeatingHeaders(): string
24402437 return $ headerHtml ;
24412438 }
24422439
2443- /**
2444- * Get modified links
2445- *
2446- * @see getTableBody()
2447- *
2448- * @param string $whereClause the where clause of the sql
2449- * @param bool $clauseIsUnique the unique condition of clause
2450- * @param string $urlSqlQuery the analyzed sql query
2451- *
2452- * @return array<int,string|array<string, bool|string>>
2453- */
2454- private function getModifiedLinks (
2455- string $ whereClause ,
2456- bool $ clauseIsUnique ,
2457- string $ urlSqlQuery ,
2458- ): array {
2459- $ urlParams = [
2440+ /** @return (string|bool)[] */
2441+ private function getUrlParams (string $ whereClause , bool $ clauseIsUnique , string $ urlSqlQuery ): array
2442+ {
2443+ return [
24602444 'db ' => $ this ->db ,
24612445 'table ' => $ this ->table ,
24622446 'where_clause ' => $ whereClause ,
@@ -2466,21 +2450,6 @@ private function getModifiedLinks(
24662450 'sql_signature ' => Core::signSqlQuery ($ urlSqlQuery ),
24672451 'goto ' => Url::getFromRoute ('/sql ' ),
24682452 ];
2469-
2470- $ editUrl = Url::getFromRoute ('/table/change ' );
2471-
2472- $ copyUrl = Url::getFromRoute ('/table/change ' );
2473-
2474- $ editStr = $ this ->getActionLinkContent (
2475- 'b_edit ' ,
2476- __ ('Edit ' ),
2477- );
2478- $ copyStr = $ this ->getActionLinkContent (
2479- 'b_insrow ' ,
2480- __ ('Copy ' ),
2481- );
2482-
2483- return [$ editUrl , $ copyUrl , $ editStr , $ copyStr , $ urlParams ];
24842453 }
24852454
24862455 /**
@@ -2493,8 +2462,7 @@ private function getModifiedLinks(
24932462 * @param string $urlSqlQuery the analyzed sql query
24942463 * @param int $processId Process ID
24952464 *
2496- * @return mixed[] $del_url, $del_str, $js_conf
2497- * @psalm-return array{?string, ?string, ?string}
2465+ * @return array{?string, ?string, ?string, string[]|null}
24982466 */
24992467 private function getDeleteAndKillLinks (
25002468 string $ whereClause ,
@@ -2563,7 +2531,7 @@ private function getDeleteAndKillLinks(
25632531 /**
25642532 * Get content inside the table row action links (Edit/Copy/Delete)
25652533 *
2566- * @see getModifiedLinks(), getDeleteAndKillLinks()
2534+ * @see getDeleteAndKillLinks()
25672535 *
25682536 * @param string $icon The name of the file to get
25692537 * @param string $displayText The text displaying after the image icon
0 commit comments