Skip to content

Commit 7c47421

Browse files
authored
Merge pull request #143 from php-api-clients/add-phpcs-endisable-to-client-docblocks
Add phpcs:enable/disable to client docblocks
2 parents 56ef723 + 5c866e0 commit 7c47421

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Generator/Client.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ public static function generate(string $pathPrefix, string $namespace, \ApiClien
178178
$class->addStmt(
179179
$factory->method('call')->makePublic()->setDocComment(
180180
new Doc(implode(PHP_EOL, [
181+
'// phpcs:disable',
181182
'/**',
182183
' * @return ' . (function (array $operations): string {
183184
$count = count($operations);
@@ -200,6 +201,7 @@ public static function generate(string $pathPrefix, string $namespace, \ApiClien
200201
return $left . $right;
201202
})($operations),
202203
' */',
204+
'// phpcs:enable',
203205
]))
204206
)->addParam((new Param('call'))->setType('string'))->addParam((new Param('params'))->setType('array')->setDefault([]))->addStmts([
205207
new Node\Stmt\Expression(
@@ -439,6 +441,7 @@ public static function generate(string $pathPrefix, string $namespace, \ApiClien
439441
$class->addStmt(
440442
$factory->method('callAsync')->makePublic()->setDocComment(
441443
new Doc(implode(PHP_EOL, [
444+
'// phpcs:disable',
442445
'/**',
443446
' * @return ' . (function (array $operations): string {
444447
$count = count($operations);
@@ -461,6 +464,7 @@ public static function generate(string $pathPrefix, string $namespace, \ApiClien
461464
return $left . $right;
462465
})($operations),
463466
' */',
467+
'// phpcs:enable',
464468
]))
465469
)->addParam((new Param('call'))->setType('string'))->addParam((new Param('params'))->setType('array')->setDefault([]))->addStmt(
466470
new Node\Expr\Assign(

src/Generator/ClientInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public static function generate(string $pathPrefix, string $namespace, array $op
7878
$class->addStmt(
7979
$factory->method('call')->makePublic()->setDocComment(
8080
new Doc(implode(PHP_EOL, [
81+
'// phpcs:disable',
8182
'/**',
8283
' * @return ' . (function (array $operations): string {
8384
$count = count($operations);
@@ -100,13 +101,15 @@ public static function generate(string $pathPrefix, string $namespace, array $op
100101
return $left . $right;
101102
})($operations),
102103
' */',
104+
'// phpcs:enable',
103105
]))
104106
)->addParam((new Param('call'))->setType('string'))->addParam((new Param('params'))->setType('array')->setDefault([]))
105107
);
106108

107109
$class->addStmt(
108110
$factory->method('callAsync')->makePublic()->setDocComment(
109111
new Doc(implode(PHP_EOL, [
112+
'// phpcs:disable',
110113
'/**',
111114
' * @return ' . (function (array $operations): string {
112115
$count = count($operations);
@@ -129,6 +132,7 @@ public static function generate(string $pathPrefix, string $namespace, array $op
129132
return $left . $right;
130133
})($operations),
131134
' */',
135+
'// phpcs:enable',
132136
]))
133137
)->addParam((new Param('call'))->setType('string'))->addParam((new Param('params'))->setType('array')->setDefault([]))
134138
);

0 commit comments

Comments
 (0)