original_string: public function add($identifier, array $configuration)
      {
          $presets = $this->loadPresets();
          if (!empty($presets[$identifier])) {
              throw new Exception('Preset exists already', 1410552459);
          }
          if (empty($configuration)) {
              throw new Exception('Empty configuration is not allowed', 1410595656);
          }
          $presets[$identifier] = $configuration;
          ksort($presets);
          $this->savePresets($presets, 'Adds preset with identifier "' . $identifier . '"');
      }
code: public function add($identifier, array $configuration)
      {
          $presets = $this->loadPresets();
          if (!empty($presets[$identifier])) {
              throw new Exception('Preset exists already', 1410552459);
          }
          if (empty($configuration)) {
              throw new Exception('Empty configuration is not allowed', 1410595656);
          }
          $presets[$identifier] = $configuration;
          ksort($presets);
          $this->savePresets($presets, 'Adds preset with identifier "' . $identifier . '"');
      }
code_tokens: public function add ( $ identifier , array $ configuration ) { $ presets = $ this -> loadPresets ( ) ; if ( ! empty ( $ presets [ $ identifier ] ) ) { throw new Exception ( 'Preset exists already' , 1410552459 ) ; } if ( empty ( $ configuration ) ) { throw new Exception ( 'Empty configuration is not allowed' , 1410595656 ) ; } $ presets [ $ identifier ] = $ configuration ; ksort ( $ presets ) ; $ this -> savePresets ( $ presets , 'Adds preset with identifier "' . $ identifier . '"' ) ; }
docstring: Adds a preset to this repository.
  
  @param string $identifier
  @param array $configuration
  @return void
  @throws Exception
docstring_tokens: Adds a preset to this repository .