Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Jul 28, 2023
1 parent d453fa1 commit c7aed78
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField
{
$storageDef->dataInt1 = (int) ($fieldDef->fieldTypeConstraints->validators[self::TAGS_VALIDATOR_IDENTIFIER]['subTreeLimit'] ?? 0);
$storageDef->dataInt3 = (int) ($fieldDef->fieldTypeConstraints->fieldSettings['hideRootTag'] ?? 0);
$storageDef->dataInt4 = (int) ($fieldDef->fieldTypeConstraints->validators[static::TAGS_VALIDATOR_IDENTIFIER]['maxTags'] ?? 0);
$storageDef->dataInt4 = (int) ($fieldDef->fieldTypeConstraints->validators[self::TAGS_VALIDATOR_IDENTIFIER]['maxTags'] ?? 0);
$storageDef->dataText1 = $fieldDef->fieldTypeConstraints->fieldSettings['editView'] ?? Type::EDIT_VIEW_DEFAULT_VALUE;
}

Expand All @@ -43,7 +43,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin
);

$fieldDef->fieldTypeConstraints->validators = [
static::TAGS_VALIDATOR_IDENTIFIER => [
self::TAGS_VALIDATOR_IDENTIFIER => [
'subTreeLimit' => (int) $storageDef->dataInt1,
'maxTags' => (int) $storageDef->dataInt4,
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
abstract class Tags implements CriterionVisitor
{
public function __construct(
private readonly FieldNameResolver $fieldNameResolver,
private readonly Handler $contentTypeHandler,
private readonly string $fieldTypeIdentifier,
private readonly string $fieldName,
private FieldNameResolver $fieldNameResolver,
private Handler $contentTypeHandler,
private string $fieldTypeIdentifier,
private string $fieldName,
) {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ public function visit(CriterionVisitor $dispatcher, Criterion $criterion, Langua

$query = new BoolQuery();
foreach ($searchFields as $name => $fieldType) {
/**
* @var string $value
*/
/** @var string $value */
foreach ($criterion->value as $value) {
if ($isLikeOperator) {
$query->addShould(new PrefixQuery($name, $value));
Expand Down
2 changes: 1 addition & 1 deletion bundle/Routing/TagRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function matchRequest(Request $request): array
// Unfortunately, since at this point user is still anonymous (why!?), this is the best we can do
$params = [
'_route' => self::TAG_URL_ROUTE_NAME,
'_controller' => static::TAG_VIEW_ACTION_CONTROLLER,
'_controller' => self::TAG_VIEW_ACTION_CONTROLLER,
'tagId' => $tag->id,
];

Expand Down
2 changes: 1 addition & 1 deletion bundle/Validator/Constraints/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ final class Tag extends Constraint
{
public string $message = 'netgen_tags.tag.no_tag';

public string $synonymMessage = 'netgen_tags.tag.synonym';
public string $synonymMessage = 'netgen_tags.tag.synonym';

public string $invalidMessage = 'netgen_tags.tag.invalid_tag';

Expand Down

0 comments on commit c7aed78

Please sign in to comment.