<?php

declare(strict_types=1);

namespace Rinvex\Support\Traits;

trait Escaper
{
    /**
     * Escape all values of row.
     *
     * @param array $row
     *
     * @return array
     */
    protected function escapeRow(array $row): array
    {
        $arrayDot = array_filter(array_dot($row));

        foreach ($arrayDot as $key => $value) {
            $arrayDot[$key] = e($value);
        }

        foreach ($arrayDot as $key => $value) {
            array_set($row, $key, $value);
        }

        return $row;
    }
}

<?php

declare(strict_types=1);

namespace Rinvex\Support\Traits;

trait Escaper
{
    /**
     * Escape all values.
     *
     * @param array $data
     *
     * @return array
     */
    protected function escape(array $data): array
    {
        $arrayDot = array_filter(array_dot($data));

        foreach ($arrayDot as $key => $value) {
            $arrayDot[$key] = e($value);
        }

        foreach ($arrayDot as $key => $value) {
            array_set($data, $key, $value);
        }

        return $data;
    }
}

Rename "escapeRow" method to just "escape"
Rename "escapeRow" method to just "escape"
