Skip to content

Commit 8e88757

Browse files
committed
* mark method setRequiredPostTypesByParams() as private as it's only used in this class @ App\PostsQuery\ParamsValidator
@ be
1 parent b799bfa commit 8e88757

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

be/src/Controller/PostsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function query(Request $request): array
4343
'cursor' => new Assert\Optional(new Assert\Regex(
4444
// https://stackoverflow.com/questions/475074/regex-to-parse-or-validate-base64-data
4545
// (,|$)|,){5,6} means allow at most 5~6 parts of base64 segment or empty string to exist
46-
/** @lang RegExp */'/^(([A-Za-z0-9-_]{4})*([A-Za-z0-9-_]{2,3})(,|$)|,){5,6}$/',
46+
/** @lang RegExp */'/^(([A-Za-z0-9-_]{4})*([A-Za-z0-9-_]{2,3})(,|$)|,){5,6}$/',
4747
)),
4848
'query' => new Assert\Required(new Assert\Json()),
4949
]));

be/src/PostsQuery/ParamsValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function addDefaultParamsThenValidate(): void
4141
$this->validate40004($newPostTypes);
4242
}
4343

44-
public function setRequiredPostTypesByParams(): array
44+
private function setRequiredPostTypesByParams(): array
4545
{
4646
$currentPostTypes = $this->params->getUniqueParamValue('postTypes');
4747
$requiredPostTypes = array_intersect(Helper::POST_TYPES, ...array_values(Arr::only(

0 commit comments

Comments
 (0)