original_string: public function register_asset( \Amarkal\Assets\AbstractAsset $new_asset )
      {
          if( NULL == $this->assets ) {
              $this->assets = array();
              $this->assets[] = $new_asset;
          }
          else {
              foreach( $this->assets as $asset ) {
                  if( $asset->handle == $new_asset->handle && get_class($asset) == get_class($new_asset) ) {
                      throw new DuplicateAssetException("An asset with the handle {$new_asset->handle} already exists");
                  }
              }
              $this->assets[] = $new_asset;
          }
      }
code: public function register_asset( \Amarkal\Assets\AbstractAsset $new_asset )
      {
          if( NULL == $this->assets ) {
              $this->assets = array();
              $this->assets[] = $new_asset;
          }
          else {
              foreach( $this->assets as $asset ) {
                  if( $asset->handle == $new_asset->handle && get_class($asset) == get_class($new_asset) ) {
                      throw new DuplicateAssetException("An asset with the handle {$new_asset->handle} already exists");
                  }
              }
              $this->assets[] = $new_asset;
          }
      }
code_tokens: public function register_asset ( \ Amarkal \ Assets \ AbstractAsset $ new_asset ) { if ( NULL == $ this -> assets ) { $ this -> assets = array ( ) ; $ this -> assets [ ] = $ new_asset ; } else { foreach ( $ this -> assets as $ asset ) { if ( $ asset -> handle == $ new_asset -> handle && get_class ( $ asset ) == get_class ( $ new_asset ) ) { throw new DuplicateAssetException ( "An asset with the handle {$new_asset->handle} already exists" ) ; } } $ this -> assets [ ] = $ new_asset ; } }
docstring: Register a single asset
  
  @param \Amarkal\Assets\AbstractAsset $new_asset The asset to enqueue
  @throws DuplicateAssetException    If the a duplicated asset handle exists
docstring_tokens: Register a single asset