chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

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

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 11 parameters. Consider reducing the number of parameters to less than 10.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

The method send_system_announcement_by_email() has an NPath complexity of 3600. The configured NPath complexity threshold is 200.
Open

    public static function send_system_announcement_by_email(SysAnnouncement $announcement, bool $sendEmailTest = false)
    {
        $title = $announcement->getTitle();
        $content = $announcement->getContent();
        $language = $announcement->getLang();

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 update_announcement() has an NPath complexity of 720. The configured NPath complexity threshold is 200.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 update_announcement has 11 parameters. Consider reducing the number of parameters to less than 10.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

Missing class import via use statement (line '417', column '26').
Open

        $dateStart = new DateTime($start, new DateTimeZone('UTC'));

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 '418', column '24').
Open

        $dateEnd = new DateTime($end, new DateTimeZone('UTC'));

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 '202', column '30').
Open

            $promotion = new Promotion();

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 '417', column '47').
Open

        $dateStart = new DateTime($start, new DateTimeZone('UTC'));

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 '418', column '43').
Open

        $dateEnd = new DateTime($end, new DateTimeZone('UTC'));

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 '131', column '31').
Open

                $agenda = new Agenda('admin');

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 update_announcement uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            if (1 == $send_mail) {
                self::send_system_announcement_by_email($announcement);
            }
        }

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 parameter $date_start is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $date_end is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $group_array is not named in camelCase.
Open

    public static function announcement_for_groups($announcement_id, $group_array)
    {
        $tbl_announcement_group = Database::get_main_table(
            TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS
        );

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 $date_end is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $send_mail is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $send_mail is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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_id is not named in camelCase.
Open

    public static function announcement_for_groups($announcement_id, $group_array)
    {
        $tbl_announcement_group = Database::get_main_table(
            TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS
        );

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 $add_to_calendar is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $date_start is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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_id is not named in camelCase.
Open

    public static function get_announcement_groups(int $announcement_id): array
    {
        if (empty($announcement_id)) {
            return [];
        }

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

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

        $date_end,

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

        $a_dateE = explode(' ', $date_end);

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

        $date_start_to_compare = array_merge($a_arraySD, $a_arraySH);

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

        $add_to_calendar = false,

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

        $a_dateS = explode(' ', $date_start);

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

        $a_arraySD = explode('-', $a_dateS[0]);

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

        $a_arrayED = explode('-', $a_dateE[0]);

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

        $date_end_to_compare = array_merge($a_arrayED, $a_arrayEH);

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

        $send_mail = 0,

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

        $a_dateS = explode(' ', $date_start);

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

        $a_arraySH = explode(':', $a_dateS[1]);

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

        if (!checkdate($date_start_to_compare[1], $date_start_to_compare[2], $date_start_to_compare[0])) {

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

        $date_end_to_compare = array_merge($a_arrayED, $a_arrayEH);

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

        if (!checkdate($date_start_to_compare[1], $date_start_to_compare[2], $date_start_to_compare[0])) {

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

        $original_content = $content;

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

        $a_arrayED = explode('-', $a_dateE[0]);

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

        $a_arrayEH = explode(':', $a_dateE[1]);

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

        $a_arrayEH = explode(':', $a_dateE[1]);

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

        $date_start_to_compare = array_merge($a_arraySD, $a_arraySH);

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

        $a_arraySH = explode(':', $a_dateS[1]);

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

        $a_dateE = explode(' ', $date_end);

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

        $date_end_to_compare = array_merge($a_arrayED, $a_arrayEH);

Missing class doc comment
Open

class SystemAnnouncementManager

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

    public static function add_announcement(

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

        $date_start_to_compare = array_merge($a_arraySD, $a_arraySH);

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

        $date_start,

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

        $a_arraySD = explode('-', $a_dateS[0]);

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

        if (!checkdate($date_start_to_compare[1], $date_start_to_compare[2], $date_start_to_compare[0])) {

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

        return $message_sent; //true if at least one e-mail was sent

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

        $a_dateE = explode(' ', $date_end);

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

        $date_end_to_compare = array_merge($a_arrayED, $a_arrayEH);

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

            !checkdate($date_end_to_compare[1], $date_end_to_compare[2], $date_end_to_compare[0])

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

            !checkdate($date_end_to_compare[1], $date_end_to_compare[2], $date_end_to_compare[0])

Method name "SystemAnnouncementManager::announcement_for_groups" is not in camel caps format
Open

    public static function announcement_for_groups($announcement_id, $group_array)

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

    public static function announcement_for_groups($announcement_id, $group_array)

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

        foreach ($group_array as $group_id) {

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

        $a_dateE = explode(' ', $date_end);

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

        $date_end_to_compare = array_merge($a_arrayED, $a_arrayEH);

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

        $start = api_get_utc_datetime($date_start);

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

                $date_end_to_compare[0]) &&

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

                    $date_end,

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

                        announcement_id=".intval($announcement_id).",

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

    public static function get_announcement_groups(int $announcement_id): array

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

        $date_start,

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

        $a_arraySH = explode(':', $a_dateS[1]);

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

        $date_start_to_compare = array_merge($a_arraySD, $a_arraySH);

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

        $tbl_announcement_group = Database::get_main_table(TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS);

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

        $end = api_get_utc_datetime($date_end);

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

                $date_end_to_compare[2] ||

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

        $a_arrayEH = explode(':', $a_dateE[1]);

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

            if (0 != intval($group_id)) {

Method name "SystemAnnouncementManager::get_announcement_groups" is not in camel caps format
Open

    public static function get_announcement_groups(int $announcement_id): array

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

        $a_dateS = explode(' ', $date_start);

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

        $date_end_to_compare = array_merge($a_arrayED, $a_arrayEH);

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

                $date_end_to_compare[2] ||

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

        $tbl_announcement_group = Database::get_main_table(

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

            "DELETE FROM $tbl_announcement_group

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

        $a_arraySD = explode('-', $a_dateS[0]);

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

            !checkdate($date_end_to_compare[1], $date_end_to_compare[2], $date_end_to_compare[0])

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

            !checkdate($date_end_to_compare[1], $date_end_to_compare[2], $date_end_to_compare[0])

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

                FROM $tbl_group g , $tbl_announcement_group ag

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

                FROM $tbl_group g , $tbl_announcement_group ag

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

        $send_mail = 0,

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

            !checkdate($date_end_to_compare[1], $date_end_to_compare[2], $date_end_to_compare[0])

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

        if (($date_end_to_compare[1] ||

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

        $end = api_get_utc_datetime($date_end, null, true);

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

        $message_sent = false;

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

            $message_sent = true;

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

                        group_id=".intval($group_id);

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

        $date_start_to_compare = array_merge($a_arraySD, $a_arraySH);

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

             WHERE announcement_id=".intval($announcement_id)

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

                $sql = "INSERT INTO $tbl_announcement_group SET

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

        if (empty($announcement_id)) {

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

        $tbl_group = Database::get_main_table(TABLE_USERGROUP);

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

            if (1 == (int) $send_mail) {

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

        $a_arraySH = explode(':', $a_dateS[1]);

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

        if (($date_end_to_compare[1] ||

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

                    $date_start,

Method name "SystemAnnouncementManager::send_system_announcement_by_email" is not in camel caps format
Open

    public static function send_system_announcement_by_email(SysAnnouncement $announcement, bool $sendEmailTest = false)

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

        $a_arrayED = explode('-', $a_dateE[0]);

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

        foreach ($group_array as $group_id) {

Method name "SystemAnnouncementManager::update_announcement" is not in camel caps format
Open

    public static function update_announcement(

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

        $date_end,

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

        $a_arrayED = explode('-', $a_dateE[0]);

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

        $a_arrayEH = explode(':', $a_dateE[1]);

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

            if ($add_to_calendar) {

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

                    announcement_id = $announcement_id AND

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

        if (!checkdate($date_start_to_compare[1], $date_start_to_compare[2], $date_start_to_compare[0])) {

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

        $start = api_get_utc_datetime($date_start, null, true);

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

        $a_arraySD = explode('-', $a_dateS[0]);

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

            if (1 == $send_mail) {

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

                    $original_content

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

    public static function announcement_for_groups($announcement_id, $group_array)

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

        $a_dateS = explode(' ', $date_start);

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

        $date_start_to_compare = array_merge($a_arraySD, $a_arraySH);

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

        if (!checkdate($date_start_to_compare[1], $date_start_to_compare[2], $date_start_to_compare[0])) {

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

        if (!checkdate($date_start_to_compare[1], $date_start_to_compare[2], $date_start_to_compare[0])) {

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

                $date_end_to_compare[0]) &&

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

            !checkdate($date_end_to_compare[1], $date_end_to_compare[2], $date_end_to_compare[0])

The variable $a_arrayEH is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $date_start is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $message_sent is not named in camelCase.
Open

    public static function send_system_announcement_by_email(SysAnnouncement $announcement, bool $sendEmailTest = false)
    {
        $title = $announcement->getTitle();
        $content = $announcement->getContent();
        $language = $announcement->getLang();

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 $tbl_group is not named in camelCase.
Open

    public static function get_announcement_groups(int $announcement_id): array
    {
        if (empty($announcement_id)) {
            return [];
        }

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 $a_dateE is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $date_end_to_compare is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $date_start_to_compare is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $date_end is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $a_arraySD is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $a_dateE is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $add_to_calendar is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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_array is not named in camelCase.
Open

    public static function announcement_for_groups($announcement_id, $group_array)
    {
        $tbl_announcement_group = Database::get_main_table(
            TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS
        );

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 $date_start_to_compare is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $date_end_to_compare is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $a_dateS is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $a_dateS is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $a_arraySH is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $a_arrayED is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $tbl_announcement_group is not named in camelCase.
Open

    public static function announcement_for_groups($announcement_id, $group_array)
    {
        $tbl_announcement_group = Database::get_main_table(
            TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS
        );

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_id is not named in camelCase.
Open

    public static function announcement_for_groups($announcement_id, $group_array)
    {
        $tbl_announcement_group = Database::get_main_table(
            TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS
        );

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 $tbl_group is not named in camelCase.
Open

    public static function get_announcement_groups(int $announcement_id): array
    {
        if (empty($announcement_id)) {
            return [];
        }

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 $a_dateS is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $a_arraySH is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $date_end is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $a_dateE is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $date_end_to_compare is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $date_end_to_compare is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $date_end_to_compare is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $a_arrayED is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $a_arraySH is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $date_end_to_compare is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $a_dateE is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $original_content is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $a_dateS is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $a_arrayED is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $date_start_to_compare is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $date_end_to_compare is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $date_start is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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_mail is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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_id is not named in camelCase.
Open

    public static function announcement_for_groups($announcement_id, $group_array)
    {
        $tbl_announcement_group = Database::get_main_table(
            TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS
        );

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 $tbl_announcement_group is not named in camelCase.
Open

    public static function announcement_for_groups($announcement_id, $group_array)
    {
        $tbl_announcement_group = Database::get_main_table(
            TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS
        );

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 $date_end_to_compare is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $date_end is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $original_content is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $date_start is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $a_arraySD is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $date_start_to_compare is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $date_end_to_compare is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $date_end is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $date_start_to_compare is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $date_end_to_compare is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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_mail is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $tbl_announcement_group is not named in camelCase.
Open

    public static function get_announcement_groups(int $announcement_id): array
    {
        if (empty($announcement_id)) {
            return [];
        }

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 $a_arraySD is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $a_arrayED is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $date_end_to_compare is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 announcement_for_groups($announcement_id, $group_array)
    {
        $tbl_announcement_group = Database::get_main_table(
            TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS
        );

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_id is not named in camelCase.
Open

    public static function get_announcement_groups(int $announcement_id): array
    {
        if (empty($announcement_id)) {
            return [];
        }

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 $date_start_to_compare is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $a_arrayEH is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $date_start_to_compare is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $date_start_to_compare is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $message_sent is not named in camelCase.
Open

    public static function send_system_announcement_by_email(SysAnnouncement $announcement, bool $sendEmailTest = false)
    {
        $title = $announcement->getTitle();
        $content = $announcement->getContent();
        $language = $announcement->getLang();

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 announcement_for_groups($announcement_id, $group_array)
    {
        $tbl_announcement_group = Database::get_main_table(
            TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS
        );

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 $a_dateS is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $a_arraySD is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $message_sent is not named in camelCase.
Open

    public static function send_system_announcement_by_email(SysAnnouncement $announcement, bool $sendEmailTest = false)
    {
        $title = $announcement->getTitle();
        $content = $announcement->getContent();
        $language = $announcement->getLang();

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 $tbl_announcement_group is not named in camelCase.
Open

    public static function announcement_for_groups($announcement_id, $group_array)
    {
        $tbl_announcement_group = Database::get_main_table(
            TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS
        );

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 $a_dateS is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $a_arrayEH is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $a_arrayEH is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $a_dateE is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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_id is not named in camelCase.
Open

    public static function get_announcement_groups(int $announcement_id): array
    {
        if (empty($announcement_id)) {
            return [];
        }

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 $a_dateE is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $date_end_to_compare is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $date_start is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $a_arraySH is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $date_end_to_compare is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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 $date_end_to_compare is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $date_start is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 $date_end is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 announcement_for_groups($announcement_id, $group_array)
    {
        $tbl_announcement_group = Database::get_main_table(
            TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS
        );

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 $tbl_announcement_group is not named in camelCase.
Open

    public static function get_announcement_groups(int $announcement_id): array
    {
        if (empty($announcement_id)) {
            return [];
        }

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 add_announcement is not named in camelCase.
Open

    public static function add_announcement(
        $title,
        $content,
        $date_start,
        $date_end,

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 send_system_announcement_by_email is not named in camelCase.
Open

    public static function send_system_announcement_by_email(SysAnnouncement $announcement, bool $sendEmailTest = false)
    {
        $title = $announcement->getTitle();
        $content = $announcement->getContent();
        $language = $announcement->getLang();

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 update_announcement is not named in camelCase.
Open

    public static function update_announcement(
        $id,
        $title,
        $content,
        $date_start,

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_announcement_groups is not named in camelCase.
Open

    public static function get_announcement_groups(int $announcement_id): array
    {
        if (empty($announcement_id)) {
            return [];
        }

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 announcement_for_groups is not named in camelCase.
Open

    public static function announcement_for_groups($announcement_id, $group_array)
    {
        $tbl_announcement_group = Database::get_main_table(
            TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS
        );

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