1- <?php
1+ <?php declare (strict_types= 1 );
22
33namespace XBase \Column ;
44
@@ -7,7 +7,7 @@ abstract class AbstractColumn implements ColumnInterface
77 /** @var string */
88 protected $ name ;
99
10- /** @var string */
10+ /** @var string|null */
1111 protected $ rawName ;
1212
1313 /** @var string */
@@ -16,18 +16,20 @@ abstract class AbstractColumn implements ColumnInterface
1616 /** @var int */
1717 protected $ length ;
1818
19- /** @var int */
19+ /** @var int|null */
2020 protected $ decimalCount ;
2121
22- /**@var int Field address within record. */
22+ /** @var int Field address within record. */
2323 protected $ memAddress ;
2424
25+ /** @var int|null */
2526 protected $ workAreaID ;
2627
27- /** @var bool */
28- protected $ setFields ;
28+ /** @var bool|null */
29+ protected $ setFields = false ;
2930
30- protected $ indexed ;
31+ /** @var bool|null */
32+ protected $ indexed = false ;
3133
3234 /** @var int|null Data starts from index */
3335 protected $ bytePos ;
@@ -43,60 +45,47 @@ public function getMemAddress()
4345 return $ this ->memAddress ;
4446 }
4547
46- /**
47- * @return bool|string
48- */
49- public function getName ()
48+ public function getName (): string
5049 {
5150 return $ this ->name ;
5251 }
5352
54- public function isSetFields ()
53+ public function isSetFields (): ? bool
5554 {
5655 return $ this ->setFields ;
5756 }
5857
59- public function getType ()
58+ public function getType (): string
6059 {
6160 return $ this ->type ;
6261 }
6362
64- public function getWorkAreaID ()
63+ public function getWorkAreaID (): ? int
6564 {
6665 return $ this ->workAreaID ;
6766 }
6867
69- public function getDecimalCount ()
68+ public function getDecimalCount (): ? int
7069 {
7170 return $ this ->decimalCount ;
7271 }
7372
74- /**
75- * @return bool
76- */
77- public function isIndexed ()
73+ public function isIndexed (): ?bool
7874 {
7975 return $ this ->indexed ;
8076 }
8177
82- /**
83- * @return int
84- */
85- public function getLength ()
78+ public function getLength (): int
8679 {
8780 return $ this ->length ;
8881 }
8982
90- public function getColIndex ()
83+ public function getColIndex (): int
9184 {
9285 return $ this ->colIndex ;
9386 }
9487
95- /**
96- * @return int
97- * @deprecated use getMemAddress
98- */
99- public function getBytePos ()
88+ public function getBytePos (): int
10089 {
10190 return $ this ->bytePos ;
10291 }
@@ -109,12 +98,15 @@ public function __toString()
10998 /**
11099 * @return string
111100 */
112- public function getRawName ()
101+ public function getRawName (): ? string
113102 {
114103 return $ this ->rawName ;
115104 }
116105
117- public function getDataLength ()
106+ /**
107+ * @deprecated since 1.3 and will be delete in 2.0. Use getLength()
108+ */
109+ public function getDataLength (): int
118110 {
119111 return $ this ->length ;
120112 }
0 commit comments