Skip to content

Commit e240dca

Browse files
committed
Lint fixes
1 parent aed1e3d commit e240dca

File tree

3 files changed

+21
-24
lines changed

3 files changed

+21
-24
lines changed

src/SDK/Language.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
abstract class Language
66
{
7-
const TYPE_INTEGER = 'integer';
8-
const TYPE_NUMBER = 'number';
9-
const TYPE_STRING = 'string';
10-
const TYPE_BOOLEAN = 'boolean';
11-
const TYPE_ARRAY = 'array';
12-
const TYPE_OBJECT = 'object';
13-
const TYPE_FILE = 'file';
7+
public const TYPE_INTEGER = 'integer';
8+
public const TYPE_NUMBER = 'number';
9+
public const TYPE_STRING = 'string';
10+
public const TYPE_BOOLEAN = 'boolean';
11+
public const TYPE_ARRAY = 'array';
12+
public const TYPE_OBJECT = 'object';
13+
public const TYPE_FILE = 'file';
1414

1515
/**
1616
* @var array

src/Spec/Spec.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@
77

88
abstract class Spec extends ArrayObject
99
{
10-
const FORMAT_OPEN_API_3 = 'Open API 3';
11-
const FORMAT_SWAGGER_2 = 'Swagger 2';
12-
13-
const SET_TYPE_ASSIGN = 'assign';
14-
const SET_TYPE_PREPEND = 'prepend';
15-
const SET_TYPE_APPEND = 'append';
10+
private const SET_TYPE_ASSIGN = 'assign';
11+
private const SET_TYPE_PREPEND = 'prepend';
12+
private const SET_TYPE_APPEND = 'append';
1613

1714
/**
1815
* Spec constructor.

tests/Base.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,47 +16,47 @@
1616

1717
abstract class Base extends TestCase
1818
{
19-
const FOO_RESPONSES = [
19+
protected const FOO_RESPONSES = [
2020
'GET:/v1/mock/tests/foo:passed',
2121
'POST:/v1/mock/tests/foo:passed',
2222
'PUT:/v1/mock/tests/foo:passed',
2323
'PATCH:/v1/mock/tests/foo:passed',
2424
'DELETE:/v1/mock/tests/foo:passed',
2525
];
2626

27-
const BAR_RESPONSES = [
27+
protected const BAR_RESPONSES = [
2828
'GET:/v1/mock/tests/bar:passed',
2929
'POST:/v1/mock/tests/bar:passed',
3030
'PUT:/v1/mock/tests/bar:passed',
3131
'PATCH:/v1/mock/tests/bar:passed',
3232
'DELETE:/v1/mock/tests/bar:passed',
3333
];
3434

35-
const GENERAL_RESPONSES = [
35+
protected const GENERAL_RESPONSES = [
3636
'GET:/v1/mock/tests/general/redirect/done:passed',
3737
'POST:/v1/mock/tests/general/upload:passed',
3838
];
3939

40-
const EXTENDED_GENERAL_RESPONSES = [
40+
protected const EXTENDED_GENERAL_RESPONSES = [
4141
'Download test passed.',
4242
];
4343

44-
const COOKIE_RESPONSES = [
44+
protected const COOKIE_RESPONSES = [
4545
'GET:/v1/mock/tests/general/set-cookie:passed',
4646
'GET:/v1/mock/tests/general/get-cookie:passed',
4747
];
4848

49-
const LARGE_FILE_RESPONSES = [
49+
protected const LARGE_FILE_RESPONSES = [
5050
'POST:/v1/mock/tests/general/upload:passed',
5151
];
5252

53-
const EXCEPTION_RESPONSES = [
53+
protected const EXCEPTION_RESPONSES = [
5454
'Mock 400 error',
5555
'Server Error',
5656
'This is a text error',
5757
];
5858

59-
const REALTIME_RESPONSES = [
59+
protected const REALTIME_RESPONSES = [
6060
'WS:/v1/realtime:passed',
6161
];
6262

@@ -110,7 +110,7 @@ public function testHTTPSuccess(): void
110110

111111
$dir = __DIR__ . '/sdks/' . $this->language;
112112

113-
$this->rmdir_recursive($dir);
113+
$this->rmdirRecursive($dir);
114114

115115
$sdk->generate(__DIR__ . '/sdks/' . $this->language);
116116

@@ -159,7 +159,7 @@ public function testHTTPSuccess(): void
159159
}
160160
}
161161

162-
private function rmdir_recursive($dir)
162+
private function rmdirRecursive($dir)
163163
{
164164
if (!\is_dir($dir)) {
165165
return;
@@ -169,7 +169,7 @@ private function rmdir_recursive($dir)
169169
continue;
170170
}
171171
if (\is_dir("$dir/$file")) {
172-
$this->rmdir_recursive("$dir/$file");
172+
$this->rmdirRecursive("$dir/$file");
173173
} else {
174174
\unlink("$dir/$file");
175175
}

0 commit comments

Comments
 (0)