Skip to content

Commit 7da361d

Browse files
committed
PSR-12 compatibility
1 parent cfa24dd commit 7da361d

File tree

6 files changed

+68
-68
lines changed

6 files changed

+68
-68
lines changed

api.php

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3385,7 +3385,7 @@ public function clear(): bool
33853385

33863386
class TempFileCache implements Cache
33873387
{
3388-
public const SUFFIX = 'cache';
3388+
const SUFFIX = 'cache';
33893389

33903390
private $path;
33913391
private $segments;
@@ -3534,9 +3534,9 @@ public function clear(): bool
35343534

35353535
class ReflectedColumn implements \JsonSerializable
35363536
{
3537-
public const DEFAULT_LENGTH = 255;
3538-
public const DEFAULT_PRECISION = 19;
3539-
public const DEFAULT_SCALE = 4;
3537+
const DEFAULT_LENGTH = 255;
3538+
const DEFAULT_PRECISION = 19;
3539+
const DEFAULT_SCALE = 4;
35403540

35413541
private $name;
35423542
private $type;
@@ -8865,27 +8865,27 @@ class ErrorCode
88658865
private $message;
88668866
private $status;
88678867

8868-
public const ERROR_NOT_FOUND = 9999;
8869-
public const ROUTE_NOT_FOUND = 1000;
8870-
public const TABLE_NOT_FOUND = 1001;
8871-
public const ARGUMENT_COUNT_MISMATCH = 1002;
8872-
public const RECORD_NOT_FOUND = 1003;
8873-
public const ORIGIN_FORBIDDEN = 1004;
8874-
public const COLUMN_NOT_FOUND = 1005;
8875-
public const TABLE_ALREADY_EXISTS = 1006;
8876-
public const COLUMN_ALREADY_EXISTS = 1007;
8877-
public const HTTP_MESSAGE_NOT_READABLE = 1008;
8878-
public const DUPLICATE_KEY_EXCEPTION = 1009;
8879-
public const DATA_INTEGRITY_VIOLATION = 1010;
8880-
public const AUTHENTICATION_REQUIRED = 1011;
8881-
public const AUTHENTICATION_FAILED = 1012;
8882-
public const INPUT_VALIDATION_FAILED = 1013;
8883-
public const OPERATION_FORBIDDEN = 1014;
8884-
public const OPERATION_NOT_SUPPORTED = 1015;
8885-
public const TEMPORARY_OR_PERMANENTLY_BLOCKED = 1016;
8886-
public const BAD_OR_MISSING_XSRF_TOKEN = 1017;
8887-
public const ONLY_AJAX_REQUESTS_ALLOWED = 1018;
8888-
public const PAGINATION_FORBIDDEN = 1019;
8868+
const ERROR_NOT_FOUND = 9999;
8869+
const ROUTE_NOT_FOUND = 1000;
8870+
const TABLE_NOT_FOUND = 1001;
8871+
const ARGUMENT_COUNT_MISMATCH = 1002;
8872+
const RECORD_NOT_FOUND = 1003;
8873+
const ORIGIN_FORBIDDEN = 1004;
8874+
const COLUMN_NOT_FOUND = 1005;
8875+
const TABLE_ALREADY_EXISTS = 1006;
8876+
const COLUMN_ALREADY_EXISTS = 1007;
8877+
const HTTP_MESSAGE_NOT_READABLE = 1008;
8878+
const DUPLICATE_KEY_EXCEPTION = 1009;
8879+
const DATA_INTEGRITY_VIOLATION = 1010;
8880+
const AUTHENTICATION_REQUIRED = 1011;
8881+
const AUTHENTICATION_FAILED = 1012;
8882+
const INPUT_VALIDATION_FAILED = 1013;
8883+
const OPERATION_FORBIDDEN = 1014;
8884+
const OPERATION_NOT_SUPPORTED = 1015;
8885+
const TEMPORARY_OR_PERMANENTLY_BLOCKED = 1016;
8886+
const BAD_OR_MISSING_XSRF_TOKEN = 1017;
8887+
const ONLY_AJAX_REQUESTS_ALLOWED = 1018;
8888+
const PAGINATION_FORBIDDEN = 1019;
88898889

88908890
private $values = [
88918891
9999 => ["%s", ResponseFactory::INTERNAL_SERVER_ERROR],
@@ -9133,7 +9133,7 @@ public function getPageLimit(array $params): int
91339133

91349134
class PathTree implements \JsonSerializable
91359135
{
9136-
public const WILDCARD = '*';
9136+
const WILDCARD = '*';
91379137

91389138
private $tree;
91399139

@@ -10134,14 +10134,14 @@ public static function getTableNames(ServerRequestInterface $request, Reflection
1013410134

1013510135
class ResponseFactory
1013610136
{
10137-
public const OK = 200;
10138-
public const UNAUTHORIZED = 401;
10139-
public const FORBIDDEN = 403;
10140-
public const NOT_FOUND = 404;
10141-
public const METHOD_NOT_ALLOWED = 405;
10142-
public const CONFLICT = 409;
10143-
public const UNPROCESSABLE_ENTITY = 422;
10144-
public const INTERNAL_SERVER_ERROR = 500;
10137+
const OK = 200;
10138+
const UNAUTHORIZED = 401;
10139+
const FORBIDDEN = 403;
10140+
const NOT_FOUND = 404;
10141+
const METHOD_NOT_ALLOWED = 405;
10142+
const CONFLICT = 409;
10143+
const UNPROCESSABLE_ENTITY = 422;
10144+
const INTERNAL_SERVER_ERROR = 500;
1014510145

1014610146
public static function fromHtml(int $status, string $html): ResponseInterface
1014710147
{

src/Tqdev/PhpCrudApi/Cache/TempFileCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class TempFileCache implements Cache
66
{
7-
public const SUFFIX = 'cache';
7+
const SUFFIX = 'cache';
88

99
private $path;
1010
private $segments;

src/Tqdev/PhpCrudApi/Column/Reflection/ReflectedColumn.php

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

77
class ReflectedColumn implements \JsonSerializable
88
{
9-
public const DEFAULT_LENGTH = 255;
10-
public const DEFAULT_PRECISION = 19;
11-
public const DEFAULT_SCALE = 4;
9+
const DEFAULT_LENGTH = 255;
10+
const DEFAULT_PRECISION = 19;
11+
const DEFAULT_SCALE = 4;
1212

1313
private $name;
1414
private $type;

src/Tqdev/PhpCrudApi/Record/ErrorCode.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,27 @@ class ErrorCode
1010
private $message;
1111
private $status;
1212

13-
public const ERROR_NOT_FOUND = 9999;
14-
public const ROUTE_NOT_FOUND = 1000;
15-
public const TABLE_NOT_FOUND = 1001;
16-
public const ARGUMENT_COUNT_MISMATCH = 1002;
17-
public const RECORD_NOT_FOUND = 1003;
18-
public const ORIGIN_FORBIDDEN = 1004;
19-
public const COLUMN_NOT_FOUND = 1005;
20-
public const TABLE_ALREADY_EXISTS = 1006;
21-
public const COLUMN_ALREADY_EXISTS = 1007;
22-
public const HTTP_MESSAGE_NOT_READABLE = 1008;
23-
public const DUPLICATE_KEY_EXCEPTION = 1009;
24-
public const DATA_INTEGRITY_VIOLATION = 1010;
25-
public const AUTHENTICATION_REQUIRED = 1011;
26-
public const AUTHENTICATION_FAILED = 1012;
27-
public const INPUT_VALIDATION_FAILED = 1013;
28-
public const OPERATION_FORBIDDEN = 1014;
29-
public const OPERATION_NOT_SUPPORTED = 1015;
30-
public const TEMPORARY_OR_PERMANENTLY_BLOCKED = 1016;
31-
public const BAD_OR_MISSING_XSRF_TOKEN = 1017;
32-
public const ONLY_AJAX_REQUESTS_ALLOWED = 1018;
33-
public const PAGINATION_FORBIDDEN = 1019;
13+
const ERROR_NOT_FOUND = 9999;
14+
const ROUTE_NOT_FOUND = 1000;
15+
const TABLE_NOT_FOUND = 1001;
16+
const ARGUMENT_COUNT_MISMATCH = 1002;
17+
const RECORD_NOT_FOUND = 1003;
18+
const ORIGIN_FORBIDDEN = 1004;
19+
const COLUMN_NOT_FOUND = 1005;
20+
const TABLE_ALREADY_EXISTS = 1006;
21+
const COLUMN_ALREADY_EXISTS = 1007;
22+
const HTTP_MESSAGE_NOT_READABLE = 1008;
23+
const DUPLICATE_KEY_EXCEPTION = 1009;
24+
const DATA_INTEGRITY_VIOLATION = 1010;
25+
const AUTHENTICATION_REQUIRED = 1011;
26+
const AUTHENTICATION_FAILED = 1012;
27+
const INPUT_VALIDATION_FAILED = 1013;
28+
const OPERATION_FORBIDDEN = 1014;
29+
const OPERATION_NOT_SUPPORTED = 1015;
30+
const TEMPORARY_OR_PERMANENTLY_BLOCKED = 1016;
31+
const BAD_OR_MISSING_XSRF_TOKEN = 1017;
32+
const ONLY_AJAX_REQUESTS_ALLOWED = 1018;
33+
const PAGINATION_FORBIDDEN = 1019;
3434

3535
private $values = [
3636
9999 => ["%s", ResponseFactory::INTERNAL_SERVER_ERROR],

src/Tqdev/PhpCrudApi/Record/PathTree.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class PathTree implements \JsonSerializable
66
{
7-
public const WILDCARD = '*';
7+
const WILDCARD = '*';
88

99
private $tree;
1010

src/Tqdev/PhpCrudApi/ResponseFactory.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77

88
class ResponseFactory
99
{
10-
public const OK = 200;
11-
public const UNAUTHORIZED = 401;
12-
public const FORBIDDEN = 403;
13-
public const NOT_FOUND = 404;
14-
public const METHOD_NOT_ALLOWED = 405;
15-
public const CONFLICT = 409;
16-
public const UNPROCESSABLE_ENTITY = 422;
17-
public const INTERNAL_SERVER_ERROR = 500;
10+
const OK = 200;
11+
const UNAUTHORIZED = 401;
12+
const FORBIDDEN = 403;
13+
const NOT_FOUND = 404;
14+
const METHOD_NOT_ALLOWED = 405;
15+
const CONFLICT = 409;
16+
const UNPROCESSABLE_ENTITY = 422;
17+
const INTERNAL_SERVER_ERROR = 500;
1818

1919
public static function fromHtml(int $status, string $html): ResponseInterface
2020
{

0 commit comments

Comments
 (0)