@@ -411,14 +411,14 @@ public final function write2DBarcode(TCPDF $pdf, $value, $type, $x, $y, $width,
411411 /**
412412 * Checks the template is internally valid
413413 */
414- public final function validate () {
414+ public final function validate () : void {
415415 $ this ->validateUnits ();
416416 $ this ->validateSize ();
417417 $ this ->validateMargins ();
418418 $ this ->validateSupport ();
419419 }
420420
421- private function validateUnits () {
421+ private function validateUnits () : void {
422422 $ validUnits = [ 'pt ' , 'mm ' , 'cm ' , 'in ' ];
423423 $ unit = $ this ->getUnit ();
424424 if (!in_array (strtolower ($ unit ), $ validUnits )) {
@@ -430,7 +430,7 @@ private function validateUnits() {
430430 }
431431 }
432432
433- private function validateSize () {
433+ private function validateSize () : void {
434434 $ width = $ this ->getWidth ();
435435 if (!is_numeric ($ width ) || is_string ($ width )) {
436436 throw new \UnexpectedValueException (trans ('admin/labels/message.invalid_return_type ' , [
@@ -450,7 +450,7 @@ private function validateSize() {
450450 }
451451 }
452452
453- private function validateMargins () {
453+ private function validateMargins () : void {
454454 $ marginTop = $ this ->getMarginTop ();
455455 if (!is_numeric ($ marginTop ) || is_string ($ marginTop )) {
456456 throw new \UnexpectedValueException (trans ('admin/labels/message.invalid_return_type ' , [
@@ -488,7 +488,7 @@ private function validateMargins() {
488488 }
489489 }
490490
491- private function validateSupport () {
491+ private function validateSupport () : void {
492492 $ support1D = $ this ->getSupport1DBarcode ();
493493 if (!is_bool ($ support1D )) {
494494 throw new \UnexpectedValueException (trans ('admin/labels/message.invalid_return_type ' , [
0 commit comments