Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support phpstan 2.0 #635

Merged
merged 4 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"orchestra/testbench": "*",
"guzzlehttp/guzzle": "^7.3",
"guzzlehttp/psr7": "^1.7 || ^2.0",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan": "^2.0",
"phpunit/phpunit": "^10.2"
},
"autoload": {
Expand Down
8 changes: 4 additions & 4 deletions docs/classes/LINE-Laravel-Tests-Facades-FacadesTest.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ <h5 class="phpdocumentor-tag-list__heading" id="tags">
</dt>
<dd class="phpdocumentor-tag-list__definition">

<section class="phpdocumentor-description"><p>(PHPMD.CouplingBetweenObjects)</p>
<section class="phpdocumentor-description"><p>(&quot;PHPMD.CouplingBetweenObjects&quot;)</p>
</section>

</dd>
Expand Down Expand Up @@ -294,7 +294,7 @@ <h5 class="phpdocumentor-tag-list__heading" id="tags">
</dt>
<dd class="phpdocumentor-tag-list__definition">

<section class="phpdocumentor-description"><p>(PHPMD.UnusedFormalParameter)</p>
<section class="phpdocumentor-description"><p>(&quot;PHPMD.UnusedFormalParameter&quot;)</p>
</section>

</dd>
Expand Down Expand Up @@ -352,7 +352,7 @@ <h5 class="phpdocumentor-tag-list__heading" id="tags">
</dt>
<dd class="phpdocumentor-tag-list__definition">

<section class="phpdocumentor-description"><p>(PHPMD.UnusedFormalParameter)</p>
<section class="phpdocumentor-description"><p>(&quot;PHPMD.UnusedFormalParameter&quot;)</p>
</section>

</dd>
Expand Down Expand Up @@ -410,7 +410,7 @@ <h5 class="phpdocumentor-tag-list__heading" id="tags">
</dt>
<dd class="phpdocumentor-tag-list__definition">

<section class="phpdocumentor-description"><p>(PHPMD.UnusedFormalParameter)</p>
<section class="phpdocumentor-description"><p>(&quot;PHPMD.UnusedFormalParameter&quot;)</p>
</section>

</dd>
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/LINE-Parser-EventRequestParser.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ <h5 class="phpdocumentor-tag-list__heading" id="tags">
</dt>
<dd class="phpdocumentor-tag-list__definition">

<section class="phpdocumentor-description"><p>(PHPMD.CouplingBetweenObjects)</p>
<section class="phpdocumentor-description"><p>(&quot;PHPMD.CouplingBetweenObjects&quot;)</p>
</section>

</dd>
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/LINE-Parser-Tests-EventRequestParserTest.html
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ <h4 class="phpdocumentor-element__name" id="method_getSignature">
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="src/parser/test/EventRequestParserTest.php"><a href="files/src-parser-test-eventrequestparsertest.html"><abbr title="src/parser/test/EventRequestParserTest.php">EventRequestParserTest.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">1715</span>
<span class="phpdocumentor-element-found-in__line">1714</span>

</aside>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
use LINE\Constants\MessageType;

/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings("PHPMD.CouplingBetweenObjects")
*/
class FlexSampleRestaurant
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
use LINE\Constants\MessageType;

/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings("PHPMD.CouplingBetweenObjects")
*/
class FlexSampleShopping
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
use LINE\Webhook\Model\MessageEvent;

/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings("PHPMD.CouplingBetweenObjects")
*/
class ImageMessageHandler implements EventHandler
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
use LINE\Webhook\Model\TextMessageContent;

/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings("PHPMD.CouplingBetweenObjects")
* @SuppressWarnings("PHPMD.CyclomaticComplexity")
* @SuppressWarnings("PHPMD.ExcessiveMethodLength")
*/
class TextMessageHandler implements EventHandler
{
Expand Down
8 changes: 4 additions & 4 deletions src/laravel/test/Facades/FacadesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
namespace LINE\Laravel\Tests\Facades;

/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings("PHPMD.CouplingBetweenObjects")
*/
class FacadesTest extends \Orchestra\Testbench\TestCase
{
/**
* Load package service provider
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
* @param \Illuminate\Foundation\Application $app
* @return array
*/
Expand All @@ -38,7 +38,7 @@ protected function getPackageProviders($app)
/**
* Load package alias
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
* @param \Illuminate\Foundation\Application $app
* @return array
*/
Expand Down Expand Up @@ -69,7 +69,7 @@ public function testConfigLoaded()
/**
* Testing LINEBot facade instance
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
* @return void
*/
public function testLINEBotFacadeInstance()
Expand Down
2 changes: 1 addition & 1 deletion src/parser/lib/EventRequestParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
use LINE\Webhook\Model\UserMentionee;

/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings("PHPMD.CouplingBetweenObjects")
*/
class EventRequestParser
{
Expand Down
3 changes: 1 addition & 2 deletions src/parser/test/EventRequestParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1234,11 +1234,10 @@ public function testParseEventRequest()
$this->assertEquals('__unknown__', $event->jsonSerialize()->type); // with unprocessed event body
$this->assertEquals(12345678901234, $event->getTimestamp());
$this->assertEquals('active', $event->getMode());
$this->assertTrue($source instanceof UserSource);
$this->assertInstanceOf(UserSource::class, $source);
$this->assertEquals('userid', $source->getUserId());
$this->assertEquals('testwebhookeventid', $event->getWebhookEventId());
$this->assertFalse($event->getDeliveryContext()->getIsRedelivery());
$this->assertEquals(true, $source instanceof UserSource);
}

{
Expand Down
Loading