Skip to content

Commit ab04435

Browse files
authored
Support phpstan 2.0 (#635)
I made adjustments due to breaking changes in PHPStan 2.0. When the Suppress annotation contains a period, quotes are now required. phpstan/phpdoc-parser#256 close #622
1 parent 5db381c commit ab04435

File tree

11 files changed

+19
-20
lines changed

11 files changed

+19
-20
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"orchestra/testbench": "*",
4343
"guzzlehttp/guzzle": "^7.3",
4444
"guzzlehttp/psr7": "^1.7 || ^2.0",
45-
"phpstan/phpstan": "^1.10",
45+
"phpstan/phpstan": "^2.0",
4646
"phpunit/phpunit": "^10.2"
4747
},
4848
"autoload": {

docs/classes/LINE-Laravel-Tests-Facades-FacadesTest.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ <h5 class="phpdocumentor-tag-list__heading" id="tags">
167167
</dt>
168168
<dd class="phpdocumentor-tag-list__definition">
169169

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

173173
</dd>
@@ -294,7 +294,7 @@ <h5 class="phpdocumentor-tag-list__heading" id="tags">
294294
</dt>
295295
<dd class="phpdocumentor-tag-list__definition">
296296

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

300300
</dd>
@@ -352,7 +352,7 @@ <h5 class="phpdocumentor-tag-list__heading" id="tags">
352352
</dt>
353353
<dd class="phpdocumentor-tag-list__definition">
354354

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

358358
</dd>
@@ -410,7 +410,7 @@ <h5 class="phpdocumentor-tag-list__heading" id="tags">
410410
</dt>
411411
<dd class="phpdocumentor-tag-list__definition">
412412

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

416416
</dd>

docs/classes/LINE-Parser-EventRequestParser.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ <h5 class="phpdocumentor-tag-list__heading" id="tags">
162162
</dt>
163163
<dd class="phpdocumentor-tag-list__definition">
164164

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

168168
</dd>

docs/classes/LINE-Parser-Tests-EventRequestParserTest.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ <h4 class="phpdocumentor-element__name" id="method_getSignature">
12231223
<aside class="phpdocumentor-element-found-in">
12241224
<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>
12251225
:
1226-
<span class="phpdocumentor-element-found-in__line">1715</span>
1226+
<span class="phpdocumentor-element-found-in__line">1714</span>
12271227

12281228
</aside>
12291229

examples/KitchenSink/src/LINEBot/KitchenSink/EventHandler/MessageHandler/Flex/FlexSampleRestaurant.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
use LINE\Constants\MessageType;
5050

5151
/**
52-
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
52+
* @SuppressWarnings("PHPMD.CouplingBetweenObjects")
5353
*/
5454
class FlexSampleRestaurant
5555
{

examples/KitchenSink/src/LINEBot/KitchenSink/EventHandler/MessageHandler/Flex/FlexSampleShopping.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
use LINE\Constants\MessageType;
4444

4545
/**
46-
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
46+
* @SuppressWarnings("PHPMD.CouplingBetweenObjects")
4747
*/
4848
class FlexSampleShopping
4949
{

examples/KitchenSink/src/LINEBot/KitchenSink/EventHandler/MessageHandler/ImageMessageHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
use LINE\Webhook\Model\MessageEvent;
3131

3232
/**
33-
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
33+
* @SuppressWarnings("PHPMD.CouplingBetweenObjects")
3434
*/
3535
class ImageMessageHandler implements EventHandler
3636
{

examples/KitchenSink/src/LINEBot/KitchenSink/EventHandler/MessageHandler/TextMessageHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
use LINE\Webhook\Model\TextMessageContent;
5858

5959
/**
60-
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
61-
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
62-
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
60+
* @SuppressWarnings("PHPMD.CouplingBetweenObjects")
61+
* @SuppressWarnings("PHPMD.CyclomaticComplexity")
62+
* @SuppressWarnings("PHPMD.ExcessiveMethodLength")
6363
*/
6464
class TextMessageHandler implements EventHandler
6565
{

src/laravel/test/Facades/FacadesTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
namespace LINE\Laravel\Tests\Facades;
2020

2121
/**
22-
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
22+
* @SuppressWarnings("PHPMD.CouplingBetweenObjects")
2323
*/
2424
class FacadesTest extends \Orchestra\Testbench\TestCase
2525
{
2626
/**
2727
* Load package service provider
2828
*
29-
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
29+
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
3030
* @param \Illuminate\Foundation\Application $app
3131
* @return array
3232
*/
@@ -38,7 +38,7 @@ protected function getPackageProviders($app)
3838
/**
3939
* Load package alias
4040
*
41-
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
41+
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
4242
* @param \Illuminate\Foundation\Application $app
4343
* @return array
4444
*/
@@ -69,7 +69,7 @@ public function testConfigLoaded()
6969
/**
7070
* Testing LINEBot facade instance
7171
*
72-
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
72+
* @SuppressWarnings("PHPMD.UnusedFormalParameter")
7373
* @return void
7474
*/
7575
public function testLINEBotFacadeInstance()

src/parser/lib/EventRequestParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
use LINE\Webhook\Model\UserMentionee;
4545

4646
/**
47-
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
47+
* @SuppressWarnings("PHPMD.CouplingBetweenObjects")
4848
*/
4949
class EventRequestParser
5050
{

0 commit comments

Comments
 (0)