Skip to content

Commit

Permalink
apply phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
guanguans committed Feb 23, 2024
1 parent 27f3e2b commit 4473a6f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
10 changes: 0 additions & 10 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
parameters:
ignoreErrors:
-
message: "#^Call to function is_float\\(\\) with int\\|string will always evaluate to false\\.$#"
count: 1
path: src/Foundation/Support/Arr.php

-
message: "#^Method Guanguans\\\\Notify\\\\Foundation\\\\Support\\\\HasHttpClientDocCommentRector\\:\\:refactor\\(\\) should return 1\\|2\\|3\\|4\\|array\\<PhpParser\\\\Node\\>\\|PhpParser\\\\Node\\|null but empty return statement found\\.$#"
count: 1
Expand Down Expand Up @@ -38,11 +33,6 @@ parameters:
count: 1
path: src/Foundation/Testing/MockHandler.php

-
message: "#^Property Guanguans\\\\Notify\\\\Mattermost\\\\Messages\\\\Message\\:\\:\\$baseUri is unused\\.$#"
count: 1
path: src/Mattermost/Messages/Message.php

-
message: "#^Property Guanguans\\\\Notify\\\\Pushover\\\\Messages\\\\Message\\:\\:\\$allowedValues \\(array\\<array\\<int\\>\\>\\) does not accept default value of type array\\<string, array\\<int, int\\>\\>\\.$#"
count: 1
Expand Down
7 changes: 2 additions & 5 deletions src/Foundation/Support/Arr.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ public static function accessible($value): bool
* Determine if the given key exists in the provided array.
*
* @param array|\ArrayAccess $array
* @param int|string $key
*
* @noinspection UselessIsComparisonInspection
* @noinspection CallableParameterUseCaseInTypeContextInspection
* @param array-key|float $key
*/
public static function exists($array, $key): bool
{
Expand All @@ -50,7 +47,7 @@ public static function exists($array, $key): bool
* Get an item from an array using "dot" notation.
*
* @param array|\ArrayAccess $array
* @param null|int|string $key
* @param null|array-key $key
* @param mixed $default
*
* @return mixed
Expand Down
2 changes: 0 additions & 2 deletions src/Mattermost/Messages/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ class Message extends \Guanguans\Notify\Foundation\Message
'edit_at' => 'int',
];

private string $baseUri;

public function toHttpUri(): string
{
return "{$this->getOption('base_uri')}/api/v4/posts";
Expand Down

0 comments on commit 4473a6f

Please sign in to comment.