@@ -84,64 +84,66 @@ subclasses must implement. It is a class method to allow validity checks
8484of external values without wrapping them in an instance.
8585
8686
87- * ` public function __construct ($raw_value); `
87+ * < code > public function \_\_ construct ($raw \_ value)</ code >
8888
8989 The constructor uses the subclass' `IsValid` method to test its input argument.
9090 Valid values are stored in the new instance, invalid values cause an `InvalidArgumentException` to be thrown.
9191 Other instances of the same class are always considered valid (*re-wrapping*).
9292
93- * ` public static function IsValid ($test_value); `
93+ * < code > public static function IsValid ($test \_ value)</ code >
9494
9595 Checks the validity of a raw value. If it returns true, a new object can be instantiated with the same value.
9696 Implement this in every subclass!
9797 In the base class implementation, it simply throws a `NotImplementedException`.
9898
99- * ` final public function value (); `
99+ * < code > final public function value ()</ code >
100100
101101 Returns the object's wrapped initializer value.
102102
103- * ` final public function equals ($test_value); `
103+ * < code > final public function equals ($test \_ value)</ code >
104104
105105 This method performs an equality check on other instances or raw values.
106106 Objects are considered equal if and only if they are instances of the same subclass and carry the same `value()`.
107107 All other values are considered equal if and only if they are identical (`===`) to the current objects's `value()`.
108108
109- * ` final public static function Wrap (&$value) `
109+ * < code > final public static function Wrap (&$value)</ code >
110110
111111 Replaces a value (by-reference) with instance wrapping that value.
112112 This means of course that the call will fail with an `InvalidArgumentException` if the input value fails the subclass' `IsValid` check.
113113 If the value already is an instance, it won't be replaced.
114-
115- * ` final public static function WrapOrNull (&$value) `
114+
115+ * < code > final public static function WrapOrNull (&$value)</ code >
116116
117117 Like `Wrap()`, but won't change `NULL` values.
118-
119- * ` final public static function WrapArray (array &$array) `
118+
119+ * < code > final public static function WrapArray (array &$array)</ code >
120120
121121 Will replace all values in an array with instances.
122122 The array will only be altered (by-reference) if all its values are valid.
123123 Array keys will be preserved.
124124
125- * ` final public static function WrapOrNullArray (array &$array) `
125+ * < code > final public static function WrapOrNullArray (array &$array)</ code >
126126
127127 Will replace all non-`NULL` values in an array with instances.
128128 The array will only be changed (by-reference) if all its values are valid (or `NULL`).
129129 Array keys will be preserved.
130130
131131
132- ## AbstractSerializableValue
133-
132+ ## AbstractSerializableValue
133+
134134This extension of ` AbstractValue ` provides easy serializability for the Value objects.
135135It implements the PHP 5.4 [ JsonSerializable] ( https://php.net/manual/class.jsonserializable.php ) interface.
136136
137- * ` public function __toString (); `
137+ * < code > public function \_\_ toString ()</ code >
138138
139- Returns the wrapped value -- like `value()`, but with an explicit `(string)` typecast.
139+ Returns the wrapped value --
140+ like `value()`, but with an explicit `(string)` typecast.
140141 This allows string concatenation of Value objects.
141142
142- * ` public function jsonSerialize (); `
143+ * < code > public function jsonSerialize ()</ code >
143144
144- Returns the wrapped value -- like `value()`.
145+ Returns the wrapped value --
146+ like `value()`.
145147 This enables [json_encode()](https://secure.php.net/json_encode) to encode the Value object.
146148
147149
0 commit comments