yiisoft/yii2

View on GitHub

Showing 2,467 of 2,467 total issues

The class BaseStringHelper has 19 public methods. Consider refactoring BaseStringHelper to keep number of public methods under 10.
Open

class BaseStringHelper
{
    /**
     * Returns the number of bytes in the given string.
     * This method ensures the string is treated as a byte array by using `mb_strlen()`.

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

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

The class Command has 55 non-getter- and setter-methods. Consider refactoring Command to keep number of methods under 25.
Open

class Command extends Component
{
    /**
     * @var Connection the DB connection that this command is associated with
     */
Severity: Minor
Found in framework/db/Command.php by phpmd

TooManyMethods

Since: 0.1

A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

The default was changed from 10 to 25 in PHPMD 2.3.

Example

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

The class ActiveRecord has 16 public methods. Consider refactoring ActiveRecord to keep number of public methods under 10.
Open

class ActiveRecord extends BaseActiveRecord
{
    /**
     * The insert operation. This is mainly used when overriding [[transactions()]] to specify which operations are transactional.
     */
Severity: Minor
Found in framework/db/ActiveRecord.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

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

The class Connection has an overall complexity of 126 which is very high. The configured complexity threshold is 50.
Open

class Connection extends Component
{
    /**
     * @event \yii\base\Event an event that is triggered after a DB connection is established
     */
Severity: Minor
Found in framework/db/Connection.php by phpmd

The class BaseMigrateController has 11 public methods. Consider refactoring BaseMigrateController to keep number of public methods under 10.
Open

abstract class BaseMigrateController extends Controller
{
    /**
     * The name of the dummy migration that marks the beginning of the whole migration history.
     */

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

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

The class Cache has 16 public methods. Consider refactoring Cache to keep number of public methods under 10.
Open

abstract class Cache extends Component implements CacheInterface
{
    /**
     * @var string a string prefixed to every cache key so that it is unique globally in the whole cache storage.
     * It is recommended that you set a unique cache key prefix for each application if the same cache
Severity: Minor
Found in framework/caching/Cache.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

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

The class BaseConsole has 50 non-getter- and setter-methods. Consider refactoring BaseConsole to keep number of methods under 25.
Open

class BaseConsole
{
    // foreground color control codes
    const FG_BLACK = 30;
    const FG_RED = 31;
Severity: Minor
Found in framework/helpers/BaseConsole.php by phpmd

TooManyMethods

Since: 0.1

A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

The default was changed from 10 to 25 in PHPMD 2.3.

Example

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

The class ActiveQuery has an overall complexity of 119 which is very high. The configured complexity threshold is 50.
Open

class ActiveQuery extends Query implements ActiveQueryInterface
{
    use ActiveQueryTrait;
    use ActiveRelationTrait;

Severity: Minor
Found in framework/db/ActiveQuery.php by phpmd

The class ColumnSchemaBuilder has 13 public methods. Consider refactoring ColumnSchemaBuilder to keep number of public methods under 10.
Open

class ColumnSchemaBuilder extends BaseObject
{
    // Internally used constants representing categories that abstract column types fall under.
    // See [[$categoryMap]] for mappings of abstract column types to category.
    // @since 2.0.8
Severity: Minor
Found in framework/db/ColumnSchemaBuilder.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

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

The class PhpManager has 16 public methods. Consider refactoring PhpManager to keep number of public methods under 10.
Open

class PhpManager extends BaseManager
{
    /**
     * @var string the path of the PHP script that contains the authorization items.
     * This can be either a file path or a [path alias](guide:concept-aliases) to the file.
Severity: Minor
Found in framework/rbac/PhpManager.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

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

The class Connection has 14 public methods. Consider refactoring Connection to keep number of public methods under 10.
Open

class Connection extends Component
{
    /**
     * @event \yii\base\Event an event that is triggered after a DB connection is established
     */
Severity: Minor
Found in framework/db/Connection.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

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

The class BaseArrayHelper has 12 public methods. Consider refactoring BaseArrayHelper to keep number of public methods under 10.
Open

class BaseArrayHelper
{
    /**
     * Converts an object or an array of objects into an array.
     * @param object|array|string $object the object to be converted into an array
Severity: Minor
Found in framework/helpers/BaseArrayHelper.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

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

The class BaseConsole has an overall complexity of 158 which is very high. The configured complexity threshold is 50.
Open

class BaseConsole
{
    // foreground color control codes
    const FG_BLACK = 30;
    const FG_RED = 31;
Severity: Minor
Found in framework/helpers/BaseConsole.php by phpmd

The class MigrateController has an overall complexity of 68 which is very high. The configured complexity threshold is 50.
Open

class MigrateController extends BaseMigrateController
{
    /**
     * Maximum length of a migration name.
     * @since 2.0.13

The class Command has an overall complexity of 131 which is very high. The configured complexity threshold is 50.
Open

class Command extends Component
{
    /**
     * @var Connection the DB connection that this command is associated with
     */
Severity: Minor
Found in framework/db/Command.php by phpmd

The class DbManager has an overall complexity of 148 which is very high. The configured complexity threshold is 50.
Open

class DbManager extends BaseManager
{
    /**
     * @var Connection|array|string the DB connection object or the application component ID of the DB connection.
     * After the DbManager object is created, if you want to change this property, you should only assign it
Severity: Minor
Found in framework/rbac/DbManager.php by phpmd

The class BaseStringHelper has an overall complexity of 73 which is very high. The configured complexity threshold is 50.
Open

class BaseStringHelper
{
    /**
     * Returns the number of bytes in the given string.
     * This method ensures the string is treated as a byte array by using `mb_strlen()`.

The class Target has an overall complexity of 55 which is very high. The configured complexity threshold is 50.
Open

abstract class Target extends Component
{
    /**
     * @var array list of message categories that this target is interested in. Defaults to empty, meaning all categories.
     * You can use an asterisk at the end of a category so that the category may be used to
Severity: Minor
Found in framework/log/Target.php by phpmd

The class Command has 47 public methods. Consider refactoring Command to keep number of public methods under 10.
Open

class Command extends Component
{
    /**
     * @var Connection the DB connection that this command is associated with
     */
Severity: Minor
Found in framework/db/Command.php by phpmd

TooManyPublicMethods

Since: 0.1

A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

By default it ignores methods starting with 'get' or 'set'.

Example

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

The class Container has an overall complexity of 123 which is very high. The configured complexity threshold is 50.
Open

class Container extends Component
{
    /**
     * @var array singleton objects indexed by their types
     */
Severity: Minor
Found in framework/di/Container.php by phpmd
Severity
Category
Status
Source
Language