@@ -214,22 +214,22 @@ class Model {
214214 public int |null $ placement = null ;
215215
216216 /**
217- * @var int|null $sort_order
217+ * @var int $sort_order
218218 * For $many enabled Models, this property can be used to set the PHP sort option used when writing Model objects to
219219 * config. This property is only applicable if the $sort_by_field property is also defined. This property only applies
220220 * to Models with a $config_path defined. For valid value options for this property, refer to:
221221 * https://www.php.net/manual/en/function.array-multisort.php
222222 */
223- public int | null $ sort_order = null ;
223+ public int $ sort_order = SORT_ASC ;
224224
225225 /**
226- * @var int|null $sort_flags
226+ * @var int $sort_flags
227227 * For $many enabled Models, this property can be used to set the PHP sort flags used when writing Model objects to
228228 * config. This property is only applicable if the $sort_by_field property is also defined. This property only applies
229229 * to Models with a $config_path defined. For valid value options for this property, refer to:
230230 * https://www.php.net/manual/en/function.array-multisort.php
231231 */
232- public int | null $ sort_flags = null ;
232+ public int $ sort_flags = SORT_REGULAR ;
233233
234234 /**
235235 * @var array|null $sort_by
@@ -1698,8 +1698,8 @@ class Model {
16981698 * internal objects must be written in a specific order.
16991699 */
17001700 protected function sort (): void {
1701- # Do not sort if there is no `sort_order` or ` sort_by` set
1702- if (!$ this ->sort_order or ! $ this -> sort_by ) {
1701+ # Do not sort if there is no `sort_by` fields set
1702+ if (!$ this ->sort_by ) {
17031703 return ;
17041704 }
17051705
0 commit comments