1818 */
1919class Property {
2020 /**
21+ * A boolean value that determines if an array will be represented as an object or not.
2122 *
2223 * @var boolean
23- *
24- * @since 1.0
2524 */
2625 private $ asObject ;
2726 /**
27+ * The datatype of the property value.
2828 *
2929 * @var string
30- *
31- * @since 1.0
3230 */
3331 private $ datatype ;
34- private $ lettersCase ;
3532 /**
33+ * The case of the property name (same, upper, or lower).
3634 *
3735 * @var string
36+ */
37+ private $ lettersCase ;
38+ /**
39+ * The name of the property.
3840 *
39- * @since 1.0
41+ * @var string
4042 */
4143 private $ name ;
4244 /**
45+ * The style of the property name (camel, kebab, snake, or none).
4346 *
4447 * @var string
45- *
46- * @since 1.0
4748 */
4849 private $ probsStyle ;
4950 /**
51+ * The value of the property.
5052 *
5153 * @var mixed
52- *
53- * @since 1.0
5454 */
5555 private $ value ;
5656 /**
@@ -80,8 +80,6 @@ class Property {
8080 * The default value is 'same'.
8181 *
8282 * @throws InvalidArgumentException If the name of the property is invalid
83- *
84- * @since 1.0
8583 */
8684 public function __construct (string $ name , $ value , ?string $ style = 'none ' , string $ case = 'same ' ) {
8785 $ this ->name = '' ;
@@ -104,8 +102,6 @@ public function __construct(string $name, $value, ?string $style = 'none', strin
104102 * Returns the value of the property.
105103 *
106104 * @return mixed|Json The value of the property.
107- *
108- * @since 1.0
109105 */
110106 public function &getValue () {
111107 return $ this ->value ;
@@ -130,8 +126,6 @@ public function getCase() : string {
130126 *
131127 * @return string The returned string will have the following syntax:
132128 * "json:<type>" where "<type>" is the datatype of the property.
133- *
134- * @since 1.0
135129 */
136130 public function getJsonXTagName () : string {
137131 $ type = $ this ->getType ();
@@ -166,8 +160,6 @@ public function getJsonXTagName() : string {
166160 *
167161 * @return string The name of the property. Note that the returned value
168162 * will depend on the style at which the property name is set to use.
169- *
170- * @since 1.0
171163 */
172164 public function getName () : string {
173165 return $ this ->name ;
@@ -183,8 +175,6 @@ public function getName() : string {
183175 * <li>none</li>
184176 * </ul>
185177 * The default value is 'none'.
186- *
187- * @since 1.0
188178 */
189179 public function getStyle () : string {
190180 return $ this ->probsStyle ;
@@ -201,8 +191,6 @@ public function getStyle() : string {
201191 * <li>object</li>
202192 * <li>NULL</li>
203193 * </ul>
204- *
205- * @since 1.0
206194 */
207195 public function getType () : string {
208196 return $ this ->datatype ;
@@ -215,8 +203,6 @@ public function getType() : string {
215203 *
216204 * @return bool If the property will be represented as object, true is
217205 * returned. False otherwise.
218- *
219- * @since 1.0
220206 */
221207 public function isAsObject () : bool {
222208 return $ this ->asObject ;
@@ -230,8 +216,6 @@ public function isAsObject() : bool {
230216 *
231217 * @param bool $bool True to represent the array as object. False
232218 * otherwise.
233- *
234- * @since 1.0
235219 */
236220 public function setAsObject (bool $ bool ) {
237221 $ this ->asObject = $ bool ;
@@ -243,8 +227,6 @@ public function setAsObject(bool $bool) {
243227 *
244228 * @return bool If the name is set, the method will return true. False
245229 * otherwise.
246- *
247- * @since 1.0
248230 */
249231 public function setName (string $ name ) : bool {
250232 $ keyValidity = self ::isValidKey ($ name , $ this ->getStyle (), $ this ->getCase ());
@@ -274,7 +256,7 @@ public function setName(string $name) : bool {
274256 * <li>none</li>
275257 * </ul>
276258 *
277- * @since 1.0
259+ * @param string $lettersCase The case of the letters in the property name.
278260 */
279261 public function setStyle (string $ style , string $ lettersCase = 'same ' ) {
280262 $ trimmed = strtolower (trim ($ style ));
@@ -296,8 +278,6 @@ public function setStyle(string $style, string $lettersCase = 'same') {
296278 *
297279 * @param mixed $val The value of the property. This can be a string or
298280 * array or number or an object or null.
299- *
300- * @since 1.0
301281 */
302282 public function setValue ($ val ) {
303283 $ this ->datatype = gettype ($ val );
@@ -317,8 +297,6 @@ public function setValue($val) {
317297 *
318298 * @return bool|string If the key is valid, it will be returned
319299 * after trimmed. If not valid, false is returned.
320- *
321- * @since 1.0
322300 */
323301 private static function isValidKey ($ key , $ style = 'kebab ' , $ case = 'same ' ) {
324302 $ trimmedKey = trim ($ key );
0 commit comments