mirror of
https://github.com/Karaka-Management/oms-Knowledgebase.git
synced 2026-01-11 09:28:40 +00:00
fix phpstan/phpcs
This commit is contained in:
parent
1c0101da17
commit
8e1ece8d7d
|
|
@ -112,8 +112,8 @@ final class WikiCategoryMapper extends DataMapperAbstract
|
|||
public static function getByParentAndApp($value, int $app = 1, int $depth = 3) : array
|
||||
{
|
||||
$query = self::getQuery();
|
||||
$query->where(static::$table . '_' . $depth . '.' . static::$parent, '=', $value)
|
||||
->andWhere(static::$table . '_' . $depth . '.wiki_category_app', '=', $app);
|
||||
$query->where(static::$table . '_d' . $depth . '.' . static::$parent, '=', $value)
|
||||
->andWhere(static::$table . '_d' . $depth . '.wiki_category_app', '=', $app);
|
||||
|
||||
return self::getAllByQuery($query, RelationType::ALL, $depth);
|
||||
}
|
||||
|
|
@ -131,7 +131,7 @@ final class WikiCategoryMapper extends DataMapperAbstract
|
|||
public static function getByApp(int $app, int $depth = 3) : array
|
||||
{
|
||||
$query = self::getQuery();
|
||||
$query->where(static::$table . '_' . $depth . '.wiki_category_app', '=', $app);
|
||||
$query->where(static::$table . '_d' . $depth . '.wiki_category_app', '=', $app);
|
||||
|
||||
return self::getAllByQuery($query, RelationType::ALL, $depth);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,13 +113,13 @@ final class WikiDocMapper extends DataMapperAbstract
|
|||
{
|
||||
$query ??= self::getQuery(null, [], $relations, $depth);
|
||||
|
||||
$query->where(static::$table . '_' . $depth . '.wiki_article_app', '=', $app)
|
||||
$query->where(static::$table . '_d' . $depth . '.wiki_article_app', '=', $app)
|
||||
->limit($limit);
|
||||
|
||||
if (!empty(static::$createdAt)) {
|
||||
$query->orderBy(static::$table . '_' . $depth . '.' . static::$columns[static::$createdAt]['name'], 'DESC');
|
||||
$query->orderBy(static::$table . '_d' . $depth . '.' . static::$columns[static::$createdAt]['name'], 'DESC');
|
||||
} else {
|
||||
$query->orderBy(static::$table . '_' . $depth . '.' . static::$columns[static::$primaryField]['name'], 'DESC');
|
||||
$query->orderBy(static::$table . '_d' . $depth . '.' . static::$columns[static::$primaryField]['name'], 'DESC');
|
||||
}
|
||||
|
||||
return self::getAllByQuery($query, $relations, $depth);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
],
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": ">=9.4",
|
||||
"friendsofphp/php-cs-fixer": ">=2.18",
|
||||
"friendsofphp/php-cs-fixer": ">=3.0",
|
||||
"squizlabs/php_codesniffer": ">=3.5",
|
||||
"phpmd/phpmd": ">=2.9",
|
||||
"phpstan/phpstan": ">=0.12.58",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user