protected function getCasts($stub, array $fields)
    {
        $casts = [];
        $indentCount = $this->getIndent($stub, $this->getTemplateVariable('casts'));
        $indent = $this->Indent($indentCount - $this->backspaceCount);
        foreach ($fields as $field) {
            if ($field->isCastable()) {
                $casts[$field->name] = sprintf("%s'%s' => '%s'", $indent, $field->name, $field->castAs);
            }
        }

        return $this->makeArrayString($casts, $indentCount - $this->backspaceCount - 4);
    }