mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
code fixes
This commit is contained in:
parent
d1edf04232
commit
6805b24820
|
|
@ -84,7 +84,6 @@ abstract class NgramParser
|
|||
* @return array
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @phpstan-ignore
|
||||
*/
|
||||
protected function getNgrams(string $str) : array
|
||||
{
|
||||
|
|
@ -102,6 +101,7 @@ abstract class NgramParser
|
|||
}
|
||||
}
|
||||
|
||||
/** @phpstan-ignore-next-line */
|
||||
foreach ($tokens as $i => $token) {
|
||||
$sum = \array_sum($token);
|
||||
|
||||
|
|
@ -110,12 +110,14 @@ abstract class NgramParser
|
|||
}
|
||||
}
|
||||
|
||||
/** @phpstan-ignore-next-line */
|
||||
if (empty($tokens)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$tokens = \array_merge(...$tokens);
|
||||
|
||||
/** @phpstan-ignore-next-line */
|
||||
if (isset($tokens['_'])) {
|
||||
unset($tokens['_']);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -423,6 +423,13 @@ $GLOBALS['dbpool']->create('update', $CONFIG['db']['core']['masters']['update'])
|
|||
$GLOBALS['dbpool']->create('delete', $CONFIG['db']['core']['masters']['delete']);
|
||||
$GLOBALS['dbpool']->create('schema', $CONFIG['db']['core']['masters']['schema']);
|
||||
|
||||
$GLOBALS['dbpool']->get('admin')->connect();
|
||||
$GLOBALS['dbpool']->get('select')->connect();
|
||||
$GLOBALS['dbpool']->get('insert')->connect();
|
||||
$GLOBALS['dbpool']->get('update')->connect();
|
||||
$GLOBALS['dbpool']->get('delete')->connect();
|
||||
$GLOBALS['dbpool']->get('schema')->connect();
|
||||
|
||||
DataMapperFactory::db($GLOBALS['dbpool']->get());
|
||||
|
||||
$GLOBALS['frameworkpath'] = '/';
|
||||
|
|
|
|||
|
|
@ -42,8 +42,6 @@ final class DataMapperAbstractTest extends \PHPUnit\Framework\TestCase
|
|||
{
|
||||
$this->model = new BaseModel();
|
||||
|
||||
var_dump($GLOBALS['dbpool']->get());
|
||||
|
||||
$GLOBALS['dbpool']->get()->con->prepare(
|
||||
'CREATE TABLE `test_base` (
|
||||
`test_base_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user