private function copyKey(string $key): void
    {
        $source = $this->sourceDictionary->get($key);
        if ($source->isSourceEmpty()) {
            $this->logger->debug(
                '{key}: Is empty in source language and therefore skipped.',
                ['key' => $key]
            );
            return;
        }

        if (!$this->targetDictionary->has($key)) {
            $this->logger->log($this->logLevel, 'Adding key {key}.', ['key' => $key]);
            if ($this->dryRun) {
                return;
            }

            $this->targetDictionary->add($key);
        }
        $target = $this->targetDictionary->getWritable($key);

        $this->copySource($source, $target);
        $this->copyTarget($source, $target);
    }
private function copyKey(string $key): void
    {
        $source = $this->sourceDictionary->get($key);
        if ($source->isSourceEmpty()) {
            $this->logger->debug(
                '{key}: Is empty in source language and therefore skipped.',
                ['key' => $key]
            );
            return;
        }

        if (!$this->targetDictionary->has($key)) {
            $this->logger->log($this->logLevel, 'Adding key {key}.', ['key' => $key]);
            if ($this->dryRun) {
                return;
            }

            $this->targetDictionary->add($key);
        }
        $target = $this->targetDictionary->getWritable($key);

        $this->copySource($source, $target);
        $this->copyTarget($source, $target);
    }
private function copyKey ( string $ key ) : void { $ source = $ this -> sourceDictionary -> get ( $ key ) ; if ( $ source -> isSourceEmpty ( ) ) { $ this -> logger -> debug ( '{key}: Is empty in source language and therefore skipped.' , [ 'key' => $ key ] ) ; return ; } if ( ! $ this -> targetDictionary -> has ( $ key ) ) { $ this -> logger -> log ( $ this -> logLevel , 'Adding key {key}.' , [ 'key' => $ key ] ) ; if ( $ this -> dryRun ) { return ; } $ this -> targetDictionary -> add ( $ key ) ; } $ target = $ this -> targetDictionary -> getWritable ( $ key ) ; $ this -> copySource ( $ source , $ target ) ; $ this -> copyTarget ( $ source , $ target ) ; }
Copy a key.

@param string $key The key.

@return void
Copy a key .