chamilo/chamilo-lms

View on GitHub
src/CourseBundle/Entity/CDropboxCategory.php

Summary

Maintainability
A
0 mins
Test Coverage

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

#[ORM\Entity]

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

#[ORM\Index(name: 'session_id', columns: ['session_id'])]

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

    #[ORM\Id]

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

    #[ORM\GeneratedValue]

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

    #[ORM\Column(name: 'c_id', type: 'integer')]

Add a single space around assignment operators
Open

declare(strict_types=1);

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

    #[ORM\Column(name: 'cat_id', type: 'integer')]

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

#[ORM\Table(name: 'c_dropbox_category')]

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

class CDropboxCategory

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

    #[ORM\Column(name: 'iid', type: 'integer')]

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

    #[Assert\NotBlank]

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

    #[ORM\Column(name: 'user_id', type: 'integer', nullable: false)]

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

    #[ORM\Column(name: 'session_id', type: 'integer', nullable: false)]

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

    #[ORM\Column(name: 'title', type: 'text', nullable: false)]

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

    #[ORM\Column(name: 'sent', type: 'boolean', nullable: false)]

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

    #[ORM\Column(name: 'received', type: 'boolean', nullable: false)]

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

#[ORM\Index(name: 'course', columns: ['c_id'])]

The 'getReceived()' method which returns a boolean should be named 'is...()' or 'has...()'
Open

    public function getReceived()
    {
        return $this->received;
    }

BooleanGetMethodName

Since: 0.2

Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.

Example

class Foo {
    /**
     * @return boolean
     */
    public function getFoo() {} // bad
    /**
     * @return bool
     */
    public function isFoo(); // ok
    /**
     * @return boolean
     */
    public function getFoo($bar); // ok, unless checkParameterizedMethods=true
}

Source https://phpmd.org/rules/naming.html#booleangetmethodname

The 'getSent()' method which returns a boolean should be named 'is...()' or 'has...()'
Open

    public function getSent()
    {
        return $this->sent;
    }

BooleanGetMethodName

Since: 0.2

Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.

Example

class Foo {
    /**
     * @return boolean
     */
    public function getFoo() {} // bad
    /**
     * @return bool
     */
    public function isFoo(); // ok
    /**
     * @return boolean
     */
    public function getFoo($bar); // ok, unless checkParameterizedMethods=true
}

Source https://phpmd.org/rules/naming.html#booleangetmethodname

There are no issues that match your filters.

Category
Status