for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Webfactor\Laravel\Backpack\FluentSyntax\Fields;
use Webfactor\Laravel\Backpack\FluentSyntax\Contracts\CrudFieldAbstract;
use Webfactor\Laravel\Backpack\FluentSyntax\Traits\Defaultable;
use Webfactor\Laravel\Backpack\FluentSyntax\Traits\Prefixable;
use Webfactor\Laravel\Backpack\FluentSyntax\Traits\Suffixable;
class RadioField extends CrudFieldAbstract
{
use Hintable, Defaultable;
protected $type = 'radio';
/**
* Set options for the fields
* @param array $options array of option
* @return mixed
RadioField
This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.
array
*/
public function options(array $options)
$this->options['options'] = $options;
return $this;
}
* Add option to a field that is already set
* @param string $value text that is shown to the user
* @param null|string $key the value of the new text
public function addOption($value, $key = null)
if(is_null($key)) {
$this->options['options'][] = $value;
} else {
$this->options['options'][$key] = $value;
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.