original_string: protected function resolveDependencies($sortedAssets, $assets, $asset)
      {
          if ($asset->hasDependencies()) {
              foreach ($asset->getDependencies() as $dependency) {
                  if (!isset($sortedAssets[$dependency]) && isset($assets[$dependency])) {
                      $sortedAssets = $this->resolveDependencies($sortedAssets, $assets, $assets[$dependency]);
                  }
              }
          }
          
          $sortedAssets[$asset->getAssetName()] = $asset;
          
          return $sortedAssets;
      }
code: protected function resolveDependencies($sortedAssets, $assets, $asset)
      {
          if ($asset->hasDependencies()) {
              foreach ($asset->getDependencies() as $dependency) {
                  if (!isset($sortedAssets[$dependency]) && isset($assets[$dependency])) {
                      $sortedAssets = $this->resolveDependencies($sortedAssets, $assets, $assets[$dependency]);
                  }
              }
          }
          
          $sortedAssets[$asset->getAssetName()] = $asset;
          
          return $sortedAssets;
      }
code_tokens: protected function resolveDependencies ( $ sortedAssets , $ assets , $ asset ) { if ( $ asset -> hasDependencies ( ) ) { foreach ( $ asset -> getDependencies ( ) as $ dependency ) { if ( ! isset ( $ sortedAssets [ $ dependency ] ) && isset ( $ assets [ $ dependency ] ) ) { $ sortedAssets = $ this -> resolveDependencies ( $ sortedAssets , $ assets , $ assets [ $ dependency ] ) ; } } } $ sortedAssets [ $ asset -> getAssetName ( ) ] = $ asset ; return $ sortedAssets ; }
docstring: Returns the sorted assets with all dependencies
  
  @param array $sortedAssets
  @param array $assets
  @param \Zepi\Web\General\Entity\Asset $asset
  @return array
docstring_tokens: Returns the sorted assets with all dependencies