<commit_before><?php
/**
 * Slim Framework (http://slimframework.com)
 *
 * @link      https://github.com/codeguy/Slim
 * @copyright Copyright (c) 2011-2015 <NAME>
 * @license   https://github.com/codeguy/Slim/blob/master/LICENSE (MIT License)
 */
namespace Slim\Handlers;

use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use Slim\Http\Body;

/**
 * Default not allowed handler
 *
 * This is the default Slim application error handler. All it does is output
 * a clean and simple HTML page with diagnostic information.
 */
class NotAllowed
{
    /**
     * Invoke error handler
     *
     * @param  RequestInterface  $request   The most recent Request object
     * @param  ResponseInterface $response  The most recent Resposne object
     * @param  string[]          $methods   Allowed HTTP methods
     *
     * @return ResponseInterface
     */
    public function __invoke(RequestInterface $request, ResponseInterface $response, array $methods)
    {
        return $response
                ->withStatus(405)
                ->withHeader('Content-type', 'text/html')
                ->withBody(new Body(fopen('php://temp', 'r+')))
                ->write('<p>Method not allowed. Must be one of: ' . implode(', ', $methods) . '</p>');<commit_msg>Update NotAllowed.php<commit_after><?php
/**
 * Slim Framework (http://slimframework.com)
 *
 * @link      https://github.com/codeguy/Slim
 * @copyright Copyright (c) 2011-2015 <NAME>
 * @license   https://github.com/codeguy/Slim/blob/master/LICENSE (MIT License)
 */
namespace Slim\Handlers;

use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use Slim\Http\Body;

/**
 * Default not allowed handler
 *
 * This is the default Slim application error handler. All it does is output
 * a clean and simple HTML page with diagnostic information.
 */
class NotAllowed
{
    /**
     * Invoke error handler
     *
     * @param  RequestInterface  $request   The most recent Request object
     * @param  ResponseInterface $response  The most recent Response object
     * @param  string[]          $methods   Allowed HTTP methods
     *
     * @return ResponseInterface
     */
    public function __invoke(RequestInterface $request, ResponseInterface $response, array $methods)
    {
        return $response
                ->withStatus(405)
                ->withHeader('Content-type', 'text/html')
                ->withBody(new Body(fopen('php://temp', 'r+')))
                ->write('<p>Method not allowed. Must be one of: ' . implode(', ', $methods) . '</p>');
{'fraction_non_alphanumeric': 0.12325038880248834, 'fraction_numerical': 0.008553654743390357, 'mean_word_length': 2.778267254038179, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 4, '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': '5872175', 'n_tokens_mistral': 745, 'n_tokens_neox': 719, 'n_words': 208}