Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
StyleCIBot committed Nov 19, 2024
1 parent ad4c7f1 commit a5aafde
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 1 addition & 3 deletions extensions/tags/src/Listener/SaveTagsToDatabase.php
Original file line number Diff line number Diff line change
@@ -36,7 +36,6 @@ class SaveTagsToDatabase
*/
protected $translator;


/**
* @var TagCountValidator
*/
@@ -149,8 +148,7 @@ protected function validateTagCount($type, $count)
// $this->tagCountValidator->setCount($count);

$this->tagCountValidator->assertValid([$key => $count]);



// $validator = $this->validator->make(
// [$key => $count],
// [$key => ['numeric', $min === $max ? "size:$min" : "between:$min,$max"]]
9 changes: 8 additions & 1 deletion extensions/tags/src/TagCountValidator.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/

namespace Flarum\Tags;

use Flarum\Foundation\AbstractValidator;
@@ -107,7 +114,7 @@ protected function getRules()
'tag_count_'.$type => [
'numeric',
'size:'.$min,
'between:'.$min,$max
'between:'.$min, $max
]
];
}

0 comments on commit a5aafde

Please sign in to comment.