mambax7 /
newbb5
| 1 | <?php namespace XoopsModules\Newbb; |
||
| 2 | |||
| 3 | /** |
||
| 4 | * NewBB 5.0x, the forum module for XOOPS project |
||
| 5 | * |
||
| 6 | * @copyright XOOPS Project (https://xoops.org) |
||
| 7 | * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) |
||
| 8 | * @author Taiwen Jiang (phppp or D.J.) <[email protected]> |
||
| 9 | * @since 4.00 |
||
| 10 | * @package module::newbb |
||
| 11 | */ |
||
| 12 | class KarmaHandler |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @param null $user |
||
| 16 | * @return int |
||
| 17 | */ |
||
| 18 | public function getUserKarma($user = null) |
||
| 19 | { |
||
| 20 | $user = (null === $user) ? $GLOBALS['xoopsUser'] : $user; |
||
| 21 | |||
| 22 | return $this->calculateUserKarma($user); |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Placeholder for calculating user karma |
||
| 27 | * @param \XoopsUser $user |
||
|
0 ignored issues
–
show
|
|||
| 28 | * @return int |
||
| 29 | */ |
||
| 30 | public function calculateUserKarma($user) |
||
| 31 | { |
||
| 32 | if (!is_object($user)) { |
||
| 33 | $user_karma = 0; |
||
| 34 | } else { |
||
| 35 | $user_karma = $user->getVar('posts') * 50; |
||
| 36 | } |
||
| 37 | |||
| 38 | return $user_karma; |
||
| 39 | } |
||
| 40 | |||
| 41 | public function updateUserKarma() |
||
| 42 | { |
||
| 43 | } |
||
| 44 | |||
| 45 | public function writeUserKarma() |
||
| 46 | { |
||
| 47 | } |
||
| 48 | |||
| 49 | public function readUserKarma() |
||
| 50 | { |
||
| 51 | } |
||
| 52 | } |
||
| 53 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths