chamilo/chamilo-lms

View on GitHub
public/main/inc/lib/AnnouncementManager.php

Summary

Maintainability
A
0 mins
Test Coverage

The method add_announcement has 10 parameters. Consider reducing the number of parameters to less than 10.
Open

    public static function add_announcement(
        $courseInfo,
        $sessionId,
        $title,
        $content,

The method edit_announcement() has an NPath complexity of 224. The configured NPath complexity threshold is 200.
Open

    public static function edit_announcement(
        $id,
        $title,
        $newContent,
        $to,

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

The method displayAnnouncement() has an NPath complexity of 384. The configured NPath complexity threshold is 200.
Open

    public static function displayAnnouncement($id)
    {
        $id = (int) $id;

        if (empty($id)) {

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

The method add_announcement() has an NPath complexity of 576. The configured NPath complexity threshold is 200.
Open

    public static function add_announcement(
        $courseInfo,
        $sessionId,
        $title,
        $content,

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

The method addGroupAnnouncement() has an NPath complexity of 255. The configured NPath complexity threshold is 200.
Open

    public static function addGroupAnnouncement(
        $title,
        $newContent,
        $groupId,
        $to_users,

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

The method parseContent() has an NPath complexity of 456. The configured NPath complexity threshold is 200.
Open

    public static function parseContent(
        $userId,
        $content,
        $courseCode,
        $sessionId = 0

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

The method sent_to_form() has an NPath complexity of 840. The configured NPath complexity threshold is 200.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

The method getAnnouncements() has an NPath complexity of 141168. The configured NPath complexity threshold is 200.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

Avoid using undefined variables such as '$groupList' which will lead to PHP notices.
Open

            $groupList[] = $groupId;

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

The class AnnouncementManager has a coupling between objects value of 20. Consider to reduce the number of dependencies under 13.
Open

class AnnouncementManager
{
    /**
     * Constructor.
     */

CouplingBetweenObjects

Since: 1.1.0

A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

Example

class Foo {
    /**
     * @var \foo\bar\X
     */
    private $x = null;

    /**
     * @var \foo\bar\Y
     */
    private $y = null;

    /**
     * @var \foo\bar\Z
     */
    private $z = null;

    public function setFoo(\Foo $foo) {}
    public function setBar(\Bar $bar) {}
    public function setBaz(\Baz $baz) {}

    /**
     * @return \SplObjectStorage
     * @throws \OutOfRangeException
     * @throws \InvalidArgumentException
     * @throws \ErrorException
     */
    public function process(\Iterator $it) {}

    // ...
}

Source https://phpmd.org/rules/design.html#couplingbetweenobjects

Missing class import via use statement (line '670', column '30').
Open

            ->setEndDate(new DateTime($end_date))

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '752', column '30').
Open

            ->setEndDate(new DateTime($now))

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '125', column '31').
Open

            $extraField = new ExtraField('user');

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '50', column '27').
Open

        $extraField = new ExtraField('user');

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '1331', column '22').
Open

        $email = new AnnouncementEmail($courseInfo, $sessionId, $announcement, $logger);

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

The method displayAnnouncement uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            if (false === $isVisible) {
                api_not_allowed(true);
            }
        }

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method getAnnouncementInfoById uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $dql = "SELECT a, ip
                        FROM ChamiloCourseBundle:CAnnouncement a
                        JOIN ChamiloCourseBundle:CItemProperty ip
                        WITH a.id = ip.ref AND a.cId = ip.course

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method add_announcement uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $send_to = AbstractResource::separateUsersGroups($sentTo);
            // Storing the selected groups
            if (is_array($send_to['groups']) && !empty($send_to['groups'])) {
                foreach ($send_to['groups'] as $group) {

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method getAnnouncementInfoById uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $groupList[] = $groupId;

            if (0 != api_get_user_id()) {
                $extraGroupCondition = '';

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method getAnnouncements uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    if (isset($separated['groups']) && count($separated['groups']) > 1) {
                        $groupReference = '';
                    }
                }

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method edit_announcement uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $announcement->setParent($course);
            $announcement->addCourseLink($course, $session);
        }

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method getAnnouncements uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                    } else {
                        $modify_icons = "<a
                            href=\"".$actionUrl."&action=modify&id=".$announcementId."\">".$editIcon."</a>";
                    }

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method sent_to_form uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            // there is only one user/group
            if (isset($sent_to_array['users']) && !empty($sent_to_array['users'])) {
                $user_info = api_get_user_info($sent_to_array['users'][0]);
                $output[] = api_get_person_name($user_info['firstname'], $user_info['lastname']);

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method getAnnouncements uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                    } else {
                        $move2 = "<a href=\"".$actionUrl."&action=move&down=".$announcementId."&sec_token=".$stok."\">".$iconDown."</a>";;
                    }

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method getAnnouncements uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $modify_icons = Display::url(
                        Display::getMdiIcon(ObjectIcon::DEFAULT, 'ch-tool-icon', null, ICON_SIZE_SMALL),
                        $actionUrl.'&action=view&id='.$announcementId
                    );

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method getAnnouncements uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $user = api_get_user_entity();
            if (null === $user) {
                return [];
            }

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method getAnnouncements uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                    } else {
                        $move1 = "<a href=\"".$actionUrl."&action=move&up=".$announcementId."&sec_token=".$stok."\">".$iconUp."</a>";
                    }

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method getNumberAnnouncements uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $user = api_get_user_entity($userId);

            if (null === $user) {
                return 0;

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method add_announcement_attachment_file uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $repo = Container::getAnnouncementAttachmentRepository();
                $attachment = (new CAnnouncementAttachment())
                    ->setFilename($file_name)
                    ->setPath(uniqid('announce_', true))

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method getAnnouncements uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                        } else {
                            $modify_icons .= "<a
                                href=\"".$actionUrl."&action=delete&id=".$announcementId."&sec_token=".$stok."\" onclick=\"javascript:if(!confirm('".addslashes(
                                    api_htmlentities(
                                        get_lang('Please confirm your choice'),

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

Avoid unused local variables such as '$repo'.
Open

        $repo = Container::getAnnouncementRepository();

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

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

Avoid unused parameters such as '$courseInfo'.
Open

    public static function delete_announcement($courseInfo, $id)

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

Avoid unused parameters such as '$includeGroupWhenLoadingUser'.
Open

    public static function loadEditUsers($announcement, $includeGroupWhenLoadingUser = false)

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

Avoid unused local variables such as '$groupList'.
Open

            $groupList[] = $groupId;

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

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

Avoid unused parameters such as '$key'.
Open

                ->forAll(function (int $key, User $user) use (&$generalCoachName, &$generalCoachEmail) {

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

Avoid unused local variables such as '$courseInfo'.
Open

        $courseInfo = api_get_course_info();

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

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

Avoid unused parameters such as '$courseInfo'.
Open

    public static function change_visibility_announcement($courseInfo, $id, $status)

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

Avoid unused parameters such as '$file'.
Open

        $file,

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

Avoid unused parameters such as '$authorId'.
Open

        $authorId = 0

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

Avoid unused parameters such as '$file_comment'.
Open

        $file_comment

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

Avoid unused local variables such as '$bottomAnnouncement'.
Open

        $bottomAnnouncement = $announcement_number;

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

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

Avoid unused parameters such as '$id_attach'.
Open

        $id_attach,

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

Avoid unused local variables such as '$repo'.
Open

        $repo = Container::getAnnouncementAttachmentRepository();

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

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

The parameter $course_info is not named in camelCase.
Open

    public static function get_all_annoucement_by_course($course_info, $session_id = 0)
    {
        $session_id = (int) $session_id;
        $courseId = $course_info['real_id'];

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $end_date is not named in camelCase.
Open

    public static function add_announcement(
        $courseInfo,
        $sessionId,
        $title,
        $content,

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $insert_id is not named in camelCase.
Open

    public static function update_mail_sent($insert_id)
    {
        $table = Database::get_course_table(TABLE_ANNOUNCEMENT);
        $insert_id = intval($insert_id);
        // store the modifications in the table tbl_annoucement

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $file_comment is not named in camelCase.
Open

    public static function edit_announcement(
        $id,
        $title,
        $newContent,
        $to,

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $user_id is not named in camelCase.
Open

    public static function getAnnouncementCourseTotalByUser($user_id)
    {
        $user_id = (int) $user_id;

        if (empty($user_id)) {

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $file_comment is not named in camelCase.
Open

    public static function add_announcement(
        $courseInfo,
        $sessionId,
        $title,
        $content,

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $to_users is not named in camelCase.
Open

    public static function addGroupAnnouncement(
        $title,
        $newContent,
        $groupId,
        $to_users,

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $file_comment is not named in camelCase.
Open

    public static function addGroupAnnouncement(
        $title,
        $newContent,
        $groupId,
        $to_users,

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $session_id is not named in camelCase.
Open

    public static function get_all_annoucement_by_course($course_info, $session_id = 0)
    {
        $session_id = (int) $session_id;
        $courseId = $course_info['real_id'];

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $file_comment is not named in camelCase.
Open

    public static function add_announcement_attachment_file(CAnnouncement $announcement, $file_comment, $file)
    {
        $return = 0;
        $courseId = api_get_course_int_id();
        $em = Database::getManager();

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $file_comment is not named in camelCase.
Open

    public static function edit_announcement_attachment_file(
        $id_attach,
        $file,
        $file_comment
    ) {

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $announcement_number is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $id_attach is not named in camelCase.
Open

    public static function edit_announcement_attachment_file(
        $id_attach,
        $file,
        $file_comment
    ) {

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

Method name "AnnouncementManager::delete_all_announcements" is not in camel caps format
Open

    public static function delete_all_announcements($courseInfo)

Variable "total_numbers" is not in valid camel caps format
Open

        if ($total_numbers > 1) {

Variable "sent_to_array" is not in valid camel caps format
Open

            if (empty($sent_to_array['groups']) && empty($sent_to_array['users'])) {

Variable "file_comment" is not in valid camel caps format
Open

        $file_comment = null,

Variable "end_date" is not in valid camel caps format
Open

            ->setEndDate(new DateTime($end_date))

Variable "send_to" is not in valid camel caps format
Open

                foreach ($send_to['users'] as $user) {

Variable "send_to" is not in valid camel caps format
Open

            $send_to = AbstractResource::separateUsersGroups($to);

Method name "AnnouncementManager::sent_to_form" is not in camel caps format
Open

    public static function sent_to_form($sent_to_array)

Variable "sent_to_array" is not in valid camel caps format
Open

            if (is_array($sent_to_array['groups'])) {

Variable "user_info" is not in valid camel caps format
Open

                        $usersToArray[] = $user_info['complete_name_with_username'];

Variable "sent_to_array" is not in valid camel caps format
Open

            if (isset($sent_to_array['users']) && !empty($sent_to_array['users'])) {

Variable "sent_to_array" is not in valid camel caps format
Open

            if (isset($sent_to_array['users']) && !empty($sent_to_array['users'])) {

Variable "sent_to_array" is not in valid camel caps format
Open

                is_array($sent_to_array['groups']) &&

Variable "sent_to_array" is not in valid camel caps format
Open

                isset($sent_to_array['groups'][0]) &&

Variable "image_visibility" is not in valid camel caps format
Open

                Display::getMdiIcon($image_visibility, 'ch-tool-icon', null, ICON_SIZE_SMALL, $alt_visibility)."</a>";

Variable "modify_icons" is not in valid camel caps format
Open

                $modify_icons .= "<a

Variable "end_date" is not in valid camel caps format
Open

        if (empty($end_date)) {

Variable "send_to" is not in valid camel caps format
Open

            if (is_array($send_to['groups']) && !empty($send_to['groups'])) {

Variable "insert_id" is not in valid camel caps format
Open

        $insert_id = intval($insert_id);

Variable "user_id" is not in valid camel caps format
Open

        if (empty($user_id)) {

Variable "number_groups" is not in valid camel caps format
Open

        $total_numbers = $number_users + $number_groups;

Variable "group_id" is not in valid camel caps format
Open

                    $users = GroupManager::getStudents($group_id, true);

Variable "sent_to_array" is not in valid camel caps format
Open

                if (is_array($sent_to_array['users'])) {

Variable "sent_to_array" is not in valid camel caps format
Open

                $user_info = api_get_user_info($sent_to_array['users'][0]);

Variable "sent_to_array" is not in valid camel caps format
Open

            if (isset($sent_to_array['groups']) &&

Variable "sent_to_array" is not in valid camel caps format
Open

            if (empty($sent_to_array['groups']) && empty($sent_to_array['users'])) {

Variable "modify_icons" is not in valid camel caps format
Open

            $modify_icons = "<a href=\"".$url."&action=modify&id=".$id."\">".

Variable "alt_visibility" is not in valid camel caps format
Open

                Display::getMdiIcon($image_visibility, 'ch-tool-icon', null, ICON_SIZE_SMALL, $alt_visibility)."</a>";

Variable "end_date" is not in valid camel caps format
Open

            $end_date = api_get_utc_datetime();

Variable "send_to" is not in valid camel caps format
Open

            if (is_array($send_to['groups']) && !empty($send_to['groups'])) {

Variable "file_comment" is not in valid camel caps format
Open

        $file_comment = '',

Variable "send_to" is not in valid camel caps format
Open

                foreach ($send_to['groups'] as $groupId) {

Variable "number_users" is not in valid camel caps format
Open

        $total_numbers = $number_users + $number_groups;

Variable "group_id" is not in valid camel caps format
Open

                foreach ($sent_to_array['groups'] as $group_id) {

Variable "group_id" is not in valid camel caps format
Open

                        Display::label($groupList[$group_id]->getTitle(), 'info').

Variable "user_info" is not in valid camel caps format
Open

                        $user_info = api_get_user_info($user_id);

Variable "group_id" is not in valid camel caps format
Open

                $group_id = $sent_to_array['groups'][0];

Variable "modify_icons" is not in valid camel caps format
Open

            $modify_icons .= "<a

Variable "send_to" is not in valid camel caps format
Open

                foreach ($send_to['users'] as $user) {

Variable "insert_id" is not in valid camel caps format
Open

    public static function update_mail_sent($insert_id)

Variable "sent_to_array" is not in valid camel caps format
Open

        if (isset($sent_to_array['users'])) {

Variable "sent_to_array" is not in valid camel caps format
Open

            $number_users = count($sent_to_array['users']);

Variable "user_info" is not in valid camel caps format
Open

                $output[] = api_get_person_name($user_info['firstname'], $user_info['lastname']);

Variable "session_id" is not in valid camel caps format
Open

    public static function get_all_annoucement_by_course($course_info, $session_id = 0)

Variable "course_info" is not in valid camel caps format
Open

        $courseId = $course_info['real_id'];

Variable "insert_id" is not in valid camel caps format
Open

        $insert_id = intval($insert_id);

Variable "number_groups" is not in valid camel caps format
Open

        $number_groups = 0;

Variable "image_visibility" is not in valid camel caps format
Open

                $image_visibility = StateIcon::ACTIVE;

Variable "send_to" is not in valid camel caps format
Open

            $send_to = AbstractResource::separateUsersGroups($sentTo);

Variable "number_users" is not in valid camel caps format
Open

            $number_users = count($sent_to_array['users']);

Variable "sent_to_array" is not in valid camel caps format
Open

            $number_groups = count($sent_to_array['groups']);

Variable "user_info" is not in valid camel caps format
Open

                $output[] = api_get_person_name($user_info['firstname'], $user_info['lastname']);

Method name "AnnouncementManager::get_all_annoucement_by_course" is not in camel caps format
Open

    public static function get_all_annoucement_by_course($course_info, $session_id = 0)

Method name "AnnouncementManager::delete_announcement" is not in camel caps format
Open

    public static function delete_announcement($courseInfo, $id)

Variable "end_date" is not in valid camel caps format
Open

        $end_date = null,

Variable "user_id" is not in valid camel caps format
Open

        $user = api_get_user_entity($user_id);

Variable "sent_to_array" is not in valid camel caps format
Open

                0 !== $sent_to_array['groups'][0]

Variable "file_comment" is not in valid camel caps format
Open

                $file_comment,

Variable "number_groups" is not in valid camel caps format
Open

            $number_groups = count($sent_to_array['groups']);

Variable "sent_to_array" is not in valid camel caps format
Open

                    foreach ($sent_to_array['users'] as $user_id) {

Variable "group_id" is not in valid camel caps format
Open

                $users = GroupManager::getStudents($group_id, true);

Variable "to_users" is not in valid camel caps format
Open

        $sendToUsers = AbstractResource::separateUsersGroups($to_users);

Variable "file_comment" is not in valid camel caps format
Open

                    $file_comment,

Method name "AnnouncementManager::edit_announcement" is not in camel caps format
Open

    public static function edit_announcement(

Variable "sent_to_array" is not in valid camel caps format
Open

                foreach ($sent_to_array['groups'] as $group_id) {

Variable "session_id" is not in valid camel caps format
Open

        $session_id = (int) $session_id;

Variable "insert_id" is not in valid camel caps format
Open

                WHERE iid = $insert_id";

Variable "user_id" is not in valid camel caps format
Open

    public static function getAnnouncementCourseTotalByUser($user_id)

Variable "user_id" is not in valid camel caps format
Open

                    foreach ($sent_to_array['users'] as $user_id) {

Variable "image_visibility" is not in valid camel caps format
Open

            $image_visibility = StateIcon::INACTIVE;

Variable "alt_visibility" is not in valid camel caps format
Open

            $alt_visibility = get_lang('Visible');

Method name "AnnouncementManager::update_mail_sent" is not in camel caps format
Open

    public static function update_mail_sent($insert_id)

Variable "sent_to_array" is not in valid camel caps format
Open

    public static function sent_to_form($sent_to_array)

Variable "total_numbers" is not in valid camel caps format
Open

        $total_numbers = $number_users + $number_groups;

Method name "AnnouncementManager::get_attachment" is not in camel caps format
Open

    public static function get_attachment($announcementId)

Variable "file_comment" is not in valid camel caps format
Open

        $file_comment = '',

Variable "number_users" is not in valid camel caps format
Open

        $number_users = 0;

Variable "user_id" is not in valid camel caps format
Open

                        $user_info = api_get_user_info($user_id);

Method name "AnnouncementManager::change_visibility_announcement" is not in camel caps format
Open

    public static function change_visibility_announcement($courseInfo, $id, $status)

Variable "modify_icons" is not in valid camel caps format
Open

            $html .= "<tr><th style='text-align:right'>$modify_icons</th></tr>";

Method name "AnnouncementManager::add_announcement" is not in camel caps format
Open

    public static function add_announcement(

Variable "send_to" is not in valid camel caps format
Open

            if (is_array($send_to['users'])) {

Variable "user_id" is not in valid camel caps format
Open

        $user_id = (int) $user_id;

Variable "sent_to_array" is not in valid camel caps format
Open

            if (isset($sent_to_array['users'])) {

Variable "user_info" is not in valid camel caps format
Open

                $user_info = api_get_user_info($sent_to_array['users'][0]);

Variable "session_id" is not in valid camel caps format
Open

        $session_id = (int) $session_id;

Variable "send_to" is not in valid camel caps format
Open

                foreach ($send_to['groups'] as $group) {

Variable "send_to" is not in valid camel caps format
Open

            if (is_array($send_to['users'])) {

Variable "sent_to_array" is not in valid camel caps format
Open

                $group_id = $sent_to_array['groups'][0];

Variable "course_info" is not in valid camel caps format
Open

    public static function get_all_annoucement_by_course($course_info, $session_id = 0)

Variable "alt_visibility" is not in valid camel caps format
Open

                $alt_visibility = get_lang('Hide');

Variable "to_users" is not in valid camel caps format
Open

        $to_users,

Variable "file_comment" is not in valid camel caps format
Open

                $file_comment,

Variable "send_to" is not in valid camel caps format
Open

            if (is_array($send_to['groups'])) {

Variable "user_id" is not in valid camel caps format
Open

        $user_id = (int) $user_id;

Variable "sent_to_array" is not in valid camel caps format
Open

        if (isset($sent_to_array['groups'])) {

Variable "group_id" is not in valid camel caps format
Open

                    Display::label($groupList[$group_id]->getTitle(), 'info').

Variable "id_attach" is not in valid camel caps format
Open

        $id_attach,

Missing parameter name
Open

     * @param $announcement_number

Variable "modify_icons" is not in valid camel caps format
Open

                    $modify_icons .= $move1;

Method name "AnnouncementManager::add_announcement_attachment_file" is not in camel caps format
Open

    public static function add_announcement_attachment_file(CAnnouncement $announcement, $file_comment, $file)

Expected 17 spaces after parameter type; 1 found
Open

     * @param int $courseId

Variable "modify_icons" is not in valid camel caps format
Open

                    $modify_icons .= "<a

Variable "file_name" is not in valid camel caps format
Open

            $file_name = $file['name'];

Expected 27 spaces after parameter type; 1 found
Open

     * @param CAnnouncement $announcement

Missing parameter name
Open

     * @param string file comment

Doc comment for parameter $_FILES does not match actual variable name $file_comment
Open

     * @param array  uploaded file $_FILES

Variable "file_comment" is not in valid camel caps format
Open

    public static function add_announcement_attachment_file(CAnnouncement $announcement, $file_comment, $file)

Variable "attachment_list" is not in valid camel caps format
Open

                $attachment_list = self::get_attachment($announcementId);

Variable "username_span" is not in valid camel caps format
Open

                $username_span = Display::tag(

Expected 36 spaces after parameter type; 10 found
Open

     * @param bool          $sendToDrhUsers

Variable "modify_icons" is not in valid camel caps format
Open

                            $modify_icons .= $deleteIconDisable;

Variable "username_span" is not in valid camel caps format
Open

                    'username' => $username_span,

Missing parameter name
Open

     * @param int attach id

Expected 36 spaces after parameter type; 10 found
Open

     * @param bool          $sendToUsersInSession

Expected 36 spaces after parameter type; 1 found
Open

     * @param bool $directMessage

Variable "announcement_number" is not in valid camel caps format
Open

        $bottomAnnouncement = $announcement_number;

Variable "sent_to_icon" is not in valid camel caps format
Open

                $title = $announcement->getTitle().$groupReference.$sent_to_icon;

Variable "modify_icons" is not in valid camel caps format
Open

                        $modify_icons = "<a

Expected 0 spaces before closing bracket; 1 found
Open

                    if ($iterator == 0 ) {

Multi-line function call not indented correctly; expected 32 spaces but found 36
Open

                                    api_htmlentities(

Doc comment for parameter $_FILES does not match actual variable name $file
Open

     * @param array uploaded file $_FILES

Expected 37 spaces after parameter type; 11 found
Open

     * @param int           $sessionId

Variable "attachment_icon" is not in valid camel caps format
Open

                $attachment_icon = '';

Each PHP statement must be on a line by itself
Open

                        $move2 = "<a href=\"".$actionUrl."&action=move&down=".$announcementId."&sec_token=".$stok."\">".$iconDown."</a>";;

Variable "modify_icons" is not in valid camel caps format
Open

                    $modify_icons .= $move2;

Variable "modify_icons" is not in valid camel caps format
Open

                    $modify_icons = Display::url(

Variable "sent_to_icon" is not in valid camel caps format
Open

                $sent_to_icon = '';

Variable "attachment_icon" is not in valid camel caps format
Open

                    $attachment_icon = ' '.$attachmentIcon;

Method name "AnnouncementManager::delete_announcement_attachment_file" is not in camel caps format
Open

    public static function delete_announcement_attachment_file($id)

Variable "attachment_icon" is not in valid camel caps format
Open

                    $title.$attachment_icon,

Variable "new_file_name" is not in valid camel caps format
Open

            if (!filter_extension($new_file_name)) {

Expected 37 spaces after parameter type; 2 found
Open

     * @param int  $senderId

Expected 17 spaces after parameter type; 1 found
Open

     * @param int $sessionId

Variable "sent_to_icon" is not in valid camel caps format
Open

                    $sent_to_icon = ' '.$emailIcon;

Variable "modify_icons" is not in valid camel caps format
Open

                        $modify_icons = $editIconDisable;

Missing parameter name
Open

     * @param Monolog\Handler\HandlerInterface logger

Variable "modify_icons" is not in valid camel caps format
Open

                            $modify_icons .= "<a

Variable "file_comment" is not in valid camel caps format
Open

        $file_comment

Variable "attachment_list" is not in valid camel caps format
Open

                if (count($attachment_list) > 0) {

Multi-line function call not indented correctly; expected 28 spaces but found 32
Open

                                )."')) return false;\">".

Variable "new_file_name" is not in valid camel caps format
Open

            $new_file_name = add_ext_on_mime(stripslashes($file['name']), $file['type']);

Variable "file_comment" is not in valid camel caps format
Open

                    ->setComment($file_comment)

Variable "file_name" is not in valid camel caps format
Open

                    ->setFilename($file_name)

Method name "AnnouncementManager::edit_announcement_attachment_file" is not in camel caps format
Open

    public static function edit_announcement_attachment_file(

Expected 35 spaces after parameter type; 9 found
Open

     * @param array         $courseInfo

Missing parameter name
Open

     * @param $stok

Missing parameter name
Open

     * @param string file comment

Variable "announcement_number" is not in valid camel caps format
Open

        $announcement_number,

Variable "modify_icons" is not in valid camel caps format
Open

                    'actions' => $modify_icons,

Multi-line function call not indented correctly; expected 28 spaces but found 32
Open

                                )."')) return false;\">".

Multi-line function call not indented correctly; expected 32 spaces but found 36
Open

                                    api_htmlentities(

The variable $course_info is not named in camelCase.
Open

    public static function get_all_annoucement_by_course($course_info, $session_id = 0)
    {
        $session_id = (int) $session_id;
        $courseId = $course_info['real_id'];

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $alt_visibility is not named in camelCase.
Open

    public static function displayAnnouncement($id)
    {
        $id = (int) $id;

        if (empty($id)) {

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $send_to is not named in camelCase.
Open

    public static function add_announcement(
        $courseInfo,
        $sessionId,
        $title,
        $content,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $modify_icons is not named in camelCase.
Open

    public static function displayAnnouncement($id)
    {
        $id = (int) $id;

        if (empty($id)) {

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $end_date is not named in camelCase.
Open

    public static function add_announcement(
        $courseInfo,
        $sessionId,
        $title,
        $content,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $send_to is not named in camelCase.
Open

    public static function add_announcement(
        $courseInfo,
        $sessionId,
        $title,
        $content,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $file_comment is not named in camelCase.
Open

    public static function add_announcement(
        $courseInfo,
        $sessionId,
        $title,
        $content,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $send_to is not named in camelCase.
Open

    public static function edit_announcement(
        $id,
        $title,
        $newContent,
        $to,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $insert_id is not named in camelCase.
Open

    public static function update_mail_sent($insert_id)
    {
        $table = Database::get_course_table(TABLE_ANNOUNCEMENT);
        $insert_id = intval($insert_id);
        // store the modifications in the table tbl_annoucement

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $file_comment is not named in camelCase.
Open

    public static function addGroupAnnouncement(
        $title,
        $newContent,
        $groupId,
        $to_users,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

    public static function getAnnouncementCourseTotalByUser($user_id)
    {
        $user_id = (int) $user_id;

        if (empty($user_id)) {

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

    public static function getAnnouncementCourseTotalByUser($user_id)
    {
        $user_id = (int) $user_id;

        if (empty($user_id)) {

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $modify_icons is not named in camelCase.
Open

    public static function displayAnnouncement($id)
    {
        $id = (int) $id;

        if (empty($id)) {

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $session_id is not named in camelCase.
Open

    public static function get_all_annoucement_by_course($course_info, $session_id = 0)
    {
        $session_id = (int) $session_id;
        $courseId = $course_info['real_id'];

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $image_visibility is not named in camelCase.
Open

    public static function displayAnnouncement($id)
    {
        $id = (int) $id;

        if (empty($id)) {

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $end_date is not named in camelCase.
Open

    public static function add_announcement(
        $courseInfo,
        $sessionId,
        $title,
        $content,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $insert_id is not named in camelCase.
Open

    public static function update_mail_sent($insert_id)
    {
        $table = Database::get_course_table(TABLE_ANNOUNCEMENT);
        $insert_id = intval($insert_id);
        // store the modifications in the table tbl_annoucement

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $insert_id is not named in camelCase.
Open

    public static function update_mail_sent($insert_id)
    {
        $table = Database::get_course_table(TABLE_ANNOUNCEMENT);
        $insert_id = intval($insert_id);
        // store the modifications in the table tbl_annoucement

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $end_date is not named in camelCase.
Open

    public static function add_announcement(
        $courseInfo,
        $sessionId,
        $title,
        $content,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $send_to is not named in camelCase.
Open

    public static function add_announcement(
        $courseInfo,
        $sessionId,
        $title,
        $content,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $send_to is not named in camelCase.
Open

    public static function add_announcement(
        $courseInfo,
        $sessionId,
        $title,
        $content,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $file_comment is not named in camelCase.
Open

    public static function edit_announcement(
        $id,
        $title,
        $newContent,
        $to,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $send_to is not named in camelCase.
Open

    public static function edit_announcement(
        $id,
        $title,
        $newContent,
        $to,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $image_visibility is not named in camelCase.
Open

    public static function displayAnnouncement($id)
    {
        $id = (int) $id;

        if (empty($id)) {

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $send_to is not named in camelCase.
Open

    public static function add_announcement(
        $courseInfo,
        $sessionId,
        $title,
        $content,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

    public static function getAnnouncementCourseTotalByUser($user_id)
    {
        $user_id = (int) $user_id;

        if (empty($user_id)) {

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $alt_visibility is not named in camelCase.
Open

    public static function displayAnnouncement($id)
    {
        $id = (int) $id;

        if (empty($id)) {

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $image_visibility is not named in camelCase.
Open

    public static function displayAnnouncement($id)
    {
        $id = (int) $id;

        if (empty($id)) {

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $session_id is not named in camelCase.
Open

    public static function get_all_annoucement_by_course($course_info, $session_id = 0)
    {
        $session_id = (int) $session_id;
        $courseId = $course_info['real_id'];

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $send_to is not named in camelCase.
Open

    public static function add_announcement(
        $courseInfo,
        $sessionId,
        $title,
        $content,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $modify_icons is not named in camelCase.
Open

    public static function displayAnnouncement($id)
    {
        $id = (int) $id;

        if (empty($id)) {

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $alt_visibility is not named in camelCase.
Open

    public static function displayAnnouncement($id)
    {
        $id = (int) $id;

        if (empty($id)) {

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $send_to is not named in camelCase.
Open

    public static function edit_announcement(
        $id,
        $title,
        $newContent,
        $to,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

    public static function getAnnouncementCourseTotalByUser($user_id)
    {
        $user_id = (int) $user_id;

        if (empty($user_id)) {

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_icon is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $modify_icons is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $modify_icons is not named in camelCase.
Open

    public static function displayAnnouncement($id)
    {
        $id = (int) $id;

        if (empty($id)) {

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $to_users is not named in camelCase.
Open

    public static function addGroupAnnouncement(
        $title,
        $newContent,
        $groupId,
        $to_users,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $send_to is not named in camelCase.
Open

    public static function edit_announcement(
        $id,
        $title,
        $newContent,
        $to,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $send_to is not named in camelCase.
Open

    public static function edit_announcement(
        $id,
        $title,
        $newContent,
        $to,

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $announcement_number is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $attachment_icon is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $username_span is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_info is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $attachment_icon is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $modify_icons is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $total_numbers is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $new_file_name is not named in camelCase.
Open

    public static function add_announcement_attachment_file(CAnnouncement $announcement, $file_comment, $file)
    {
        $return = 0;
        $courseId = api_get_course_int_id();
        $em = Database::getManager();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $attachment_list is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $group_id is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $group_id is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $number_users is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $number_groups is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_info is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $number_users is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_info is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $number_groups is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $total_numbers is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_info is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $file_name is not named in camelCase.
Open

    public static function add_announcement_attachment_file(CAnnouncement $announcement, $file_comment, $file)
    {
        $return = 0;
        $courseId = api_get_course_int_id();
        $em = Database::getManager();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_icon is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $modify_icons is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $modify_icons is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $group_id is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $file_comment is not named in camelCase.
Open

    public static function add_announcement_attachment_file(CAnnouncement $announcement, $file_comment, $file)
    {
        $return = 0;
        $courseId = api_get_course_int_id();
        $em = Database::getManager();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $username_span is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $group_id is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $modify_icons is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $modify_icons is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $number_groups is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $modify_icons is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $group_id is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $new_file_name is not named in camelCase.
Open

    public static function add_announcement_attachment_file(CAnnouncement $announcement, $file_comment, $file)
    {
        $return = 0;
        $courseId = api_get_course_int_id();
        $em = Database::getManager();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_icon is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $modify_icons is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $group_id is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $modify_icons is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $number_users is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_info is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $sent_to_array is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $file_name is not named in camelCase.
Open

    public static function add_announcement_attachment_file(CAnnouncement $announcement, $file_comment, $file)
    {
        $return = 0;
        $courseId = api_get_course_int_id();
        $em = Database::getManager();

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $attachment_icon is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $attachment_list is not named in camelCase.
Open

    public static function getAnnouncements(
        $stok,
        $announcement_number,
        ?int $courseId = null,
        ?int $sessionId = null

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The method update_mail_sent is not named in camelCase.
Open

    public static function update_mail_sent($insert_id)
    {
        $table = Database::get_course_table(TABLE_ANNOUNCEMENT);
        $insert_id = intval($insert_id);
        // store the modifications in the table tbl_annoucement

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method change_visibility_announcement is not named in camelCase.
Open

    public static function change_visibility_announcement($courseInfo, $id, $status)
    {
        $repo = Container::getAnnouncementRepository();
        $announcement = $repo->find($id);
        if ($announcement) {

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method add_announcement is not named in camelCase.
Open

    public static function add_announcement(
        $courseInfo,
        $sessionId,
        $title,
        $content,

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method edit_announcement is not named in camelCase.
Open

    public static function edit_announcement(
        $id,
        $title,
        $newContent,
        $to,

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method delete_announcement is not named in camelCase.
Open

    public static function delete_announcement($courseInfo, $id)
    {
        $repo = Container::getAnnouncementRepository();
        $announcement = $repo->find($id);
        if ($announcement) {

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method delete_all_announcements is not named in camelCase.
Open

    public static function delete_all_announcements($courseInfo)
    {
        $repo = Container::getAnnouncementRepository();
        $announcements = self::get_all_annoucement_by_course(
            $courseInfo,

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method get_all_annoucement_by_course is not named in camelCase.
Open

    public static function get_all_annoucement_by_course($course_info, $session_id = 0)
    {
        $session_id = (int) $session_id;
        $courseId = $course_info['real_id'];

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method add_announcement_attachment_file is not named in camelCase.
Open

    public static function add_announcement_attachment_file(CAnnouncement $announcement, $file_comment, $file)
    {
        $return = 0;
        $courseId = api_get_course_int_id();
        $em = Database::getManager();

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method get_attachment is not named in camelCase.
Open

    public static function get_attachment($announcementId)
    {
        $table = Database::get_course_table(TABLE_ANNOUNCEMENT_ATTACHMENT);
        $announcementId = (int) $announcementId;
        $row = [];

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method sent_to_form is not named in camelCase.
Open

    public static function sent_to_form($sent_to_array)
    {
        // we find all the names of the groups
        $groupList = CourseManager::getCourseGroups();

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method edit_announcement_attachment_file is not named in camelCase.
Open

    public static function edit_announcement_attachment_file(
        $id_attach,
        $file,
        $file_comment
    ) {

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method delete_announcement_attachment_file is not named in camelCase.
Open

    public static function delete_announcement_attachment_file($id)
    {
        $id = (int) $id;
        $repo = Container::getAnnouncementAttachmentRepository();
        $em = Database::getManager();

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

There are no issues that match your filters.

Category
Status