for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Helmut\Forms\Fields\Dropdown;
use Helmut\Forms\Field;
use Helmut\Forms\Utility\Validate;
class Dropdown extends Field {
public $options = [];
public $value = '';
public function setOptions($options)
{
$this->options = $options;
return $this;
}
public function getValue()
return $this->value;
public function getButtonName()
//
public function renderWith()
$properties = [
'value' => $this->value,
'options' => [],
];
foreach ($this->options as $value => $label) {
$properties['options'][] = [
'value' => $value,
'label' => $label,
'selected' => $this->value == $value
return $properties;
public function setValueFromDefault()
$this->value = $this->default;
$this->default
array
string
$value
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..
public function setValueFromModel($model)
if (property_exists($model, $this->name)) $this->value = $model->{$this->name};
public function setValueFromRequest($request)
$this->value = $request->get($this->name);
public function fillModelWithValue($model)
if (property_exists($model, $this->name)) $model->{$this->name} = $this->value;
public function validateRequired()
return Validate::required($this->value);
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..