original_string: public function add(PluginInterface $plugin)
      {
          $name = $plugin->getName();
          $this->plugins[$name] = $plugin;
          $this->names = array_keys($this->plugins);
  
          return $this;
      }
code: public function add(PluginInterface $plugin)
      {
          $name = $plugin->getName();
          $this->plugins[$name] = $plugin;
          $this->names = array_keys($this->plugins);
  
          return $this;
      }
code_tokens: public function add ( PluginInterface $ plugin ) { $ name = $ plugin -> getName ( ) ; $ this -> plugins [ $ name ] = $ plugin ; $ this -> names = array_keys ( $ this -> plugins ) ; return $ this ; }
docstring: Add a plugin to the collection
  
  Plugins will be keyed by their names.
  
  @param \Cake\Core\PluginInterface $plugin The plugin to load.
  @return $this
docstring_tokens: Add a plugin to the collection