@param Standard $source
@param Standard $destination

@return bool
513709
protected function compareStandards(Standard $source, Standard $destination)
    {
        return $source->getName() === $destination->getName()
            && sha1_file($source->getRuleSetXmlPath()) === sha1_file($destination->getRuleSetXmlPath());
    }
1269039
protected function ensureOutputFormatIsValid(string $destination)
    {
        if (!in_array(preg_replace('/.+\.(\w+)$/', '$1', $destination), $this->allowedFormats, true)) {
            throw new \InvalidArgumentException('Output format is not allowed ('.implode(', ', $this->allowedFormats).')');
        }
    }
488025
private function makeArrayFromOptionsWithVoidValues(array $source, array &$destination): array
    {
        $destination = [];

        foreach ($source as $option) {
            $destination[trim($option, "- ")] = "";
        }

        return $destination;
    }
257823
public function file($source, $destination)
    {
        settype($source, 'array');

        $this->set($destination, true);

        $added = 0;

        foreach ($source as $file) {
            $added += (int) $this->zip->addFile($file, basename($file));
        }

        $this->zip->close();
        return count($source) == $added;
    }
627862
public function getConfig($destination, $param)
    {
        if (isset($this->destinations[$destination])) {
            return $this->destinations[$destination]->getConfig($param);
        }

        return false;
    }
383689
protected function _copyDirectory($source, $destination)
    {
        $folder = new Folder($source);
        if ($folder->copy(['to' => $destination])) {
            $this->out('Copied assets to directory ' . $destination);

            return true;
        }

        $this->err('Error copying assets to directory ' . $destination);

        return false;
    }
952323
public function send($destination, Message $message)
    {
        return $this->getClient()->send($destination, $message, ['transaction' => $this->transactionId], false);
    }
544202
private function rcopy($source, $destination) { 
	    
	    if(false === is_string($source)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($source)), E_USER_ERROR);
		}

		if(false === is_string($destination)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($destination)), E_USER_ERROR);
		}

		if(false === is_dir($destination)) {

			$tmp = new Directory($destination);
			$tmp -> create();
		}

	    $directory = opendir($source); 
	    
	    while(false !== ($file = readdir($directory))) { 

	        if(false === in_array($file, ['.', '..'])) { 

	            if(is_dir($source . DIRECTORY_SEPARATOR . $file) ) { 
	                $this -> rcopy($source . DIRECTORY_SEPARATOR . $file, $destination . DIRECTORY_SEPARATOR . $file); 
	            } 
	            else { 
	                copy($source . DIRECTORY_SEPARATOR . $file, $destination . DIRECTORY_SEPARATOR . $file); 
	            } 
	        } 
	    } 

	    closedir($directory); 
	}
1250947
public function publish($source, $destination)
	{
		$add = 0;

		$published = array();

		foreach ($this->getFreshMigrations($source, $destination) as $file)
		{
			$add++;

			$newName = $this->getNewMigrationName($file, $add);

			$this->files->copy(
				$file, $newName = $destination.'/'.$newName
			);

			$published[] = $newName;
		}

		return $published;
	}
939906
public function addMethod($source, $destination = null)
    {
        //argument test
         Argument::i()
            //argument 1 must be a string
            ->test(1, 'string')
            //argument 2 must be callable or null
            ->test(2, 'callable', 'null');

        if (is_null($destination)) {
            //when someone calls a class call this instead
            Route::i()->set($source, $this);
            return $this;
        }
        
        //if it's an array they meant to bind the callback
        if (!is_array($destination)) {
            //so there's no scope
            $destination = $destination->bindTo($this, get_class($this));
        }
        
        //store it
        self::$invokables[$source] = $destination;
        
        return $this;
    }
363409
public function copy($source, $destination)  
    {
        Eden_Array_Argument::i()
            //argument 1 must be a string
            ->test(1, 'string')  
            //argument 2 must be a string
            ->test(2, 'string'); 

        $this->data[$destination] = $this->data[$source];
        return $this;
    }
1020638
public function rpoplpush($source, $destination) {
        $keys = [$source, $destination];
        return $this->returnCommand(['RPOPLPUSH'], $keys, $keys);
    }
