chamilo/chamilo-lms

View on GitHub
src/CoreBundle/Controller/OnlineController.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$id'.
Open

    public function onlineUsersInCoursesSession(int $id = 0): Response

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

You must use "/**" style comments for a function comment
Open

    public function onlineUsersInCoursesSession(int $id = 0): Response

You must use "/**" style comments for a class comment
Open

class OnlineController extends BaseController

You must use "/**" style comments for a function comment
Open

    public function onlineUsersInCourses(string $cidReq): Response

You must use "/**" style comments for a function comment
Open

    public function index(): Response

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[Route(path: '/in_course/{cidReq}', name: 'online_users_in_course', methods: ['GET', 'POST'], options: ['expose' => true])]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

#[Route('/online')]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[Route(path: '/', name: 'users_online', methods: ['GET'], options: ['expose' => true])]

Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Open

    #[Route(path: '/in_sessions', name: 'online_users_in_session', methods: ['GET', 'POST'], options: ['expose' => true])]

Add a single space around assignment operators
Open

declare(strict_types=1);

There are no issues that match your filters.

Category
Status