Skip to content

Commit 2fcb0ed

Browse files
authored
Global types changes on common classes that will impact many subclasses (#21854)
1 parent 8d02930 commit 2fcb0ed

File tree

4 files changed

+47
-4
lines changed

4 files changed

+47
-4
lines changed

src/CommonDBChild.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,22 @@ abstract class CommonDBChild extends CommonDBConnexity
5353
/** @var string $items_id */
5454
public static $items_id; // Field name
5555
// * rights
56+
/** @var CommonDBConnexity::DONT_CHECK_ITEM_RIGHTS|CommonDBConnexity::HAVE_VIEW_RIGHT_ON_ITEM|CommonDBConnexity::HAVE_SAME_RIGHT_ON_ITEM */
5657
public static $checkParentRights = self::HAVE_SAME_RIGHT_ON_ITEM;
58+
/** @var bool */
5759
public static $mustBeAttached = true;
5860
// * log
61+
/** @var bool */
5962
public static $logs_for_parent = true;
63+
/** @var Log::HISTORY_* */
6064
public static $log_history_add = Log::HISTORY_ADD_SUBITEM;
65+
/** @var Log::HISTORY_* */
6166
public static $log_history_update = Log::HISTORY_UPDATE_SUBITEM;
67+
/** @var Log::HISTORY_* */
6268
public static $log_history_delete = Log::HISTORY_DELETE_SUBITEM;
69+
/** @var Log::HISTORY_* */
6370
public static $log_history_lock = Log::HISTORY_LOCK_SUBITEM;
71+
/** @var Log::HISTORY_* */
6472
public static $log_history_unlock = Log::HISTORY_UNLOCK_SUBITEM;
6573

6674

src/CommonDBConnexity.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,14 @@ abstract class CommonDBConnexity extends CommonDBTM
7777
public const HAVE_VIEW_RIGHT_ON_ITEM = 2; // canXXXChild = true if parent::canView == true
7878
public const HAVE_SAME_RIGHT_ON_ITEM = 3; // canXXXChild = true if parent::canXXX == true
7979

80+
/** @var bool */
8081
public static $canDeleteOnItemClean = true;
81-
/// Disable auto forwarding information about entities ?
82+
83+
/**
84+
* Disable auto forwarding information about entities?
85+
*
86+
* @var bool
87+
*/
8288
public static $disableAutoEntityForwarding = false;
8389

8490

src/CommonDBRelation.php

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,25 @@ abstract class CommonDBRelation extends CommonDBConnexity
5151
/** @var ?string $items_id_1 */
5252
public static $items_id_1; // Field name
5353
// * entity inheritance
54+
/** @var bool */
5455
public static $take_entity_1 = true;
5556
// * rights
57+
/** @var CommonDBConnexity::DONT_CHECK_ITEM_RIGHTS|CommonDBConnexity::HAVE_VIEW_RIGHT_ON_ITEM|CommonDBConnexity::HAVE_SAME_RIGHT_ON_ITEM */
5658
public static $checkItem_1_Rights = self::HAVE_SAME_RIGHT_ON_ITEM;
59+
/** @var bool */
5760
public static $mustBeAttached_1 = true;
5861
// * log
62+
/** @var bool */
5963
public static $logs_for_item_1 = true;
64+
/** @var Log::HISTORY_* */
6065
public static $log_history_1_add = Log::HISTORY_ADD_RELATION;
66+
/** @var Log::HISTORY_* */
6167
public static $log_history_1_update = Log::HISTORY_UPDATE_RELATION;
68+
/** @var Log::HISTORY_* */
6269
public static $log_history_1_delete = Log::HISTORY_DEL_RELATION;
70+
/** @var Log::HISTORY_* */
6371
public static $log_history_1_lock = Log::HISTORY_LOCK_RELATION;
72+
/** @var Log::HISTORY_* */
6473
public static $log_history_1_unlock = Log::HISTORY_UNLOCK_RELATION;
6574

6675
// Item 2 information
@@ -70,24 +79,36 @@ abstract class CommonDBRelation extends CommonDBConnexity
7079
/** @var ?string $items_id_2 */
7180
public static $items_id_2; // Field name
7281
// * entity inheritance
82+
/** @var bool */
7383
public static $take_entity_2 = false;
7484
// * rights
85+
/** @var CommonDBConnexity::DONT_CHECK_ITEM_RIGHTS|CommonDBConnexity::HAVE_VIEW_RIGHT_ON_ITEM|CommonDBConnexity::HAVE_SAME_RIGHT_ON_ITEM */
7586
public static $checkItem_2_Rights = self::HAVE_SAME_RIGHT_ON_ITEM;
87+
/** @var bool */
7688
public static $mustBeAttached_2 = true;
7789
// * log
90+
/** @var bool */
7891
public static $logs_for_item_2 = true;
92+
/** @var Log::HISTORY_* */
7993
public static $log_history_2_add = Log::HISTORY_ADD_RELATION;
94+
/** @var Log::HISTORY_* */
8095
public static $log_history_2_update = Log::HISTORY_UPDATE_RELATION;
96+
/** @var Log::HISTORY_* */
8197
public static $log_history_2_delete = Log::HISTORY_DEL_RELATION;
98+
/** @var Log::HISTORY_* */
8299
public static $log_history_2_lock = Log::HISTORY_LOCK_RELATION;
100+
/** @var Log::HISTORY_* */
83101
public static $log_history_2_unlock = Log::HISTORY_UNLOCK_RELATION;
84102

85103
// Relation between items to check
86104
/// If both items must be checked for rights (default is only one)
105+
/** @var bool */
87106
public static $checkAlwaysBothItems = false;
88107
/// If both items must be in viewable each other entities
108+
/** @var bool */
89109
public static $check_entity_coherency = true;
90110

111+
/** @var bool */
91112
public $no_form_page = true;
92113

93114
/**
@@ -98,7 +119,7 @@ abstract class CommonDBRelation extends CommonDBConnexity
98119
protected $_force_log_option = 0;
99120

100121
/**
101-
* Get request cirteria to search for an item
122+
* Get request criteria to search for an item
102123
*
103124
* @since 9.4
104125
*

src/CommonDropdown.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,18 @@ abstract class CommonDropdown extends CommonDBTM
4747
// From CommonDBTM
4848
public $dohistory = true;
4949

50-
// For delete operation (entity will overload this value)
50+
/**
51+
* For delete operation (entity will overload this value)
52+
*
53+
* @var bool
54+
*/
5155
public $must_be_replace = false;
5256

53-
//Menu & navigation
57+
/**
58+
* Menu & navigation
59+
*
60+
* @var bool
61+
*/
5462
public $display_dropdowntitle = true;
5563

5664
//This dropdown can be translated

0 commit comments

Comments
 (0)