| Conditions | 1 |
| Paths | 1 |
| Total Lines | 77 |
| Code Lines | 70 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 29 | public function up(Schema $schema): void |
||
| 30 | { |
||
| 31 | // this up() migration is auto-generated, please modify it to your needs |
||
| 32 | $this->addSql( |
||
| 33 | 'CREATE TABLE company (' . |
||
| 34 | 'uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', ' . |
||
| 35 | 'company_name VARCHAR(255) NOT NULL, ' . |
||
| 36 | 'address VARCHAR(255) NOT NULL, ' . |
||
| 37 | 'zip_code VARCHAR(5) NOT NULL, ' . |
||
| 38 | 'town VARCHAR(255) NOT NULL, ' . |
||
| 39 | 'country VARCHAR(255) NOT NULL, ' . |
||
| 40 | 'phone VARCHAR(14) NOT NULL, ' . |
||
| 41 | 'facsimile VARCHAR(14) DEFAULT NULL, ' . |
||
| 42 | 'email VARCHAR(255) NOT NULL, ' . |
||
| 43 | 'contact_name VARCHAR(255) NOT NULL, ' . |
||
| 44 | 'cellphone VARCHAR(14) NOT NULL, ' . |
||
| 45 | 'slug VARCHAR(255) NOT NULL, ' . |
||
| 46 | 'UNIQUE INDEX UNIQ_4FBF094F1D4E64E8 (company_name), ' . |
||
| 47 | 'UNIQUE INDEX UNIQ_4FBF094F989D9B62 (slug), ' . |
||
| 48 | 'PRIMARY KEY(uuid)' . |
||
| 49 | ') DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB' |
||
| 50 | ); |
||
| 51 | $this->addSql( |
||
| 52 | 'CREATE TABLE settings (' . |
||
| 53 | 'uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', ' . |
||
| 54 | 'locale VARCHAR(255) NOT NULL, ' . |
||
| 55 | 'currency VARCHAR(255) NOT NULL, ' . |
||
| 56 | 'PRIMARY KEY(uuid)' . |
||
| 57 | ') DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB' |
||
| 58 | ); |
||
| 59 | $this->addSql( |
||
| 60 | 'CREATE TABLE supplier (' . |
||
| 61 | 'uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', ' . |
||
| 62 | 'family_log VARCHAR(255) NOT NULL, ' . |
||
| 63 | 'delay_delivery INT NOT NULL, ' . |
||
| 64 | 'order_days LONGTEXT NOT NULL COMMENT \'(DC2Type:array)\', ' . |
||
| 65 | 'active TINYINT(1) NOT NULL, ' . |
||
| 66 | 'company_name VARCHAR(255) NOT NULL, ' . |
||
| 67 | 'address VARCHAR(255) NOT NULL, ' . |
||
| 68 | 'zip_code VARCHAR(5) NOT NULL, ' . |
||
| 69 | 'town VARCHAR(255) NOT NULL, ' . |
||
| 70 | 'country VARCHAR(255) NOT NULL, ' . |
||
| 71 | 'phone VARCHAR(14) NOT NULL, ' . |
||
| 72 | 'facsimile VARCHAR(14) DEFAULT NULL, ' . |
||
| 73 | 'email VARCHAR(255) NOT NULL, ' . |
||
| 74 | 'contact_name VARCHAR(255) NOT NULL, ' . |
||
| 75 | 'cellphone VARCHAR(14) NOT NULL, s' . |
||
| 76 | 'lug VARCHAR(255) NOT NULL, ' . |
||
| 77 | 'UNIQUE INDEX UNIQ_9B2A6C7E1D4E64E8 (company_name), ' . |
||
| 78 | 'UNIQUE INDEX UNIQ_9B2A6C7E989D9B62 (slug), ' . |
||
| 79 | 'PRIMARY KEY(uuid)' . |
||
| 80 | ') DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB' |
||
| 81 | ); |
||
| 82 | $this->addSql( |
||
| 83 | 'CREATE TABLE user (' . |
||
| 84 | 'uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:guid)\', ' . |
||
| 85 | 'username VARCHAR(150) NOT NULL, ' . |
||
| 86 | 'email VARCHAR(255) NOT NULL, ' . |
||
| 87 | 'password VARCHAR(120) NOT NULL, ' . |
||
| 88 | 'roles LONGTEXT NOT NULL COMMENT \'(DC2Type:array)\', ' . |
||
| 89 | 'PRIMARY KEY(uuid)' . |
||
| 90 | ') DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB' |
||
| 91 | ); |
||
| 92 | $this->addSql( |
||
| 93 | 'CREATE TABLE messenger_messages (' . |
||
| 94 | 'id BIGINT AUTO_INCREMENT NOT NULL, ' . |
||
| 95 | 'body LONGTEXT NOT NULL, ' . |
||
| 96 | 'headers LONGTEXT NOT NULL, ' . |
||
| 97 | 'queue_name VARCHAR(190) NOT NULL, ' . |
||
| 98 | 'created_at DATETIME NOT NULL, ' . |
||
| 99 | 'available_at DATETIME NOT NULL, ' . |
||
| 100 | 'delivered_at DATETIME DEFAULT NULL, ' . |
||
| 101 | 'INDEX IDX_75EA56E0FB7336F0 (queue_name), ' . |
||
| 102 | 'INDEX IDX_75EA56E0E3BD61CE (available_at), ' . |
||
| 103 | 'INDEX IDX_75EA56E016BA31DB (delivered_at), ' . |
||
| 104 | 'PRIMARY KEY(id)' . |
||
| 105 | ') DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB' |
||
| 106 | ); |
||
| 119 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths