* coding style fixes
This commit is contained in:
@@ -1,21 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMezzioModule\Form\Element;
|
||||
|
||||
use Laminas\Form\Element\MultiCheckbox;
|
||||
use Laminas\Stdlib\ArrayUtils;
|
||||
use Traversable;
|
||||
|
||||
use function array_map;
|
||||
use function is_array;
|
||||
|
||||
class ObjectMultiCheckbox extends MultiCheckbox
|
||||
{
|
||||
/**
|
||||
* @var Proxy
|
||||
*/
|
||||
protected $proxy;
|
||||
protected Proxy $proxy;
|
||||
|
||||
/**
|
||||
* @return Proxy
|
||||
*/
|
||||
public function getProxy(): Proxy
|
||||
{
|
||||
if (null === $this->proxy) {
|
||||
@@ -52,10 +51,10 @@ class ObjectMultiCheckbox extends MultiCheckbox
|
||||
{
|
||||
if ($value instanceof Traversable) {
|
||||
$value = ArrayUtils::iteratorToArray($value);
|
||||
} elseif ($value == null) {
|
||||
} elseif ($value === null) {
|
||||
return parent::setValue([]);
|
||||
} elseif (! is_array($value)) {
|
||||
$value = (array)$value;
|
||||
$value = (array) $value;
|
||||
}
|
||||
|
||||
return parent::setValue(array_map([$this->getProxy(), 'getValue'], $value));
|
||||
|
||||
Reference in New Issue
Block a user