<commit_before><?php namespace CoandaCMS\CoandaWebForms\Repositories\Eloquent\Models;

use Eloquent, Coanda;

class WebForm extends Eloquent {

    /**
     * @var array
     */
    protected $fillable = ['name'];

    /**
     * @var string
     */
    protected $table = 'coanda_webforms';

    /**
     *
     */
    public static function boot()
    {
        parent::boot();

        static::deleting( function($form)
        {
            $form->fields()->delete();

            SubmissionField::join('webformsubmissions', 'webformsubmissions.id', '=', 'webformsubmissionfields.submission_id')->where('webformsubmissions.form_id', '=', $form->id)->delete();
            $form->submissions()->delete();<commit_msg>Fixed incorrect table names when deleting a form.<commit_after><?php namespace CoandaCMS\CoandaWebForms\Repositories\Eloquent\Models;

use Eloquent, Coanda;

class WebForm extends Eloquent {

    /**
     * @var array
     */
    protected $fillable = ['name'];

    /**
     * @var string
     */
    protected $table = 'coanda_webforms';

    /**
     *
     */
    public static function boot()
    {
        parent::boot();

        static::deleting( function($form)
        {
            $form->fields()->delete();

            SubmissionField::join('coanda_webformsubmissions', 'coanda_webformsubmissions.id', '=', 'coanda_webformsubmissionfields.submission_id')->where('coanda_webformsubmissions.form_id', '=', $form->id)->delete();
            $form->submissions()->delete();
{'fraction_non_alphanumeric': 0.1577896138482024, 'fraction_numerical': 0.0, 'mean_word_length': 2.8050632911392404, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3110474', 'n_tokens_mistral': 471, 'n_tokens_neox': 447, 'n_words': 72}