Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
tipuloidea
/
back
/
vendor
/
knuckleswtf
/
scribe
/
src
/
Extracting
/
Strategies
/
QueryParameters
:
GetFromInlineValidator.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace Knuckles\Scribe\Extracting\Strategies\QueryParameters; use Knuckles\Scribe\Extracting\Strategies\GetFromInlineValidatorBase; use PhpParser\Node; class GetFromInlineValidator extends GetFromInlineValidatorBase { protected function isValidationStatementMeantForThisStrategy(Node $validationStatement): bool { // Only use this validator for query params if there's a "// Query parameters" comment above $comments = $validationStatement->getComments(); $comments = join("\n", array_map(fn($comment) => $comment->getReformattedText(), $comments)); if (strpos(strtolower($comments), "query parameters") !== false) { return true; } return false; } }