original_string: public function build(array $filters = [])
      {
          $assets = [];
          foreach (array_keys($this->_queued) as $alias) {
              $this->_resolveDependencies($this->_collection->get($alias), $assets);
          }
  
          /** @var Asset $asset */
          $result = [
              Asset::TYPE_JS_FILE  => [],
              Asset::TYPE_JS_CODE  => [],
              Asset::TYPE_JSX_FILE => [],
              Asset::TYPE_JSX_CODE => [],
              Asset::TYPE_CSS_FILE => [],
              Asset::TYPE_CSS_CODE => [],
              Asset::TYPE_CALLBACK => [],
          ];
          foreach ($assets as $asset) {
  
              $source = $asset->load($filters);
  
              if (Asset::TYPE_COLLECTION === $source[0]) {
                  $source = $source[1];
              } else {
                  $source = [$source];
              }
  
              foreach ($source as $sourceItem) {
  
                  $type = $sourceItem[0];
                  $src = $sourceItem[1];
  
                  if ($src && !Arr::in($src, $result[$type])) {
                      $result[$type][] = $src;
                  }
              }
          }
  
          return $result;
      }
code: public function build(array $filters = [])
      {
          $assets = [];
          foreach (array_keys($this->_queued) as $alias) {
              $this->_resolveDependencies($this->_collection->get($alias), $assets);
          }
  
          /** @var Asset $asset */
          $result = [
              Asset::TYPE_JS_FILE  => [],
              Asset::TYPE_JS_CODE  => [],
              Asset::TYPE_JSX_FILE => [],
              Asset::TYPE_JSX_CODE => [],
              Asset::TYPE_CSS_FILE => [],
              Asset::TYPE_CSS_CODE => [],
              Asset::TYPE_CALLBACK => [],
          ];
          foreach ($assets as $asset) {
  
              $source = $asset->load($filters);
  
              if (Asset::TYPE_COLLECTION === $source[0]) {
                  $source = $source[1];
              } else {
                  $source = [$source];
              }
  
              foreach ($source as $sourceItem) {
  
                  $type = $sourceItem[0];
                  $src = $sourceItem[1];
  
                  if ($src && !Arr::in($src, $result[$type])) {
                      $result[$type][] = $src;
                  }
              }
          }
  
          return $result;
      }
code_tokens: public function build ( array $ filters = [ ] ) { $ assets = [ ] ; foreach ( array_keys ( $ this -> _queued ) as $ alias ) { $ this -> _resolveDependencies ( $ this -> _collection -> get ( $ alias ) , $ assets ) ; } /** @var Asset $asset */ $ result = [ Asset :: TYPE_JS_FILE => [ ] , Asset :: TYPE_JS_CODE => [ ] , Asset :: TYPE_JSX_FILE => [ ] , Asset :: TYPE_JSX_CODE => [ ] , Asset :: TYPE_CSS_FILE => [ ] , Asset :: TYPE_CSS_CODE => [ ] , Asset :: TYPE_CALLBACK => [ ] , ] ; foreach ( $ assets as $ asset ) { $ source = $ asset -> load ( $ filters ) ; if ( Asset :: TYPE_COLLECTION === $ source [ 0 ] ) { $ source = $ source [ 1 ] ; } else { $ source = [ $ source ] ; } foreach ( $ source as $ sourceItem ) { $ type = $ sourceItem [ 0 ] ; $ src = $ sourceItem [ 1 ] ; if ( $ src && ! Arr :: in ( $ src , $ result [ $ type ] ) ) { $ result [ $ type ] [ ] = $ src ; } } } return $ result ; }
docstring: Build assets.
  
  @param array $filters
  @return array
docstring_tokens: Build assets .