| Conditions | 1 |
| Paths | 1 |
| Total Lines | 93 |
| Code Lines | 26 |
| 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 |
||
| 151 | public function down(Schema $schema) |
||
| 152 | { |
||
| 153 | $this->acl->down($schema); |
||
| 154 | $this->addSql('CREATE TABLE app_anonymous_role_bu (anonymous_role_id INT NOT NULL, business_unit_id INT NOT NULL, PRIMARY KEY(anonymous_role_id, business_unit_id))'); |
||
| 155 | $this->addSql('CREATE INDEX IDX_B09CAAD23089E0B ON app_anonymous_role_bu (anonymous_role_id)'); |
||
| 156 | $this->addSql('CREATE INDEX IDX_B09CAADA58ECB40 ON app_anonymous_role_bu (business_unit_id)'); |
||
| 157 | $this->addSql('CREATE TABLE app_individual_role_bu (individual_role_id INT NOT NULL, business_unit_id INT NOT NULL, PRIMARY KEY(individual_role_id, business_unit_id))'); |
||
| 158 | $this->addSql('CREATE INDEX IDX_68A9160EFDFA321 ON app_individual_role_bu (individual_role_id)'); |
||
| 159 | $this->addSql('CREATE INDEX IDX_68A9160A58ECB40 ON app_individual_role_bu (business_unit_id)'); |
||
| 160 | $this->addSql('CREATE TABLE app_organization_role_bu (organization_role_id INT NOT NULL, business_unit_id INT NOT NULL, PRIMARY KEY(organization_role_id, business_unit_id))'); |
||
| 161 | $this->addSql('CREATE INDEX IDX_79C5DB011BD1AAEF ON app_organization_role_bu (organization_role_id)'); |
||
| 162 | $this->addSql('CREATE INDEX IDX_79C5DB01A58ECB40 ON app_organization_role_bu (business_unit_id)'); |
||
| 163 | $this->addSql('CREATE TABLE app_staff_role_bu (staff_role_id INT NOT NULL, business_unit_id INT NOT NULL, PRIMARY KEY(staff_role_id, business_unit_id))'); |
||
| 164 | $this->addSql('CREATE INDEX IDX_998CF18F8AB5351A ON app_staff_role_bu (staff_role_id)'); |
||
| 165 | $this->addSql('CREATE INDEX IDX_998CF18FA58ECB40 ON app_staff_role_bu (business_unit_id)'); |
||
| 166 | $this->addSql('CREATE TABLE app_system_role_bu (system_role_id INT NOT NULL, business_unit_id INT NOT NULL, PRIMARY KEY(system_role_id, business_unit_id))'); |
||
| 167 | $this->addSql('CREATE INDEX IDX_6CCE35F83A705E3F ON app_system_role_bu (system_role_id)'); |
||
| 168 | $this->addSql('CREATE INDEX IDX_6CCE35F8A58ECB40 ON app_system_role_bu (business_unit_id)'); |
||
| 169 | $this->addSql(' |
||
| 170 | INSERT INTO app_anonymous_role_bu ( |
||
| 171 | anonymous_role_id, |
||
| 172 | business_unit_id |
||
| 173 | ) |
||
| 174 | SELECT |
||
| 175 | app_anonymous_role.id, |
||
| 176 | app_bu.id |
||
| 177 | FROM |
||
| 178 | app_anonymous_role, |
||
| 179 | app_bu |
||
| 180 | WHERE |
||
| 181 | app_anonymous_role.entity_uuids::text LIKE CONCAT(\'%\', app_bu.uuid, \'%\') |
||
| 182 | '); |
||
| 183 | $this->addSql(' |
||
| 184 | INSERT INTO app_individual_role_bu ( |
||
| 185 | individual_role_id, |
||
| 186 | business_unit_id |
||
| 187 | ) |
||
| 188 | SELECT |
||
| 189 | app_individual_role.id, |
||
| 190 | app_bu.id |
||
| 191 | FROM |
||
| 192 | app_individual_role, |
||
| 193 | app_bu |
||
| 194 | WHERE |
||
| 195 | app_individual_role.entity_uuids::text LIKE CONCAT(\'%\', app_bu.uuid, \'%\') |
||
| 196 | '); |
||
| 197 | $this->addSql(' |
||
| 198 | INSERT INTO app_organization_role_bu ( |
||
| 199 | organization_role_id, |
||
| 200 | business_unit_id |
||
| 201 | ) |
||
| 202 | SELECT |
||
| 203 | app_organization_role.id, |
||
| 204 | app_bu.id |
||
| 205 | FROM |
||
| 206 | app_organization_role, |
||
| 207 | app_bu |
||
| 208 | WHERE |
||
| 209 | app_organization_role.entity_uuids::text LIKE CONCAT(\'%\', app_bu.uuid, \'%\') |
||
| 210 | '); |
||
| 211 | $this->addSql(' |
||
| 212 | INSERT INTO app_staff_role_bu ( |
||
| 213 | staff_role_id, |
||
| 214 | business_unit_id |
||
| 215 | ) |
||
| 216 | SELECT |
||
| 217 | app_staff_role.id, |
||
| 218 | app_bu.id |
||
| 219 | FROM |
||
| 220 | app_staff_role, |
||
| 221 | app_bu |
||
| 222 | WHERE |
||
| 223 | app_staff_role.entity_uuids::text LIKE CONCAT(\'%\', app_bu.uuid, \'%\') |
||
| 224 | '); |
||
| 225 | $this->addSql(' |
||
| 226 | INSERT INTO app_system_role_bu ( |
||
| 227 | system_role_id, |
||
| 228 | business_unit_id |
||
| 229 | ) |
||
| 230 | SELECT |
||
| 231 | app_system_role.id, |
||
| 232 | app_bu.id |
||
| 233 | FROM |
||
| 234 | app_system_role, |
||
| 235 | app_bu |
||
| 236 | WHERE |
||
| 237 | app_system_role.entity_uuids::text LIKE CONCAT(\'%\', app_bu.uuid, \'%\') |
||
| 238 | '); |
||
| 239 | $this->addSql('ALTER TABLE app_anonymous_role DROP entity_uuids'); |
||
| 240 | $this->addSql('ALTER TABLE app_individual_role DROP entity_uuids'); |
||
| 241 | $this->addSql('ALTER TABLE app_organization_role DROP entity_uuids'); |
||
| 242 | $this->addSql('ALTER TABLE app_staff_role DROP entity_uuids'); |
||
| 243 | $this->addSql('ALTER TABLE app_system_role DROP entity_uuids'); |
||
| 244 | } |
||
| 246 |
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