<commit_before><?php

namespace Neemzy\Patchwork\Model;

trait SortableModel
{
    /**
     * Moves this model up or down in position
     *
     * @param bool $up Move way
     *
     * @return void
     */
    public function move($up)
    {
        $table = $this->getTableName();

        if ($up && ($this->position > 1)) {
            $this->position--;
            $this->app['redbean']->exec('UPDATE '.$table.' SET position = position + 1 WHERE position = ?', [$this->position]);
        } else if ((! $up) && ($this->position < $this->app['redbean']->count($table))) {
            $this->position++;
            $this->app['redbean']->exec('UPDATE '.$table.' SET position = position - 1 WHERE position = ?', [$this->position]);
        }
    }
<commit_msg>fixed syntax<commit_after><?php

namespace Neemzy\Patchwork\Model;

trait SortableModel
{
    /**
     * Moves this model up or down in position
     *
     * @param bool $up Move way
     *
     * @return void
     */
    public function move($up)
    {
        $table = $this->getTableName();

        if ($up && ($this->position > 1)) {
            $this->position--;
            $this->app['redbean']->exec('UPDATE '.$table.' SET position = position + 1 WHERE position = ?', [$this->position]);
        } else if (!$up && ($this->position < $this->app['redbean']->count($table))) {
            $this->position++;
            $this->app['redbean']->exec('UPDATE '.$table.' SET position = position - 1 WHERE position = ?', [$this->position]);
        }
    }

{'fraction_non_alphanumeric': 0.19003931847968544, 'fraction_numerical': 0.003931847968545216, 'mean_word_length': 2.2420382165605095, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 31, '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': '2983975', 'n_tokens_mistral': 461, 'n_tokens_neox': 453, 'n_words': 109}