@@ -61,12 +61,12 @@ class MenuStyle
61
61
/**
62
62
* @var int
63
63
*/
64
- protected $ paddingTopBottom ;
64
+ protected $ paddingTopBottom = 0 ;
65
65
66
66
/**
67
67
* @var int
68
68
*/
69
- protected $ paddingLeftRight ;
69
+ protected $ paddingLeftRight = 0 ;
70
70
71
71
/**
72
72
* @var array
@@ -116,22 +116,22 @@ class MenuStyle
116
116
/**
117
117
* @var int
118
118
*/
119
- private $ borderTopWidth ;
119
+ private $ borderTopWidth = 0 ;
120
120
121
121
/**
122
122
* @var int
123
123
*/
124
- private $ borderRightWidth ;
124
+ private $ borderRightWidth = 0 ;
125
125
126
126
/**
127
127
* @var int
128
128
*/
129
- private $ borderBottomWidth ;
129
+ private $ borderBottomWidth = 0 ;
130
130
131
131
/**
132
132
* @var int
133
133
*/
134
- private $ borderLeftWidth ;
134
+ private $ borderLeftWidth = 0 ;
135
135
136
136
/**
137
137
* @var string
@@ -509,7 +509,7 @@ private function generatePaddingTopBottomRows() : void
509
509
);
510
510
}
511
511
512
- $ this ->paddingTopBottom = $ this ->paddingTopBottom >= 0 ? $ this -> paddingTopBottom : 0 ;
512
+ $ this ->paddingTopBottom = max ( $ this ->paddingTopBottom , 0 ) ;
513
513
$ this ->paddingTopBottomRows = array_fill (0 , $ this ->paddingTopBottom , $ paddingRow );
514
514
}
515
515
@@ -664,9 +664,8 @@ private function generateBorderRows() : void
664
664
);
665
665
}
666
666
667
- $ this ->borderTopWidth = $ this ->borderTopWidth >= 0 ? $ this ->borderTopWidth : 0 ;
668
- $ this ->borderBottomWidth = $ this ->borderBottomWidth >= 0 ? $ this ->borderBottomWidth : 0 ;
669
-
667
+ $ this ->borderTopWidth = max ($ this ->borderTopWidth , 0 );
668
+ $ this ->borderBottomWidth = max ($ this ->borderBottomWidth , 0 );
670
669
671
670
$ this ->borderTopRows = array_fill (0 , $ this ->borderTopWidth , $ borderRow );
672
671
$ this ->borderBottomRows = array_fill (0 , $ this ->borderBottomWidth , $ borderRow );
0 commit comments