| Conditions | 7 |
| Paths | 5 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 25 | public function onKernelRequestMenuRouterRebuild(GetResponseEvent $event) { |
||
|
|
|||
| 26 | if (file_exists("public://rebuild.dat")) { |
||
| 27 | $site_path = preg_replace('/^sites\//', '', \Drupal::service('site.path')); |
||
| 28 | if (!file_exists('public://.drushrc') && file_exists('public://') && is_writable('public://') && file_put_contents('public:///.drushrc', "<?php\n\$options['l'] = 'http://${site_path}';")) { |
||
| 29 | drupal_chmod('public:///.drushrc', 0444); |
||
| 30 | } |
||
| 31 | |||
| 32 | if (\Drupal::service('router.builder')->rebuild()) { |
||
| 33 | file_unmanaged_delete("public://rebuild.dat"); |
||
| 34 | } |
||
| 35 | } |
||
| 36 | } |
||
| 37 | |||
| 49 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.