<commit_before><?php

/*
 * This file is part of the Slim API skeleton package
 *
 * Copyright (c) 2016-2017 <NAME>
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Project home:
 *   https://github.com/tuupola/slim-api-skeleton
 *
 */

namespace Slim\Handlers;

use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use Crell\ApiProblem\ApiProblem;

final class NotAllowed extends \Slim\Handlers\Error
{
    public function __invoke(Request $request, Response $response, $allowed = null)
    {
        $problem = new ApiProblem(
            "Method not allowed",
            "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
        );<commit_msg>Extend AbstractHandler instead (fixes #22)<commit_after><?php

/*
 * This file is part of the Slim API skeleton package
 *
 * Copyright (c) 2016-2017 <NAME>
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Project home:
 *   https://github.com/tuupola/slim-api-skeleton
 *
 */

namespace Slim\Handlers;

use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use Crell\ApiProblem\ApiProblem;

final class NotAllowed extends AbstractHandler
{
    public function __invoke(Request $request, Response $response, $allowed = null)
    {
        $problem = new ApiProblem(
            "Method not allowed",
            "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
        );
{'fraction_non_alphanumeric': 0.11528497409326424, 'fraction_numerical': 0.025906735751295335, 'mean_word_length': 3.315642458100559, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, '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': '4490838', 'n_tokens_mistral': 516, 'n_tokens_neox': 485, 'n_words': 116}