fix phpstan/phpcs

This commit is contained in:
Dennis Eichhorn 2021-06-26 14:38:08 +02:00
parent 1c0101da17
commit 8e1ece8d7d
3 changed files with 7 additions and 7 deletions

View File

@ -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);
}

View File

@ -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);

View File

@ -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",