Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Commit

Permalink
namespace Enlumop
Browse files Browse the repository at this point in the history
  • Loading branch information
EnterVPL committed Oct 2, 2023
1 parent 233ab4f commit f5aaa37
Show file tree
Hide file tree
Showing 35 changed files with 111 additions and 131 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@

[![Documentation](https://badgen.net/static/link/documentation?icon=github&color=blue)](./docs/)

![Source Code](https://img.shields.io/badge/enterv%2Fdiscord-webhooks?label=source&link=https%3A%2F%2Fgithub.com%2FEnterVPL%2Fdiscord-webhooks%2Fblob%2Fmaster%2Fcomposer.json&logo=github) ![GitHub tag (with filter)](https://img.shields.io/github/v/tag/entervpl/discord-webhooks?logo=github) ![GitHub last commit (by committer)](https://img.shields.io/github/last-commit/EnterVPL/discord-webhooks?logo=github)
![GitHub tag (with filter)](https://img.shields.io/github/v/tag/enlumop/discord-webhook-client?logo=github) ![GitHub last commit (by committer)](https://img.shields.io/github/last-commit/enlumop/discord-webhook-client?logo=github)

[![Total Downloads](https://badgen.net/packagist/dt/enterv/discord-webhooks?icon=github)](https://packagist.org/packages/enterv/discord-webhooks) [![License](https://badgen.net/github/license/entervpl/discord-webhooks?icon=github)](https://packagist.org/packages/enterv/discord-webhooks) [![PHP Version Require](https://badgen.net/packagist/php/enterv/discord-webhooks?color=purple&icon)](https://packagist.org/packages/enterv/discord-webhooks)
[![Total Downloads](https://badgen.net/packagist/dt/Enlumop/discord-webhook-client?icon=github)](https://packagist.org/packages/Enlumop/discord-webhook-client) [![License](https://badgen.net/github/license/enlumop/discord-webhook-client?icon=github)](https://packagist.org/packages/Enlumop/discord-webhook-client) [![PHP Version Require](https://badgen.net/packagist/php/enlumop/discord-webhook-client?color=purple&icon)](https://packagist.org/packages/Enlumop/discord-webhook-client)

### Latest Version

[![Latest Stable Version](https://badgen.net/github/release/entervpl/discord-webhooks/stable?icon=php&label=stable)](https://packagist.org/packages/enterv/discord-webhooks) [![Latest Unstable Version](https://badgen.net/packagist/v/enterv/discord-webhooks/pre?icon=php&label=unstable&color=orange)](https://packagist.org/packages/enterv/discord-webhooks)
[![Latest Stable Version](https://badgen.net/github/release/enlumop/discord-webhook-client/stable?icon=php&label=stable)](https://packagist.org/packages/enlumop/discord-webhook-client) [![Latest Unstable Version](https://badgen.net/packagist/v/Enlumop/discord-webhook-client/pre?icon=php&label=unstable&color=orange)](https://packagist.org/packages/Enlumop/discord-webhook-client)

### Actions

![Static analysis](https://github.com/EnterVPL/discord-webhooks/workflows/Static%20analysis/badge.svg)
![Static analysis](https://github.com/enlumop/discord-webhook-client/workflows/Static%20analysis/badge.svg)

## Table of Contents

Expand Down Expand Up @@ -47,16 +47,16 @@
### Install via composer

```shell
composer require enterv/discord-webhooks
composer require enlumop/discord-webhook-client
```

## Simple Example

```php
<?php
use EnterV\DiscordWebhooks\Embed;
use EnterV\DiscordWebhooks\Payload;
use EnterV\DiscordWebhooks\WebhookClient;
use Enlumop\DiscordWebhooks\Embed;
use Enlumop\DiscordWebhooks\Payload;
use Enlumop\DiscordWebhooks\WebhookClient;

// Create embed
$embed = new Embed();
Expand Down Expand Up @@ -91,8 +91,8 @@ Pull requests and issues are open!

```php
<?php
use EnterV\DiscordWebhooks\Payload;
use EnterV\DiscordWebhooks\WebhookClient;
use Enlumop\DiscordWebhooks\Payload;
use Enlumop\DiscordWebhooks\WebhookClient;

$url = 'DISCORD_WEBHOOK_URL'; // Put your discord webhook url

Expand All @@ -110,10 +110,10 @@ $webhook->send($url, $payload);

```php
<?php
use EnterV\DiscordWebhooks\Builder\TextFormattingCombine;
use EnterV\DiscordWebhooks\Builder\TextMessageBuilder;
use EnterV\DiscordWebhooks\Payload;
use EnterV\DiscordWebhooks\WebhookClient;
use Enlumop\DiscordWebhooks\Builder\TextFormattingCombine;
use Enlumop\DiscordWebhooks\Builder\TextMessageBuilder;
use Enlumop\DiscordWebhooks\Payload;
use Enlumop\DiscordWebhooks\WebhookClient;

$url = 'DISCORD_WEBHOOK_URL'; // Put your discord webhook url

Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "enterv/discord-webhooks",
"name": "enlumop/discord-webhook-client",
"description": "Professional Discord webhook client library.",
"type": "library",
"license": "MIT",
Expand All @@ -8,6 +8,7 @@
"webhook",
"enterv",
"entervpl",
"Enlumop",
"client"
],
"authors": [
Expand All @@ -23,12 +24,12 @@
},
"autoload": {
"psr-4": {
"EnterV\\DiscordWebhooks\\": "src/"
"Enlumop\\DiscordWebhooks\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"EnterV\\DiscordWebhooks\\Test\\": "tests/"
"Enlumop\\DiscordWebhooks\\Test\\": "tests/"
}
},
"require-dev": {
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/MessageBuilderExample.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

```php
<?php
use EnterV\DiscordWebhooks\Builder\TextFormattingCombine;
use EnterV\DiscordWebhooks\Builder\TextMessageBuilder;
use EnterV\DiscordWebhooks\Payload;
use EnterV\DiscordWebhooks\WebhookClient;
use Enlumop\DiscordWebhooks\Builder\TextFormattingCombine;
use Enlumop\DiscordWebhooks\Builder\TextMessageBuilder;
use Enlumop\DiscordWebhooks\Payload;
use Enlumop\DiscordWebhooks\WebhookClient;

$url = 'DISCORD_WEBHOOK_URL'; // Put your discord webhook url

Expand Down
8 changes: 4 additions & 4 deletions docs/examples/MessageBuilderWithEmbedExample.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

```php
<?php
use EnterV\DiscordWebhooks\Builder\TextFormattingCombine;
use EnterV\DiscordWebhooks\Builder\TextMessageBuilder;
use EnterV\DiscordWebhooks\Payload;
use EnterV\DiscordWebhooks\WebhookClient;
use Enlumop\DiscordWebhooks\Builder\TextFormattingCombine;
use Enlumop\DiscordWebhooks\Builder\TextMessageBuilder;
use Enlumop\DiscordWebhooks\Payload;
use Enlumop\DiscordWebhooks\WebhookClient;

$url = 'DISCORD_WEBHOOK_URL'; // Put your discord webhook url

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/OnlyMessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

```php
<?php
use EnterV\DiscordWebhooks\Payload;
use EnterV\DiscordWebhooks\WebhookClient;
use Enlumop\DiscordWebhooks\Payload;
use Enlumop\DiscordWebhooks\WebhookClient;

$url = 'DISCORD_WEBHOOK_URL'; // Put your discord webhook url

Expand Down
6 changes: 3 additions & 3 deletions docs/examples/SimpleExample.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

```php
<?php
use EnterV\DiscordWebhooks\Embed;
use EnterV\DiscordWebhooks\Payload;
use EnterV\DiscordWebhooks\WebhookClient;
use Enlumop\DiscordWebhooks\Embed;
use Enlumop\DiscordWebhooks\Payload;
use Enlumop\DiscordWebhooks\WebhookClient;

// Create embed
$embed = new Embed();
Expand Down
4 changes: 2 additions & 2 deletions src/Builder/Interface/GetTextFormattingCombineInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

declare(strict_types=1);

namespace EnterV\DiscordWebhooks\Builder\Interface;
namespace Enlumop\DiscordWebhooks\Builder\Interface;

/**
* All public methods that can be used to check whether a given format has been used.
*
* @see https://github.com/EnterVPL/discord-webhooks/blob/master/docs/TextFormattingCombine.md
* @see https://github.com/Enlumop/discord-webhook-client/blob/master/docs/TextFormattingCombine.md
*/
interface GetTextFormattingCombineInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Builder/Interface/MessageBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

declare(strict_types=1);

namespace EnterV\DiscordWebhooks\Builder\Interface;
namespace Enlumop\DiscordWebhooks\Builder\Interface;

/**
* Everything you need to build a formatted message.
*
* @see https://github.com/EnterVPL/discord-webhooks/blob/master/docs/TextMessageBuilder.md
* @see https://github.com/Enlumop/discord-webhook-client/blob/master/docs/TextMessageBuilder.md
*/
interface MessageBuilderInterface extends SetMessageBuilderInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Builder/Interface/SetMessageBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

declare(strict_types=1);

namespace EnterV\DiscordWebhooks\Builder\Interface;
namespace Enlumop\DiscordWebhooks\Builder\Interface;

/**
* All methods that add text, following Discord's formatting.
*
* @see https://github.com/EnterVPL/discord-webhooks/blob/master/docs/TextMessageBuilder.md
* @see https://github.com/Enlumop/discord-webhook-client/blob/master/docs/TextMessageBuilder.md
*/
interface SetMessageBuilderInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Builder/Interface/SetTextFormattingCombineInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

declare(strict_types=1);

namespace EnterV\DiscordWebhooks\Builder\Interface;
namespace Enlumop\DiscordWebhooks\Builder\Interface;

/**
* All public methods that can be used to set a format combination. Use only those that are needed.
*
* @see https://github.com/EnterVPL/discord-webhooks/blob/master/docs/TextFormattingCombine.md
* @see https://github.com/Enlumop/discord-webhook-client/blob/master/docs/TextFormattingCombine.md
*/
interface SetTextFormattingCombineInterface
{
Expand Down
8 changes: 3 additions & 5 deletions src/Builder/Interface/TextFormattingCombineInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

declare(strict_types=1);

namespace EnterV\DiscordWebhooks\Builder\Interface;
namespace Enlumop\DiscordWebhooks\Builder\Interface;

/**
* Everything you need to be able to create text with a combination of formats.
*
* @see https://github.com/EnterVPL/discord-webhooks/blob/master/docs/TextFormattingCombine.md
* @see https://github.com/Enlumop/discord-webhook-client/blob/master/docs/TextFormattingCombine.md
*/
interface TextFormattingCombineInterface extends SetTextFormattingCombineInterface, GetTextFormattingCombineInterface
{
}
interface TextFormattingCombineInterface extends SetTextFormattingCombineInterface, GetTextFormattingCombineInterface {}
4 changes: 2 additions & 2 deletions src/Builder/TextFormattingCombine.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace EnterV\DiscordWebhooks\Builder;
namespace Enlumop\DiscordWebhooks\Builder;

use EnterV\DiscordWebhooks\Builder\Interface\TextFormattingCombineInterface;
use Enlumop\DiscordWebhooks\Builder\Interface\TextFormattingCombineInterface;

class TextFormattingCombine implements TextFormattingCombineInterface
{
Expand Down
9 changes: 4 additions & 5 deletions src/Builder/TextMessageBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace EnterV\DiscordWebhooks\Builder;
namespace Enlumop\DiscordWebhooks\Builder;

use EnterV\DiscordWebhooks\Builder\Interface\GetTextFormattingCombineInterface;
use EnterV\DiscordWebhooks\Builder\Interface\MessageBuilderInterface;
use Enlumop\DiscordWebhooks\Builder\Interface\GetTextFormattingCombineInterface;
use Enlumop\DiscordWebhooks\Builder\Interface\MessageBuilderInterface;

class TextMessageBuilder implements MessageBuilderInterface
{
Expand All @@ -26,8 +26,7 @@ class TextMessageBuilder implements MessageBuilderInterface

public function __construct(
protected bool $autoNewLine = true
) {
}
) {}

public function build(): string
{
Expand Down
6 changes: 3 additions & 3 deletions src/Color.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace EnterV\DiscordWebhooks;
namespace Enlumop\DiscordWebhooks;

use EnterV\DiscordWebhooks\Helper\ColorHelper;
use EnterV\DiscordWebhooks\Interface\Color\ColorInterface;
use Enlumop\DiscordWebhooks\Helper\ColorHelper;
use Enlumop\DiscordWebhooks\Interface\Color\ColorInterface;

class Color implements ColorInterface
{
Expand Down
6 changes: 3 additions & 3 deletions src/Embed.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace EnterV\DiscordWebhooks;
namespace Enlumop\DiscordWebhooks;

use EnterV\DiscordWebhooks\Interface\Color\ColorInterface;
use EnterV\DiscordWebhooks\Interface\Embed\EmbedInterface;
use Enlumop\DiscordWebhooks\Interface\Color\ColorInterface;
use Enlumop\DiscordWebhooks\Interface\Embed\EmbedInterface;

class Embed implements EmbedInterface
{
Expand Down
8 changes: 3 additions & 5 deletions src/Exception/Color/AbstractColorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

declare(strict_types=1);

namespace EnterV\DiscordWebhooks\Exception\Color;
namespace Enlumop\DiscordWebhooks\Exception\Color;

use EnterV\DiscordWebhooks\Exception\Interface\WebhookThrowableInterface;
use Enlumop\DiscordWebhooks\Exception\Interface\WebhookThrowableInterface;

abstract class AbstractColorException extends \Exception implements WebhookThrowableInterface
{
}
abstract class AbstractColorException extends \Exception implements WebhookThrowableInterface {}
6 changes: 2 additions & 4 deletions src/Exception/Color/ColorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

declare(strict_types=1);

namespace EnterV\DiscordWebhooks\Exception\Color;
namespace Enlumop\DiscordWebhooks\Exception\Color;

class ColorException extends AbstractColorException
{
}
class ColorException extends AbstractColorException {}
6 changes: 2 additions & 4 deletions src/Exception/Interface/ColorThrowableInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

declare(strict_types=1);

namespace EnterV\DiscordWebhooks\Exception\Interface;
namespace Enlumop\DiscordWebhooks\Exception\Interface;

interface ColorThrowableInterface extends \Throwable
{
}
interface ColorThrowableInterface extends \Throwable {}
6 changes: 2 additions & 4 deletions src/Exception/Interface/WebhookThrowableInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

declare(strict_types=1);

namespace EnterV\DiscordWebhooks\Exception\Interface;
namespace Enlumop\DiscordWebhooks\Exception\Interface;

interface WebhookThrowableInterface extends \Throwable
{
}
interface WebhookThrowableInterface extends \Throwable {}
8 changes: 3 additions & 5 deletions src/Exception/Webhook/AbstractWebhookException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

declare(strict_types=1);

namespace EnterV\DiscordWebhooks\Exception\Webhook;
namespace Enlumop\DiscordWebhooks\Exception\Webhook;

use EnterV\DiscordWebhooks\Exception\Interface\WebhookThrowableInterface;
use Enlumop\DiscordWebhooks\Exception\Interface\WebhookThrowableInterface;

abstract class AbstractWebhookException extends \Exception implements WebhookThrowableInterface
{
}
abstract class AbstractWebhookException extends \Exception implements WebhookThrowableInterface {}
6 changes: 2 additions & 4 deletions src/Exception/Webhook/FailedSendHookException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

declare(strict_types=1);

namespace EnterV\DiscordWebhooks\Exception\Webhook;
namespace Enlumop\DiscordWebhooks\Exception\Webhook;

class FailedSendHookException extends AbstractWebhookException
{
}
class FailedSendHookException extends AbstractWebhookException {}
6 changes: 2 additions & 4 deletions src/Exception/Webhook/InvalidPayloadException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

declare(strict_types=1);

namespace EnterV\DiscordWebhooks\Exception\Webhook;
namespace Enlumop\DiscordWebhooks\Exception\Webhook;

class InvalidPayloadException extends AbstractWebhookException
{
}
class InvalidPayloadException extends AbstractWebhookException {}
4 changes: 2 additions & 2 deletions src/Helper/ColorHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace EnterV\DiscordWebhooks\Helper;
namespace Enlumop\DiscordWebhooks\Helper;

use EnterV\DiscordWebhooks\Exception\Color\ColorException;
use Enlumop\DiscordWebhooks\Exception\Color\ColorException;

/**
* Helps with the Color class.
Expand Down
Loading

0 comments on commit f5aaa37

Please sign in to comment.