atdrupal / at_base.module

Provide some more API for developer to work with Drupal (7).
https://drupal.org/project/at_base
GNU General Public License v2.0
5 stars 4 forks source link

[Insight] Unused method, property, variable or parameter #228

Closed and1truong closed 9 years ago

and1truong commented 10 years ago

in lib/Cache/Warming/Warmer/ViewWarmer.php, line 15

This module local variable is declared but never used. You should remove it.

  public function validateTag($tag) {
    return 0 === strpos($tag, 'view:') || 0 === strpos($tag, 'views:');
  }

  public function processTag($tag, $context = array()) {
    @list($module, $view_name, $display_id) = explode(':', $tag);

    if ($view = views_get_view($view_name)) {
      $display_id = $display_id ? $display_id : 'default';
      $display = isset($view->display[$display_id]) ? $view->display[$display_id] : $view->display['default'];
      $cache = new views_plugin_cache($view, $display);

Posted from SensioLabsInsight