Skip to content

Commit

Permalink
apply pgp-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
guanguans committed Jan 27, 2024
1 parent bc255b0 commit cebe747
Show file tree
Hide file tree
Showing 28 changed files with 47 additions and 47 deletions.
6 changes: 3 additions & 3 deletions src/Bark/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
class Client extends \Guanguans\Notify\Foundation\Client
{
/**
* @param \Guanguans\Notify\Bark\UriTemplateCredential|string $credential
* @param \Guanguans\Notify\Bark\Credential|string $credential
*/
public function __construct($credential, ?\GuzzleHttp\Client $httpClient = null)
{
if (! $credential instanceof UriTemplateCredential) {
$credential = new UriTemplateCredential($credential);
if (! $credential instanceof Credential) {
$credential = new Credential($credential);
}

parent::__construct($credential, $httpClient);

Check failure on line 26 in src/Bark/Client.php

View workflow job for this annotation

GitHub Actions / psalm

TooManyArguments

src/Bark/Client.php:26:9: TooManyArguments: Too many arguments for Guanguans\Notify\Foundation\Client::__construct - expecting 1 but saw 2 (see https://psalm.dev/026)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

use Guanguans\Notify\Foundation\Credentials\TokenUriTemplateCredential;

class UriTemplateCredential extends TokenUriTemplateCredential {}
class Credential extends TokenUriTemplateCredential {}
4 changes: 2 additions & 2 deletions src/Bark/Messages/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace Guanguans\Notify\Bark\Messages;

use Guanguans\Notify\Bark\UriTemplateCredential;
use Guanguans\Notify\Bark\Credential;
use Guanguans\Notify\Foundation\Concerns\AsJson;
use Guanguans\Notify\Foundation\Concerns\AsPost;

Expand Down Expand Up @@ -70,6 +70,6 @@ class Message extends \Guanguans\Notify\Foundation\Message

public function httpUri()
{
return sprintf('https://api.day.app/%s', UriTemplateCredential::TEMPLATE_TOKEN);
return sprintf('https://api.day.app/%s', Credential::TEMPLATE_TOKEN);
}
}
6 changes: 3 additions & 3 deletions src/Chanify/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
class Client extends \Guanguans\Notify\Foundation\Client
{
/**
* @param string|UriTemplateCredential $credential
* @param Credential|string $credential
*/
public function __construct($credential, ?\GuzzleHttp\Client $httpClient = null)
{
if (! $credential instanceof UriTemplateCredential) {
$credential = new UriTemplateCredential($credential);
if (! $credential instanceof Credential) {
$credential = new Credential($credential);
}

parent::__construct($credential, $httpClient);

Check failure on line 26 in src/Chanify/Client.php

View workflow job for this annotation

GitHub Actions / psalm

TooManyArguments

src/Chanify/Client.php:26:9: TooManyArguments: Too many arguments for Guanguans\Notify\Foundation\Client::__construct - expecting 1 but saw 2 (see https://psalm.dev/026)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

use Guanguans\Notify\Foundation\Credentials\TokenUriTemplateCredential;

class UriTemplateCredential extends TokenUriTemplateCredential {}
class Credential extends TokenUriTemplateCredential {}
4 changes: 2 additions & 2 deletions src/Chanify/Messages/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace Guanguans\Notify\Chanify\Messages;

use Guanguans\Notify\Chanify\UriTemplateCredential;
use Guanguans\Notify\Chanify\Credential;
use Guanguans\Notify\Foundation\Concerns\AsJson;
use Guanguans\Notify\Foundation\Concerns\AsPost;

Expand All @@ -26,7 +26,7 @@ class Message extends \Guanguans\Notify\Foundation\Message
public function __construct(array $options = [])
{
parent::__construct($options);
$this->baseUri = sprintf('https://api.chanify.net/v1/sender/%s', UriTemplateCredential::TEMPLATE_TOKEN);
$this->baseUri = sprintf('https://api.chanify.net/v1/sender/%s', Credential::TEMPLATE_TOKEN);
}

public function httpUri()
Expand Down
6 changes: 3 additions & 3 deletions src/Gitter/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
class Client extends \Guanguans\Notify\Foundation\Client
{
/**
* @param AuthCredential|string $credential
* @param Credential|string $credential
*/
public function __construct($credential, ?\GuzzleHttp\Client $httpClient = null)
{
if (! $credential instanceof AuthCredential) {
$this->credential = new AuthCredential($credential);
if (! $credential instanceof Credential) {
$this->credential = new Credential($credential);
}

parent::__construct($credential, $httpClient);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

use Guanguans\Notify\Foundation\Credentials\TokenAuthCredential;

class AuthCredential extends TokenAuthCredential {}
class Credential extends TokenAuthCredential {}
6 changes: 3 additions & 3 deletions src/IGot/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
class Client extends \Guanguans\Notify\Foundation\Client
{
/**
* @param string|UriTemplateCredential $credential
* @param Credential|string $credential
*/
public function __construct($credential, ?\GuzzleHttp\Client $httpClient = null)
{
if (! $credential instanceof UriTemplateCredential) {
$credential = new UriTemplateCredential($credential);
if (! $credential instanceof Credential) {
$credential = new Credential($credential);
}

parent::__construct($credential, $httpClient);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

use Guanguans\Notify\Foundation\Credentials\TokenUriTemplateCredential;

class UriTemplateCredential extends TokenUriTemplateCredential {}
class Credential extends TokenUriTemplateCredential {}
4 changes: 2 additions & 2 deletions src/IGot/Messages/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use Guanguans\Notify\Foundation\Concerns\AsJson;
use Guanguans\Notify\Foundation\Concerns\AsPost;
use Guanguans\Notify\IGot\UriTemplateCredential;
use Guanguans\Notify\IGot\Credential;

/**
* @method \Guanguans\Notify\IGot\Messages\Message title($title)
Expand Down Expand Up @@ -52,6 +52,6 @@ class Message extends \Guanguans\Notify\Foundation\Message

public function httpUri()
{
return sprintf('https://push.hellyw.com/%s', UriTemplateCredential::TEMPLATE_TOKEN);
return sprintf('https://push.hellyw.com/%s', Credential::TEMPLATE_TOKEN);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Guanguans\Notify\Foundation\Credentials\TokenUriTemplateCredential;
use Psr\Http\Message\RequestInterface;

class UriTemplateCredential extends TokenUriTemplateCredential
class Credential extends TokenUriTemplateCredential
{
private ?string $secret;

Expand Down
4 changes: 2 additions & 2 deletions src/LarkGroupBot/Messages/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace Guanguans\Notify\LarkGroupBot\Messages;

use Guanguans\Notify\Foundation\Concerns\AsPost;
use Guanguans\Notify\LarkGroupBot\UriTemplateCredential;
use Guanguans\Notify\LarkGroupBot\Credential;
use GuzzleHttp\RequestOptions;

abstract class Message extends \Guanguans\Notify\Foundation\Message
Expand All @@ -22,7 +22,7 @@ abstract class Message extends \Guanguans\Notify\Foundation\Message

public function httpUri(): string
{
return sprintf('https://open.feishu.cn/open-apis/bot/v2/hook/%s', UriTemplateCredential::TEMPLATE_TOKEN);
return sprintf('https://open.feishu.cn/open-apis/bot/v2/hook/%s', Credential::TEMPLATE_TOKEN);
}

public function toHttpOptions(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

use Guanguans\Notify\Foundation\Credentials\TokenUriTemplateCredential;

class UriTemplateCredential extends TokenUriTemplateCredential {}
class Credential extends TokenUriTemplateCredential {}
4 changes: 2 additions & 2 deletions src/Push/Messages/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use Guanguans\Notify\Foundation\Concerns\AsJson;
use Guanguans\Notify\Foundation\Concerns\AsPost;
use Guanguans\Notify\Push\UriTemplateCredential;
use Guanguans\Notify\Push\Credential;

/**
* @method \Guanguans\Notify\Push\Messages\Message title($title)
Expand Down Expand Up @@ -47,6 +47,6 @@ class Message extends \Guanguans\Notify\Foundation\Message

public function httpUri()
{
return sprintf('https://push.techulus.com/api/v1/notify/%s', UriTemplateCredential::TEMPLATE_TOKEN);
return sprintf('https://push.techulus.com/api/v1/notify/%s', Credential::TEMPLATE_TOKEN);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

use Guanguans\Notify\Foundation\Credentials\TokenUriTemplateCredential;

class UriTemplateCredential extends TokenUriTemplateCredential {}
class Credential extends TokenUriTemplateCredential {}
4 changes: 2 additions & 2 deletions src/PushPlus/Messages/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use Guanguans\Notify\Foundation\Concerns\AsJson;
use Guanguans\Notify\Foundation\Concerns\AsPost;
use Guanguans\Notify\PushPlus\UriTemplateCredential;
use Guanguans\Notify\PushPlus\Credential;

/**
* @method \Guanguans\Notify\PushPlus\Messages\Message title($title)
Expand Down Expand Up @@ -55,6 +55,6 @@ class Message extends \Guanguans\Notify\Foundation\Message

public function httpUri()
{
return sprintf('https://www.pushplus.plus/send?token=%s', UriTemplateCredential::TEMPLATE_TOKEN);
return sprintf('https://www.pushplus.plus/send?token=%s', Credential::TEMPLATE_TOKEN);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

use Guanguans\Notify\Foundation\Credentials\TokenUriTemplateCredential;

class UriTemplateCredential extends TokenUriTemplateCredential {}
class Credential extends TokenUriTemplateCredential {}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

use Guanguans\Notify\Foundation\Credentials\TokenUriTemplateCredential;

class UriTemplateCredential extends TokenUriTemplateCredential {}
class Credential extends TokenUriTemplateCredential {}
4 changes: 2 additions & 2 deletions src/ServerChan/Messages/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use Guanguans\Notify\Foundation\Concerns\AsJson;
use Guanguans\Notify\Foundation\Concerns\AsPost;
use Guanguans\Notify\ServerChan\UriTemplateCredential;
use Guanguans\Notify\ServerChan\Credential;

/**
* @method \Guanguans\Notify\ServerChan\Messages\Message title($title)
Expand Down Expand Up @@ -43,6 +43,6 @@ public function __construct(string $title, string $desp = '')

public function httpUri()
{
return sprintf('https://sctapi.ftqq.com/%s.send', UriTemplateCredential::TEMPLATE_TOKEN);
return sprintf('https://sctapi.ftqq.com/%s.send', Credential::TEMPLATE_TOKEN);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

use Guanguans\Notify\Foundation\Credentials\TokenUriTemplateCredential;

class UriTemplateCredential extends TokenUriTemplateCredential {}
class Credential extends TokenUriTemplateCredential {}
4 changes: 2 additions & 2 deletions src/Showdoc/Messages/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use Guanguans\Notify\Foundation\Concerns\AsJson;
use Guanguans\Notify\Foundation\Concerns\AsPost;
use Guanguans\Notify\Showdoc\UriTemplateCredential;
use Guanguans\Notify\Showdoc\Credential;

/**
* @method \Guanguans\Notify\Showdoc\Messages\Message title($title)
Expand Down Expand Up @@ -43,6 +43,6 @@ public function __construct(string $title, string $content)

public function httpUri()
{
return sprintf('https://push.showdoc.com.cn/server/api/push/%s', UriTemplateCredential::TEMPLATE_TOKEN);
return sprintf('https://push.showdoc.com.cn/server/api/push/%s', Credential::TEMPLATE_TOKEN);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

use Guanguans\Notify\Foundation\Credentials\TokenUriTemplateCredential;

class UriTemplateCredential extends TokenUriTemplateCredential {}
class Credential extends TokenUriTemplateCredential {}
4 changes: 2 additions & 2 deletions src/Telegram/Messages/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use Guanguans\Notify\Foundation\Concerns\AsJson;
use Guanguans\Notify\Foundation\Concerns\AsPost;
use Guanguans\Notify\Telegram\UriTemplateCredential;
use Guanguans\Notify\Telegram\Credential;

class Message extends \Guanguans\Notify\Foundation\Message
{
Expand All @@ -23,6 +23,6 @@ class Message extends \Guanguans\Notify\Foundation\Message

public function httpUri()
{
return sprintf('https://api.telegram.org/bot%s/sendMessage', UriTemplateCredential::TEMPLATE_TOKEN);
return sprintf('https://api.telegram.org/bot%s/sendMessage', Credential::TEMPLATE_TOKEN);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

use Guanguans\Notify\Foundation\Credentials\TokenUriTemplateCredential;

class UriTemplateCredential extends TokenUriTemplateCredential {}
class Credential extends TokenUriTemplateCredential {}
4 changes: 2 additions & 2 deletions src/WeWorkGroupBot/Messages/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use Guanguans\Notify\Foundation\Concerns\AsJson;
use Guanguans\Notify\Foundation\Concerns\AsPost;
use Guanguans\Notify\WeWorkGroupBot\UriTemplateCredential;
use Guanguans\Notify\WeWorkGroupBot\Credential;
use GuzzleHttp\RequestOptions;

abstract class Message extends \Guanguans\Notify\Foundation\Message
Expand All @@ -24,7 +24,7 @@ abstract class Message extends \Guanguans\Notify\Foundation\Message

public function httpUri()
{
return sprintf('https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=%s', UriTemplateCredential::TEMPLATE_TOKEN);
return sprintf('https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=%s', Credential::TEMPLATE_TOKEN);
}

public function toHttpOptions(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

use Guanguans\Notify\Foundation\Credentials\TokenUriTemplateCredential;

class UriTemplateCredential extends TokenUriTemplateCredential {}
class Credential extends TokenUriTemplateCredential {}
4 changes: 2 additions & 2 deletions src/YiFengChuanHua/Messages/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

use Guanguans\Notify\Foundation\Concerns\AsJson;
use Guanguans\Notify\Foundation\Concerns\AsPost;
use Guanguans\Notify\YiFengChuanHua\UriTemplateCredential;
use Guanguans\Notify\YiFengChuanHua\Credential;

/**
* @method \Guanguans\Notify\YiFengChuanHua\Messages\Message head($head)
Expand Down Expand Up @@ -42,6 +42,6 @@ class Message extends \Guanguans\Notify\Foundation\Message

public function httpUri()
{
return sprintf('https://www.phprm.com/services/push/trigger/%s', UriTemplateCredential::TEMPLATE_TOKEN);
return sprintf('https://www.phprm.com/services/push/trigger/%s', Credential::TEMPLATE_TOKEN);
}
}

0 comments on commit cebe747

Please sign in to comment.