for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Copyright MediaCT. All rights reserved.
* https://www.mediact.nl
*/
declare(strict_types=1);
namespace Mediact\CodingStandard\PhpStorm\Patcher;
use Mediact\CodingStandard\PhpStorm\FilesystemInterface;
trait CopyFilesTrait
{
* Copy a directory.
*
* @param FilesystemInterface $source
* @param FilesystemInterface $destination
* @param string $path
* @return void
private function copyDirectory(
FilesystemInterface $source,
FilesystemInterface $destination,
string $path
): void {
foreach ($source->listFiles($path) as $filePath) {
$this->copyFile($source, $destination, $filePath);
}
* Copy a file.
private function copyFile(
$destination->put(
$path,
$source->read($path)
);