29 lines
609 B
PHP
29 lines
609 B
PHP
<?php
|
|
|
|
/**
|
|
* SPDX-License-Identifier: EUPL-1.2
|
|
* Authors: see /README.md
|
|
*/
|
|
|
|
namespace Seacms\ComposerInstaller;
|
|
|
|
use SplFileInfo;
|
|
use TopFloor\ComposerCleanupVcsDirs\Handler as ParentHandler;
|
|
|
|
class Handler extends ParentHandler
|
|
{
|
|
/**
|
|
* @param $parentDir
|
|
* @param bool $excludeRoot
|
|
* @return SplFileInfo[]
|
|
*/
|
|
public function getVcsDirs($parentDir, $excludeRoot = false) {
|
|
|
|
$dirs = [];
|
|
if (!is_link($parentDir) && is_dir($parentDir) && is_dir("$parentDir/.git")){
|
|
$dirs[] = new SplFileInfo("$parentDir/.git");
|
|
}
|
|
|
|
return $dirs;
|
|
}
|
|
} |