* Factory function for fatal errors
*
* @param string|MessageSpecifier $message Message key or object
- * @return StatusValue
+ * @return static
*/
public static function newFatal( $message /*, parameters...*/ ) {
$params = func_get_args();
* Factory function for good results
*
* @param mixed $value
- * @return StatusValue
+ * @return static
*/
public static function newGood( $value = null ) {
$result = new static();
* defined as:
* [
* 0 => object(StatusValue) # the StatusValue with error messages, only
- * 1 => object(StatusValue) # The StatusValue with warning messages, only
+ * 1 => object(StatusValue) # The StatusValue with warning messages, only
* ]
*
- * @return array
+ * @return StatusValue[]
*/
public function splitByErrorType() {
$errorsOnlyStatusValue = clone $this;
}
/**
- * Change operation resuklt
+ * Change operation result
*
* @param bool $ok Whether the operation completed
* @param mixed $value
*/
public function setResult( $ok, $value = null ) {
- $this->ok = $ok;
+ $this->ok = (bool)$ok;
$this->value = $value;
}