Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Passed
Pull Request — master (#909)
by Dan
03:58
created

getCommandPrefix()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 1
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 2
rs 10
1
<?php declare(strict_types=1);
2
3
require_once(__DIR__ . '/../../htdocs/config.inc');
4
require_once(LIB . 'Default/smr.inc');
5
require_once(TOOLS . 'discord/GameLink.inc');
6
require_once(TOOLS . 'discord/mysql_cleanup.php');
7
require_once(CONFIG . 'discord/config.specific.php');
8
9
error_reporting(E_ALL);
10
11
function getCommandPrefix() : string {
12
	return defined('COMMAND_PREFIX') ? COMMAND_PREFIX : '.';
0 ignored issues
show
Bug introduced by
The constant COMMAND_PREFIX was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
13
}
14
15
$discord = new Discord\DiscordCommandClient([
0 ignored issues
show
Bug introduced by
The type Discord\DiscordCommandClient was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
16
	'token' => DISCORD_TOKEN,
17
	'prefix' => getCommandPrefix(),
18
	'description' => 'Your automated co-pilot in the Space Merchant Realms universe. Made with DiscordPHP ' . Discord\Discord::VERSION . '.',
0 ignored issues
show
Bug introduced by
The type Discord\Discord was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
19
	'discordOptions' => [
20
		'loggerLevel' => defined('LOGGER_LEVEL') ? LOGGER_LEVEL : 'INFO',
0 ignored issues
show
Bug introduced by
The constant LOGGER_LEVEL was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
21
	],
22
]);
23
24
// Set bot presence to "Listening to <help command>"
25
$discord->on('ready', function($discord) {
26
	$activity = $discord->factory(Discord\Parts\User\Activity::class, [
0 ignored issues
show
Bug introduced by
The type Discord\Parts\User\Activity was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
27
		'name' => getCommandPrefix() . 'help',
28
		'type' => Discord\Parts\User\Activity::TYPE_LISTENING,
29
	]);
30
	$discord->updatePresence($activity);
31
});
32
33
// Register commands
34
require_once('commands/money.php');
35
require_once('commands/game.php');
36
require_once('commands/turns.php');
37
require_once('commands/invite.php');
38
require_once('commands/op.php');
39
require_once('commands/seed.php');
40
require_once('commands/seedlist.php');
41
require_once('commands/forces.php');
42
require_once('commands/8ball.php');
43
44
// Close the connection we may have opened during startup
45
// to avoid a mysql timeout.
46
$db = new SmrMySqlDatabase();
47
$db->close();
48
49
$discord->run();
50