Lint
This commit is contained in:
parent
e0bd7c5add
commit
f05a919b9c
|
@ -11,6 +11,9 @@ class IsDirtyAction
|
||||||
{
|
{
|
||||||
use AsAction;
|
use AsAction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array<string, mixed>
|
||||||
|
*/
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -20,7 +20,7 @@ class FormConditionResolver extends ConditionResolver
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
public function filterCondition($mode, $ifs): bool
|
public function filterCondition(string $mode, array $ifs): bool
|
||||||
{
|
{
|
||||||
if (count($ifs) === 0) {
|
if (count($ifs) === 0) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -41,8 +41,6 @@ class FormConditionResolver extends ConditionResolver
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode === 'all') {
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,8 @@ namespace App\Form\Fields;
|
||||||
use App\Form\Data\ColumnData;
|
use App\Form\Data\ColumnData;
|
||||||
use App\Form\Enums\NamiType;
|
use App\Form\Enums\NamiType;
|
||||||
use App\Form\Enums\SpecialType;
|
use App\Form\Enums\SpecialType;
|
||||||
|
use App\Form\Matchers\Matcher;
|
||||||
|
use App\Form\Matchers\SingleValueMatcher;
|
||||||
use App\Form\Models\Form;
|
use App\Form\Models\Form;
|
||||||
use App\Form\Models\Participant;
|
use App\Form\Models\Participant;
|
||||||
use App\Form\Presenters\DefaultPresenter;
|
use App\Form\Presenters\DefaultPresenter;
|
||||||
|
@ -170,4 +172,9 @@ abstract class Field extends Data
|
||||||
{
|
{
|
||||||
return $this->getMatcher()->setValue($this->value)->matches($comparator, $value);
|
return $this->getMatcher()->setValue($this->value)->matches($comparator, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getMatcher(): Matcher
|
||||||
|
{
|
||||||
|
return app(SingleValueMatcher::class);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ abstract class ConditionResolver
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* @param array<string, mixed> $block
|
||||||
*/
|
*/
|
||||||
public function filterBlock(array $block): bool
|
public function filterBlock(array $block): bool
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,6 +22,9 @@ trait FakesMedia
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array<string, mixed> $properties
|
||||||
|
*/
|
||||||
public function withDocument(string $collection, string $filename, string $content = '', array $properties = []): self
|
public function withDocument(string $collection, string $filename, string $content = '', array $properties = []): self
|
||||||
{
|
{
|
||||||
return $this->afterCreating(function (HasMedia $model) use ($filename, $collection, $content, $properties) {
|
return $this->afterCreating(function (HasMedia $model) use ($filename, $collection, $content, $properties) {
|
||||||
|
|
|
@ -533,11 +533,6 @@ parameters:
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Member/FilterScope.php
|
path: app/Member/FilterScope.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Call to function is_null\\(\\) with array will always evaluate to false\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: app/Form/Models/Form.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Unable to resolve the template type TKey in call to function collect$#"
|
message: "#^Unable to resolve the template type TKey in call to function collect$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
|
|
@ -20,12 +20,16 @@ class EditorRequestFactory extends RequestFactory
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array<string, mixed> $conditions
|
||||||
|
*/
|
||||||
public function text(int $id, string $text, array $conditions = ['mode' => 'all', 'ifs' => []]): self
|
public function text(int $id, string $text, array $conditions = ['mode' => 'all', 'ifs' => []]): self
|
||||||
{
|
{
|
||||||
return $this->state($this->paragraphBlock($id, $text, $conditions));
|
return $this->state($this->paragraphBlock($id, $text, $conditions));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param array<string, mixed> $conditions
|
||||||
* @return array<string, mixed>
|
* @return array<string, mixed>
|
||||||
*/
|
*/
|
||||||
public function paragraphBlock(int $id, string $text, array $conditions = ['mode' => 'all', 'ifs' => []]): array
|
public function paragraphBlock(int $id, string $text, array $conditions = ['mode' => 'all', 'ifs' => []]): array
|
||||||
|
|
Loading…
Reference in New Issue