original_string: public function getByType($type, $enabled = false)
      {
          $modules = $enabled ? $this->getEnabled() : $this->getList();
  
          foreach ($modules as $id => $info) {
              if ($type !== $info['type']) {
                  unset($modules[$id]);
              }
          }
  
          return $modules;
      }
code: public function getByType($type, $enabled = false)
      {
          $modules = $enabled ? $this->getEnabled() : $this->getList();
  
          foreach ($modules as $id => $info) {
              if ($type !== $info['type']) {
                  unset($modules[$id]);
              }
          }
  
          return $modules;
      }
code_tokens: public function getByType ( $ type , $ enabled = false ) { $ modules = $ enabled ? $ this -> getEnabled ( ) : $ this -> getList ( ) ; foreach ( $ modules as $ id => $ info ) { if ( $ type !== $ info [ 'type' ] ) { unset ( $ modules [ $ id ] ) ; } } return $ modules ; }
docstring: Returns an array of modules by the type
  @param string $type
  @param boolean $enabled
  @return array
docstring_tokens: Returns an array of modules by the type