<commit_before><?php

namespace Stage01;

use Common\Request;
use Common\Response;
use Common\BlogRepository;
use Common\TemplateSystem;

class BlogController {
    /**
     * @var Request
     */
    private $request;

    /**
     * @var Response
     */
    private $response;

    /**
     * @var BlogRepository
     */
    private $model;

    /**
     * @var TemplateSystem
     */
    private $view;

    public function __construct(
        Request $request,
        Response $response,
        BlogRepository $model,
        TemplateSystem $View
    ) { /* ... */ }

    public function indexAction() { /* ... */ }

    public function createAction() {
        if ($this->request->isPost()) {
            $data = $this->request->getParameters(Request::SOURCE_POST);
            $post = $this->model->createPost($data);

            if ($post->isValid()) {
                $post->save();
                $this->response->redirect('/blog/edit/' . $post->getId());
            } else {
                $this->response->setContent(
                    $this->view->render('create.tpl', array('post' => $post))
                );
            }
        } else {
            $this->response->setContent(
                $this->view->render('create.tpl', array('blog' => $this->model->getDefault()))
            );
        }
    }

    public function editAction() { /* ... */ }

    public function deleteAction() { /* ... */ }
} <commit_msg>Fixed typo in BlogController<commit_after><?php

namespace Stage01;

use Common\Request;
use Common\Response;
use Common\BlogRepository;
use Common\TemplateSystem;

class BlogController {
    /**
     * @var Request
     */
    private $request;

    /**
     * @var Response
     */
    private $response;

    /**
     * @var BlogRepository
     */
    private $model;

    /**
     * @var TemplateSystem
     */
    private $view;

    public function __construct(
        Request $request,
        Response $response,
        BlogRepository $model,
        TemplateSystem $view
    ) { /* ... */ }

    public function indexAction() { /* ... */ }

    public function createAction() {
        if ($this->request->isPost()) {
            $data = $this->request->getParameters(Request::SOURCE_POST);
            $post = $this->model->createPost($data);

            if ($post->isValid()) {
                $post->save();
                $this->response->redirect('/blog/edit/' . $post->getId());
            } else {
                $this->response->setContent(
                    $this->view->render('create.tpl', array('post' => $post))
                );
            }
        } else {
            $this->response->setContent(
                $this->view->render('create.tpl', array('blog' => $this->model->getDefault()))
            );
        }
    }

    public function editAction() { /* ... */ }

    public function deleteAction() { /* ... */ }
} 
{'fraction_non_alphanumeric': 0.16327936617292457, 'fraction_numerical': 0.0013778849466069584, 'mean_word_length': 1.6988847583643123, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 49, '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': '7359960', 'n_tokens_mistral': 801, 'n_tokens_neox': 778, 'n_words': 149}