<commit_before><?php
/**
 *Base class to persist data
 *
 *@author  <NAME> <<EMAIL>>
 *@license MIT License
 *@link    http://eletronjun.com.br/controller/updateCategory.php
 */
require_once __DIR__ . "/../class/autoload.php";

use \model\Category as Category;
use \dao\CategoryDAO as CategoryDAO;
use \exception\CategoryException as CategoryException;
use \exception\DatabaseException as DatabaseException;
use \utilities\Session as Session;

$session = new Session();
$session->verifyIfSessionIsStarted();

try {
    $category = new Category($_GET['name'], $_GET['id']);

    $category_dao = new CategoryDAO($category);

    $category_dao->update($_GET['new_name']);
    
    echo "Atualizado com sucesso!";
} catch (Exception $msg) {
    echo $msg;
}<commit_msg>Change the update method for receive the layout attribute<commit_after><?php
/**
 *Base class to persist data
 *
 *@author  <NAME> <<EMAIL>>
 *@license MIT License
 *@link    http://eletronjun.com.br/controller/updateCategory.php
 */
require_once __DIR__ . "/../class/autoload.php";

use \model\Category as Category;
use \dao\CategoryDAO as CategoryDAO;
use \exception\CategoryException as CategoryException;
use \exception\DatabaseException as DatabaseException;
use \utilities\Session as Session;

$session = new Session();
$session->verifyIfSessionIsStarted();

try {
    $category = new Category($_GET['name'], $_GET['id']);

    $category_dao = new CategoryDAO($category);

    $category_dao->update($_GET['new_name'], $_GET['new_layout']);

    echo "Atualizado com sucesso!";
} catch (Exception $msg) {
    echo $msg;
}
{'fraction_non_alphanumeric': 0.14707730986800754, 'fraction_numerical': 0.0, 'mean_word_length': 4.685714285714286, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '5696804', 'n_tokens_mistral': 495, 'n_tokens_neox': 494, 'n_words': 127}