<commit_before><?php
/**
 * Sandbox
 *
 * @package Sandbox
 */
namespace Sandbox;

use BEAR\Sunday\Application\AppInterface;
use Ray\Di\Injector;
use Ray\Di\Di\Inject;
use Ray\Di\InjectorInterface;
use Ray\Di\Di\Named;
use BEAR\Sunday\Web\ResponseInterface;
use BEAR\Sunday\Application\Logger as ApplicationLogger;
use BEAR\Sunday\Web\RouterInterface;
use BEAR\Sunday\Web\GlobalsInterface;
use BEAR\Package\Debug\ExceptionHandle\ExceptionHandlerInterface;
use BEAR\Resource\ResourceInterface;
use BEAR\Resource\SignalHandler\Provides;
use Guzzle\Cache\CacheAdapterInterface;

require_once dirname(dirname(__DIR__)) . '/vendor/smarty/smarty/distribution/libs/Smarty.class.php';
require_once dirname(dirname(__DIR__)) . '/vendor/twig/twig/lib/Twig/Autoloader.php';
\Twig_Autoloader::register();

/**
 * Application
 *
 * available run mode:
 *
 * 'Prod'
 * 'Api'
 * 'Dev'
 * 'Stab;
 * 'Test'
 *
 * @package Sandbox
 */
final class App implements AppInterface
{
    /** application dir path @var string */
    const DIR = __DIR__;

    /**
     * Dependency injector
     *
     * @var \Ray\Di\InjectorInterface
     */
    public $injector;

    /**
     * Resource client
     *
     * @var \BEAR\Resource\ResourceInterface
     */
    public $resource;

    /**
     * Response
     *
     * @var \BEAR\Sunday\Web\ResponseInterface
     */
    public $response;

    /**
     * Exception handler
     *
     * @var \BEAR\Package\ExceptionHandle\ExceptionHandlerInterface
     */
    public $exceptionHandler;

    /**
     * Router
     *
     * @var \BEAR\Sunday\Web\RouterInterface
     */
    public $router;

    /**
     * Global
     *
     * @var \BEAR\Sunday\Web\GlobalsInterface
     */
    public $globals;

    /**
     * Resource logger
     *
     * @var \BEAR\Resource\LoggerInterface
     */
    public $logger;

    /**
     * Response page object
     *
     * @var \BEAR\Resource\Object
     */
    public $page;

    /**
     * Constructor
     *
     * @param \Ray\Di\InjectorInterface                               $injector         Dependency Injector
     * @param \BEAR\Resource\ResourceInterface                        $resource         Resource client
     * @param \BEAR\Package\ExceptionHandle\ExceptionHandlerInterface $exceptionHandler Exception handler
     * @param \BEAR\Sunday\Application\Logger                         $logger           Application logger
     * @param \BEAR\Sunday\Web\ResponseInterface                      $response         Web / Console response
     * @param \BEAR\Sunday\Web\RouterInterface                        $router           Resource cache adapter
     * @param \BEAR\Sunday\Web\GlobalsInterface                       $globals          GLOBALS value
     *
     * @Inject
     */
    public function __construct(
        InjectorInterface $injector,
        ResourceInterface $resource,
        ExceptionHandlerInterface $exceptionHandler,
        ApplicationLogger $logger,
        ResponseInterface $response,
        RouterInterface $router,
        GlobalsInterface $globals
    ) {
        $this->injector = $injector;
        $this->resource = $resource;
        $this->response = $response;
        $this->exceptionHandler = $exceptionHandler;
        $this->logger = $logger;
        $this->router = $router;
        $this->globals = $globals;
        $resource->attachParamProvider('Provides', new Provides);
    }
}<commit_msg>use Package AbstractApp<commit_after><?php
/**
 * Sandbox
 *
 * @package Sandbox
 */
namespace Sandbox;

use BEAR\Package\Provide\Application\AbstractApp;

require_once dirname(dirname(__DIR__)) . '/vendor/smarty/smarty/distribution/libs/Smarty.class.php';
require_once dirname(dirname(__DIR__)) . '/vendor/twig/twig/lib/Twig/Autoloader.php';
\Twig_Autoloader::register();

/**
 * Application
 *
 * @package Sandbox
 */
final class App extends AbstractApp
{
    /** application dir path @var string */
    const DIR = __DIR__;
}
{'fraction_non_alphanumeric': 0.11628498727735369, 'fraction_numerical': 0.0, 'mean_word_length': 2.382960413080895, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '7108522', 'n_tokens_mistral': 1192, 'n_tokens_neox': 1148, 'n_words': 217}