Showing 9 of 19 total issues
Function exports
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-bower-install-simple");
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
DefaultTeamspeakHelper
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class DefaultTeamspeakHelper implements TeamspeakHelper {
private $server;
private $entityManager;
private $groupID;
Function link
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function($scope, $element, attr) {
//setup errors
$scope.errors = [];
$scope.addError = function(msg) {
$scope.errors.push({msg: msg, type: 'alert round'});
Method execute
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$output->writeln("<info>Starting server on port {$this->server->getPort()}... You can stop the server with Ctrl+C.</info>");
$this->logger->info('Starting auth server on port '.$this->server->getPort());
Function link
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function($scope, $element, attr) { //called after DOM ready
//setup errors
$scope.errors = [];
$scope.addError = function(msg) {
Method verifyClient
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function verifyClient(TeamspeakAccount $tsAccount, MinecraftAccount $mcAccount) {
//unauthenticate any accounts with the same MC name but not the same UUID
$mcqb = $this->entityManager->createQueryBuilder();
$mcqb->select('mcAccount')
->from('PublicUHCTeamspeakAuthBundle:MinecraftAccount', 'mcAccount')
Function verifyCodes
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.verifyCodes = function() {
if($scope.teamspeakCode == null || $scope.teamspeakCode.length == 0) {
$scope.addError('Must supply the provided Teamspeak code');
return;
}
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct(AuthServer $server,
EntityManager $em,
LoopInterface $loop,
$keepAlive,
$description,
Function filterOnlineOnly
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
private function filterOnlineOnly($accountArray)
{
/** @var TeamspeakHelper $teamspeak_helper */
$teamspeak_helper = $this->get('teamspeak_helper');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"