<commit_before><?php

namespace Bolt;

use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Schema\AbstractSchemaManager;
use Doctrine\DBAL\Schema\Column;
use Doctrine\DBAL\Schema\Comparator;
use Doctrine\DBAL\Schema\Table;
use Silex;
use Bolt;
use util;
use Doctrine\DBAL\Connection as DoctrineConn;
use Symfony\Component\EventDispatcher\Event;

class Storage
{

    private $app;
    private $prefix;
    private $checkedfortimed = array();

    public function __construct(Silex\Application $app)
    {
        $this->app = $app;

        $this->prefix = isset($this->app['config']['general']['database']['prefix']) ? $this->app['config']['general']['database']['prefix'] : "bolt_";

        // Make sure prefix ends in '_'. Prefixes without '_' are lame..
        if ($this->prefix[ strlen($this->prefix)-1 ] != "_") {
            $this->prefix .= "_";
        }

    }

    /**
     * Check if just the users table is present.
     *
     * @return boolean
     */
    public function checkUserTableIntegrity()
    {

        $tables = $this->getTables();

        // Check the users table..
        if (!isset($tables[$this->prefix."users"])) {
            return false;<commit_msg>Added phpdoc + correct application class typehint<commit_after><?php

namespace Bolt;

use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Schema\AbstractSchemaManager;
use Doctrine\DBAL\Schema\Column;
use Doctrine\DBAL\Schema\Comparator;
use Doctrine\DBAL\Schema\Table;
use Silex;
use Bolt;
use util;
use Doctrine\DBAL\Connection as DoctrineConn;
use Symfony\Component\EventDispatcher\Event;

class Storage
{

    /**
     * @var Application
     */
    private $app;
    /**
     * @var string
     */
    private $prefix;
    /**
     * @var array
     */
    private $checkedfortimed = array();

    public function __construct(\Bolt\Application $app)
    {
        $this->app = $app;

        $this->prefix = isset($this->app['config']['general']['database']['prefix']) ? $this->app['config']['general']['database']['prefix'] : "bolt_";

        // Make sure prefix ends in '_'. Prefixes without '_' are lame..
        if ($this->prefix[ strlen($this->prefix)-1 ] != "_") {
            $this->prefix .= "_";
        }

    }

    /**
     * Check if just the users table is present.
     *
     * @return boolean
     */
    public function checkUserTableIntegrity()
    {

        $tables = $this->getTables();

        // Check the users table..
        if (!isset($tables[$this->prefix."users"])) {
            return false;
{'fraction_non_alphanumeric': 0.15375540699960677, 'fraction_numerical': 0.0007864726700747149, 'mean_word_length': 2.724743777452416, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '4976710', 'n_tokens_mistral': 771, 'n_tokens_neox': 752, 'n_words': 170}