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