<commit_before><?php

namespace Backpack\CRUD\PanelTraits;

trait Reorder
{
    /*
    |--------------------------------------------------------------------------
    |                                   REORDER
    |--------------------------------------------------------------------------
    */

    /**
     * Change the order and parents of the given elements, according to the NestedSortable AJAX call.
     *
     * @param array $request The entire request from the NestedSortable AJAX Call.
     *
     * @return int The number of items whose position in the tree has been changed.
     */
    public function updateTreeOrder($request)
    {
        $count = 0;
        $primaryKey = $this->model->getKeyName();
        
        \DB::beginTransaction();
        foreach ($request as $key => $entry) {
            if ($entry['item_id'] != '' && $entry['item_id'] != null) {
                $item = $this->model->where($primaryKey, $entry['item_id'])->update([<commit_msg>Apply fixes from StyleCI (#1986)<commit_after><?php

namespace Backpack\CRUD\PanelTraits;

trait Reorder
{
    /*
    |--------------------------------------------------------------------------
    |                                   REORDER
    |--------------------------------------------------------------------------
    */

    /**
     * Change the order and parents of the given elements, according to the NestedSortable AJAX call.
     *
     * @param array $request The entire request from the NestedSortable AJAX Call.
     *
     * @return int The number of items whose position in the tree has been changed.
     */
    public function updateTreeOrder($request)
    {
        $count = 0;
        $primaryKey = $this->model->getKeyName();

        \DB::beginTransaction();
        foreach ($request as $key => $entry) {
            if ($entry['item_id'] != '' && $entry['item_id'] != null) {
                $item = $this->model->where($primaryKey, $entry['item_id'])->update([
{'fraction_non_alphanumeric': 0.2587697000508388, 'fraction_numerical': 0.003050330452465684, 'mean_word_length': 1.3512544802867383, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4863763', 'n_tokens_mistral': 488, 'n_tokens_neox': 470, 'n_words': 135}