mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-03 06:54:34 +02:00
Fixed further inspection issues
This commit is contained in:
parent
33e36f3d2b
commit
87533b6031
37 changed files with 46 additions and 71 deletions
|
@ -47,7 +47,7 @@ final class PermissionsMapper implements DataMapperInterface
|
|||
* @param mixed $viewData View data of the compound form being initialized
|
||||
* @param Traversable $forms A list of {@link FormInterface} instances
|
||||
*/
|
||||
public function mapDataToForms($viewData, \Traversable $forms): void
|
||||
public function mapDataToForms(mixed $viewData, \Traversable $forms): void
|
||||
{
|
||||
foreach ($forms as $form) {
|
||||
if ($this->inherit) {
|
||||
|
@ -94,7 +94,7 @@ final class PermissionsMapper implements DataMapperInterface
|
|||
* @param mixed $viewData The compound form's view data that get mapped
|
||||
* its children model data
|
||||
*/
|
||||
public function mapFormsToData(\Traversable $forms, &$viewData): void
|
||||
public function mapFormsToData(\Traversable $forms, mixed &$viewData): void
|
||||
{
|
||||
if ($this->inherit) {
|
||||
throw new RuntimeException('The permission type is readonly when it is showing read only data!');
|
||||
|
|
|
@ -153,7 +153,7 @@ final class SIUnitType extends AbstractType implements DataMapperInterface
|
|||
*
|
||||
* @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported
|
||||
*/
|
||||
public function mapDataToForms($viewData, \Traversable $forms): void
|
||||
public function mapDataToForms(mixed $viewData, \Traversable $forms): void
|
||||
{
|
||||
$forms = iterator_to_array($forms);
|
||||
|
||||
|
@ -204,7 +204,7 @@ final class SIUnitType extends AbstractType implements DataMapperInterface
|
|||
*
|
||||
* @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported
|
||||
*/
|
||||
public function mapFormsToData(\Traversable $forms, &$viewData): void
|
||||
public function mapFormsToData(\Traversable $forms, mixed &$viewData): void
|
||||
{
|
||||
//Convert both fields to a single float value.
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ final class TriStateCheckboxType extends AbstractType implements DataTransformer
|
|||
*
|
||||
* @throws TransformationFailedException when the transformation fails
|
||||
*/
|
||||
public function transform($value)
|
||||
public function transform(mixed $value)
|
||||
{
|
||||
if (true === $value) {
|
||||
return 'true';
|
||||
|
@ -145,7 +145,7 @@ final class TriStateCheckboxType extends AbstractType implements DataTransformer
|
|||
*
|
||||
* @throws TransformationFailedException when the transformation fails
|
||||
*/
|
||||
public function reverseTransform($value)
|
||||
public function reverseTransform(mixed $value)
|
||||
{
|
||||
return match ($value) {
|
||||
'true' => true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue