55use Exception ;
66
77/**
8- * Class CouldNotCreateButton
8+ * Class CouldNotCreateButton.
99 */
1010class CouldNotCreateButton extends Exception
1111{
@@ -14,7 +14,7 @@ class CouldNotCreateButton extends Exception
1414 *
1515 * @return static
1616 */
17- public static function titleNotProvided (): CouldNotCreateButton
17+ public static function titleNotProvided (): self
1818 {
1919 return new static ('Button title was not provided, A 20 character limited title should be provided. ' );
2020 }
@@ -24,7 +24,7 @@ public static function titleNotProvided(): CouldNotCreateButton
2424 *
2525 * @return static
2626 */
27- public static function urlNotProvided (): CouldNotCreateButton
27+ public static function urlNotProvided (): self
2828 {
2929 return new static ('Your button type is `web_url` but the url is not provided. ' );
3030 }
@@ -34,7 +34,7 @@ public static function urlNotProvided(): CouldNotCreateButton
3434 *
3535 * @return static
3636 */
37- public static function phoneNumberNotProvided (): CouldNotCreateButton
37+ public static function phoneNumberNotProvided (): self
3838 {
3939 return new static ('Your button type is `phone_number` but the phone number is not provided. ' );
4040 }
@@ -44,7 +44,7 @@ public static function phoneNumberNotProvided(): CouldNotCreateButton
4444 *
4545 * @return static
4646 */
47- public static function postbackNotProvided (): CouldNotCreateButton
47+ public static function postbackNotProvided (): self
4848 {
4949 return new static ('Your button type is `postback` but the postback data is not provided. ' );
5050 }
@@ -56,7 +56,7 @@ public static function postbackNotProvided(): CouldNotCreateButton
5656 *
5757 * @return static
5858 */
59- public static function titleLimitExceeded (string $ title ): CouldNotCreateButton
59+ public static function titleLimitExceeded (string $ title ): self
6060 {
6161 $ count = mb_strlen ($ title );
6262
@@ -72,7 +72,7 @@ public static function titleLimitExceeded(string $title): CouldNotCreateButton
7272 *
7373 * @return static
7474 */
75- public static function payloadLimitExceeded ($ data ): CouldNotCreateButton
75+ public static function payloadLimitExceeded ($ data ): self
7676 {
7777 $ count = mb_strlen ($ data );
7878
@@ -88,7 +88,7 @@ public static function payloadLimitExceeded($data): CouldNotCreateButton
8888 *
8989 * @return static
9090 */
91- public static function invalidUrlProvided (string $ url ): CouldNotCreateButton
91+ public static function invalidUrlProvided (string $ url ): self
9292 {
9393 return new static ("` {$ url }` is not a valid URL. Please check and provide a valid URL " );
9494 }
@@ -100,7 +100,7 @@ public static function invalidUrlProvided(string $url): CouldNotCreateButton
100100 *
101101 * @return static
102102 */
103- public static function invalidPhoneNumberProvided (string $ phoneNumber ): CouldNotCreateButton
103+ public static function invalidPhoneNumberProvided (string $ phoneNumber ): self
104104 {
105105 return new static (
106106 "Provided phone number ` {$ phoneNumber }` format is invalid. " .
0 commit comments