977413
public static function map( $source, $destination, iterable $map ) {

    // sanity check
    if( !static::is( $source, false, true ) ) throw new \TypeError( 'The $source must be arraylike' );
    else if( !static::is( $destination, false, true ) ) throw new \TypeError( 'The $destination must be arraylike' );
    else {

      // iterate $map and fill the destination based on it
      foreach( $map as $key => $key_list ) {

        $value    = $source[ Number::is( $key ) ? $key_list : $key ] ?? null;
        $key_list = static::cast( $key_list, [ $key_list ] );
        foreach( $key_list as $_key ) {
          $destination[ $_key ] = $value;
        }
      }

      return $destination;
    }
  }
1309237
public function safeRename($source, $destination)
    {
        $isRenamed = @rename($source, $destination);
        if ($isRenamed) {
            return;

        }

        // copy to the target filesystem
        $tempFileOnSameFS = "$destination.tmp";

        $isCopied = copy($source, $tempFileOnSameFS);
        if (! $isCopied) {
            throw new FileException(
                "failed to copy $source to $tempFileOnSameFS."
            );

        }

        $isUnlinked = unlink($source);
        if (! $isUnlinked) {
            trigger_error("Failed to unlink $source.");

        }

        $isRenamed = rename($tempFileOnSameFS, $destination);
        if (! $isRenamed) {
            throw new FileException(
                "failed to rename $tempFileOnSameFS to $destination."
            );

        }
    }
1348779
protected function doMap(
        $source,
        $destination,
        MappingInterface $mapping,
        array $context = []
    ) {
        $propertyNames = $mapping->getTargetProperties($destination, $source);
        foreach ($propertyNames as $propertyName) {
            $mappingOperation = $mapping->getMappingOperationFor($propertyName);

            if ($mappingOperation instanceof MapperAwareOperation) {
                $mappingOperation->setMapper($this);
            }
            if ($mappingOperation instanceof ContextAwareOperation) {
                $mappingOperation->setContext($context);
            }

            $mappingOperation->mapProperty(
                $propertyName,
                $source,
                $destination
            );
        }

        return $destination;
    }
544258
public function replicateQuoteData($source, $destination)
    {
        // Skip the replication if source and destination point to the same quote
        // E.g. delayed Save Order - immutable quote is cleared by cron and we use the parent instead
        if ($source->getId() == $destination->getId()) return;

        $destinationId = $destination->getId();
        $destinationActive = (bool)$destination->getIsActive();

        $destination->removeAllItems();

        $destination->merge($source);

        $destination->getBillingAddress()->setShouldIgnoreValidation(true);
        $this->transferData($source->getBillingAddress(), $destination->getBillingAddress());

        $destination->getShippingAddress()->setShouldIgnoreValidation(true);
        $this->transferData($source->getShippingAddress(), $destination->getShippingAddress());

        $this->transferData($source, $destination, false);

        $destination->setId($destinationId);
        $destination->setIsActive($destinationActive);

        $this->quoteResourceSave($destination);

        // If Amasty Gif Cart Extension is present clone applied gift cards
        $this->discountHelper->cloneAmastyGiftCards($source->getId(), $destination->getId());
    }
1328964
public static function zip($source, $destination) {
		if(!extension_loaded('zip') || !file_exists($source))
			return false;

		$zip = new \ZipArchive();
		if(!$zip->open($destination, \ZIPARCHIVE::CREATE))
			return false;

		$source = str_replace('\\', '/', realpath($source));

		if(is_dir($source)) {
			$files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($source), \RecursiveIteratorIterator::SELF_FIRST);

			foreach($files as $file) {
				$file = str_replace('\\', '/', realpath($file));

				if(is_dir($file))
					$zip->addEmptyDir(str_replace($source . '/', '', $file . '/'));
				elseif(is_file($file))
					$zip->addFromString(str_replace($source . '/', '', $file), file_get_contents($file));
			}
		}
		elseif(is_file($source))
			$zip->addFromString(basename($source), file_get_contents($source));

		return $zip->close();
	}