protected function getBooleanSnippet(array $fields, $requestVariable = '$this')
    {
        $code = '';

        foreach ($fields as $field) {
            if ($field->isBoolean() && $field->isCheckbox()) {
                $code .= sprintf("        \$data['%s'] = %s->has('%s');", $field->name, $requestVariable, $field->name) . PHP_EOL;
            }
        }

        return $code;
    }
protected function getBooleanSnippet(array $fields, $requestVariable = '$this')
    {
        $code = '';

        foreach ($fields as $field) {
            if ($field->isBoolean() && $field->isCheckbox()) {
                $code .= sprintf("        \$data['%s'] = %s->has('%s');", $field->name, $requestVariable, $field->name) . PHP_EOL;
            }
        }

        return $code;
    }
protected function getBooleanSnippet ( array $ fields , $ requestVariable = '$this' ) { $ code = '' ; foreach ( $ fields as $ field ) { if ( $ field -> isBoolean ( ) && $ field -> isCheckbox ( ) ) { $ code .= sprintf ( "        \$data['%s'] = %s->has('%s');" , $ field -> name , $ requestVariable , $ field -> name ) . PHP_EOL ; } } return $ code ; }
Gets the code that is needed to check for bool property.

@param array $fields

@return string
Gets the code that is needed to check for bool property .