|
@@ -7,7 +7,7 @@ namespace App\Yr\Forecast\Tabular\Time;
|
|
|
*
|
|
|
* @author Joachim M. Giæver (joachim[]giaever.org)
|
|
|
*/
|
|
|
-class Symbol implements DiffInterface {
|
|
|
+class Symbol implements DiffInterface, \JsonSerializable {
|
|
|
|
|
|
private $number;
|
|
|
private $numberEx;
|
|
@@ -65,6 +65,10 @@ class Symbol implements DiffInterface {
|
|
|
return $this->diff($e) != 0;
|
|
|
}
|
|
|
|
|
|
+ public function jsonSerialize(): string {
|
|
|
+ return $this->__toString();
|
|
|
+ }
|
|
|
+
|
|
|
public function __toString(): string {
|
|
|
return sprintf(
|
|
|
"%s: %s (%d)",
|