From decaa29b811d4125bdf94a98b73d1a99fcad3df3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Belin?= Date: Sun, 24 Mar 2019 19:57:51 +0100 Subject: [PATCH] Removed some '__toString()' methods --- lib/PushEvent.php | 9 --------- lib/models/PayloadCommit.php | 9 --------- lib/models/PayloadCommitVerification.php | 9 --------- lib/models/PayloadUser.php | 9 --------- lib/models/Permission.php | 9 --------- lib/models/Repository.php | 9 --------- lib/models/ServerVersion.php | 9 --------- lib/models/Team.php | 9 --------- lib/models/TrackedTime.php | 9 --------- lib/models/User.php | 9 --------- 10 files changed, 90 deletions(-) diff --git a/lib/PushEvent.php b/lib/PushEvent.php index 1e40b3e..b2d574f 100644 --- a/lib/PushEvent.php +++ b/lib/PushEvent.php @@ -63,15 +63,6 @@ class PushEvent implements \JsonSerializable { $this->commits = new \ArrayObject; } - /** - * Returns a string representation of this object. - * @return string The string representation of this object. - */ - function __toString(): string { - $json = json_encode($this, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - return static::class." $json"; - } - /** * Creates a new event from the specified JSON map. * @param object $map A JSON map representing an event. diff --git a/lib/models/PayloadCommit.php b/lib/models/PayloadCommit.php index c358203..46db6d9 100644 --- a/lib/models/PayloadCommit.php +++ b/lib/models/PayloadCommit.php @@ -55,15 +55,6 @@ class PayloadCommit implements \JsonSerializable { $this->setMessage($message); } - /** - * Returns a string representation of this object. - * @return string The string representation of this object. - */ - function __toString(): string { - $json = json_encode($this, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - return static::class." $json"; - } - /** * Creates a new commit from the specified JSON map. * @param object $map A JSON map representing a commit. diff --git a/lib/models/PayloadCommitVerification.php b/lib/models/PayloadCommitVerification.php index 481261c..8c291aa 100644 --- a/lib/models/PayloadCommitVerification.php +++ b/lib/models/PayloadCommitVerification.php @@ -35,15 +35,6 @@ class PayloadCommitVerification implements \JsonSerializable { $this->setVerified($isVerified); } - /** - * Returns a string representation of this object. - * @return string The string representation of this object. - */ - function __toString(): string { - $json = json_encode($this, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - return static::class." $json"; - } - /** * Creates a new commit from the specified JSON map. * @param object $map A JSON map representing a commit. diff --git a/lib/models/PayloadUser.php b/lib/models/PayloadUser.php index 67a9bf5..27f64ac 100644 --- a/lib/models/PayloadUser.php +++ b/lib/models/PayloadUser.php @@ -30,15 +30,6 @@ class PayloadUser implements \JsonSerializable { $this->username = $username; } - /** - * Returns a string representation of this object. - * @return string The string representation of this object. - */ - function __toString(): string { - $json = json_encode($this, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - return static::class." $json"; - } - /** * Creates a new user from the specified JSON map. * @param object $map A JSON map representing a user. diff --git a/lib/models/Permission.php b/lib/models/Permission.php index 10a4870..7480153 100644 --- a/lib/models/Permission.php +++ b/lib/models/Permission.php @@ -32,15 +32,6 @@ class Permission implements \JsonSerializable { $this->setAdmin($admin)->setPull($pull)->setPush($push); } - /** - * Returns a string representation of this object. - * @return string The string representation of this object. - */ - function __toString(): string { - $json = json_encode($this, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - return static::class." $json"; - } - /** * Creates a new user from the specified JSON map. * @param object $map A JSON map representing a user. diff --git a/lib/models/Repository.php b/lib/models/Repository.php index b8b4cf3..2d4d005 100644 --- a/lib/models/Repository.php +++ b/lib/models/Repository.php @@ -135,15 +135,6 @@ class Repository implements \JsonSerializable { $this->setFullName($fullName); } - /** - * Returns a string representation of this object. - * @return string The string representation of this object. - */ - function __toString(): string { - $json = json_encode($this, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - return static::class." $json"; - } - /** * Creates a new repository from the specified JSON map. * @param object $map A JSON map representing a repository. diff --git a/lib/models/ServerVersion.php b/lib/models/ServerVersion.php index 18b7c45..6f27e4f 100644 --- a/lib/models/ServerVersion.php +++ b/lib/models/ServerVersion.php @@ -20,15 +20,6 @@ class ServerVersion implements \JsonSerializable { $this->version = $version; } - /** - * Returns a string representation of this object. - * @return string The string representation of this object. - */ - function __toString(): string { - $json = json_encode($this, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - return static::class." $json"; - } - /** * Creates a new server version from the specified JSON map. * @param object $map A JSON map representing a server version. diff --git a/lib/models/Team.php b/lib/models/Team.php index 9c61c8f..0a62c49 100644 --- a/lib/models/Team.php +++ b/lib/models/Team.php @@ -37,15 +37,6 @@ class Team implements \JsonSerializable { $this->setName($name); } - /** - * Returns a string representation of this object. - * @return string The string representation of this object. - */ - function __toString(): string { - $json = json_encode($this, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - return static::class." $json"; - } - /** * Creates a new user from the specified JSON map. * @param object $map A JSON map representing a user. diff --git a/lib/models/TrackedTime.php b/lib/models/TrackedTime.php index 964ec3a..dfd8f2c 100644 --- a/lib/models/TrackedTime.php +++ b/lib/models/TrackedTime.php @@ -42,15 +42,6 @@ class TrackedTime implements \JsonSerializable { $this->setTime($time); } - /** - * Returns a string representation of this object. - * @return string The string representation of this object. - */ - function __toString(): string { - $json = json_encode($this, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - return static::class." $json"; - } - /** * Creates a new entry from the specified JSON map. * @param object $map A JSON map representing an entry. diff --git a/lib/models/User.php b/lib/models/User.php index d33255c..e7233bd 100644 --- a/lib/models/User.php +++ b/lib/models/User.php @@ -50,15 +50,6 @@ class User implements \JsonSerializable { $this->setLogin($login); } - /** - * Returns a string representation of this object. - * @return string The string representation of this object. - */ - function __toString(): string { - $json = json_encode($this, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - return static::class." $json"; - } - /** * Creates a new user from the specified JSON map. * @param object $map A JSON map representing a user.