-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b72fcf
commit a0df092
Showing
2 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
namespace TgWebValid; | ||
|
||
class PackageInstaller | ||
{ | ||
private const BOLD = "\e[1m"; | ||
private const RESET = "\e[0m"; | ||
private const BLUE = "\e[34m"; | ||
|
||
private const GITHUB = '~/ GitHub: https://github.com/CrazyTapok-bit/tgWebValid'; | ||
private const WEBSITE = '~/ Website: https://tgwebvalid.com/en'; | ||
private const PATREON = '~/ Patreon: https://patreon.com/user?u=99188087'; | ||
|
||
public static function postPackageInstall(): void | ||
{ | ||
self::logo(); | ||
|
||
self::row('They say we are cool 😎'); | ||
self::row('⭐️ Support us, give us a star on GitHub and become our sponsor 😊'); | ||
echo PHP_EOL; | ||
|
||
self::row(self::WEBSITE, self::BLUE); | ||
self::row(self::GITHUB, self::BLUE); | ||
self::row(self::PATREON, self::BLUE); | ||
} | ||
|
||
public static function postPackageUninstall(): void | ||
{ | ||
self::logo(); | ||
|
||
self::row('We are very sorry 😔'); | ||
self::row('Please tell us on GitHub what exactly didn\'t work for you?'); | ||
echo PHP_EOL; | ||
|
||
self::row(self::GITHUB, self::BLUE); | ||
self::row(self::WEBSITE, self::BLUE); | ||
} | ||
|
||
private static function logo(): void | ||
{ | ||
echo PHP_EOL; | ||
self::row('████████╗ ██████╗ ██╗ ██╗███████╗██████╗ ██╗ ██╗ █████╗ ██╗ ██╗██████╗ ', self::BLUE, true); | ||
self::row('╚══██╔══╝██╔════╝ ██║ ██╗ ██║██╔════╝██╔══██╗ ██║ ██║██╔══██╗██║ ██║██╔══██╗', self::BLUE, true); | ||
self::row(' ██║ ██║ ██╗ ╚██╗████╗██╔╝█████╗ ██████╦╝ ╚██╗ ██╔╝███████║██║ ██║██║ ██║', self::BLUE, true); | ||
self::row(' ██║ ██║ ╚██╗ ████╔═████║ ██╔══╝ ██╔══██╗ ╚████╔╝ ██╔══██║██║ ██║██║ ██║║', self::BLUE, true); | ||
self::row(' ██║ ╚██████╔╝ ╚██╔╝ ╚██╔╝ ███████╗██████╦╝ ╚██╔╝ ██║ ██║███████╗██║██████╔╝║', self::BLUE, true); | ||
self::row(' ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚═════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝╚═════╝ ', self::BLUE, true); | ||
echo PHP_EOL; | ||
} | ||
|
||
private static function row(string $text, ?string $color = null, bool $bold = false): void | ||
{ | ||
$bold = $bold ? self::BOLD : ""; | ||
echo $bold . $color . $text . self::RESET . PHP_EOL; | ||
} | ||
} |