parent
db9e9a544e
commit
b99e21259c
|
@ -26,16 +26,32 @@ class Comparer
|
|||
/** @var array{changed?: string[], removed?: string[], added?: string[]} */
|
||||
private $changed;
|
||||
|
||||
/**
|
||||
* @param string $source
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setSource($source)
|
||||
{
|
||||
$this->source = $source;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $update
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUpdate($update)
|
||||
{
|
||||
$this->update = $update;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $toString
|
||||
* @param bool $explicated
|
||||
*
|
||||
* @return array{changed?: string[], removed?: string[], added?: string[]}|string|false false if no change, string only if $toString is true
|
||||
*/
|
||||
public function getChanged($toString = false, $explicated = false)
|
||||
{
|
||||
$changed = $this->changed;
|
||||
|
@ -62,6 +78,9 @@ class Comparer
|
|||
return $changed;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function doCompare()
|
||||
{
|
||||
$source = array();
|
||||
|
@ -100,6 +119,12 @@ class Comparer
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $dir
|
||||
* @param mixed $array
|
||||
*
|
||||
* @return array<string, array<string, string|false>>|false
|
||||
*/
|
||||
private function doTree($dir, &$array)
|
||||
{
|
||||
if ($dh = opendir($dir)) {
|
||||
|
|
Loading…
Reference in New Issue