Merges all filesets into a string to be echoed out

@return string String to echo
164535
protected function getFilesetsMsg()
    {
        $project = $this->getProject();
        $msg = '';
        foreach ($this->filesets as $fs) {
            $ds = $fs->getDirectoryScanner($project);
            $fromDir = $fs->getDir($project);
            $srcDirs = $ds->getIncludedDirectories();
            $srcFiles = $ds->getIncludedFiles();
            $msg .= 'Directory: ' . $fromDir . ' => '
                . realpath($fromDir) . "\n";
            foreach ($srcDirs as $dir) {
                $relPath = $fromDir . DIRECTORY_SEPARATOR . $dir;
                $msg .= $relPath . "\n";
            }
            foreach ($srcFiles as $file) {
                $relPath = $fromDir . DIRECTORY_SEPARATOR . $file;
                $msg .= $relPath . "\n";
            }
        }

        return $msg;
    }
694747
public function getFiles()
    {

        // initialize the array with the files
        $files = array();

        // iterate over the file keys and read the configuration values
        foreach (FileKeys::getServerFileKeys() as $fileKey) {
            $files[$fileKey] = $this->getSystemConfiguration()->getParam($fileKey);
        }

        // return the array with the files
        return $files;
    }
262229
public function getTotalFiles()
    {
        if (!$this->_files) {
            $this->scan;
        }
        $i = 0;
        foreach ($this->_files as $file) {
            if ($file->isFile) {
                $i++;
            }
        }
        return $i;
    }
293620
private function getFileTemplate()
    {
        $content = FormatFileContent::createObject();
        $content->addItem('<?php');
        $content->addItem(
            sprintf(
                '/**Migration file generated at %s on %s by PowerOrm(%s)*/',
                date('h:m:i'),
                date('D, jS F Y'),
                POWERORM_VERSION
            ).PHP_EOL
        );

        $content->addItem('namespace %s;'.PHP_EOL);

        $content->addItem('use Eddmash\\PowerOrm\\Migration\\Migration;');
        $content->addItem('%s');

        $content->addItem('class %s extends Migration{'.PHP_EOL);

        $content->addIndent();
        $content->addItem('public function getDependency(){');

        $content->addIndent();
        $content->addItem('return [');

        $content->addItem('%s');

        $content->addItem('];');
        $content->reduceIndent();

        $content->addItem('}'.PHP_EOL);

        $content->addItem('public function getOperations(){');

        $content->addIndent();
        $content->addItem('return %s ;');
        $content->reduceIndent();

        $content->addItem('}'.PHP_EOL);
        $content->reduceIndent();

        $content->addItem('}');

        return $content;
    }
1364926
protected function mergeArrays()
    {
        $arrays = func_get_args();
        $merged = array();

        foreach ($arrays as $array) {
            foreach ($array as $key => $value) {
                $merged = $this->setValue($key, $value, $merged);
            }
        }

        return $merged;
    }
146109
public function getFiles() {
        static $files;
        if (!isset($files)) {
            $normalizeLevel = function(array $file) use (&$normalizeLevel) {
                if (isset($file['name']) && is_array($file['name'])) {
                    $properties = \array_keys($file);
                    $normalized = [];
                    foreach (\array_keys($file['name']) as $name) {
                        foreach ($properties as $property) {
                            $normalized[$name][$property] = $file[$property][$name];
                        }
                        $normalized[$name] = $normalizeLevel($normalized[$name]);
                    }
                    $file = $normalized;
                }
                return $file;
            };
            $files = [];
            if (isset($_FILES)) {
                foreach ($_FILES as $key => $file) {
                    $files[$key] = $normalizeLevel($file);
                }
            }
        }
        return $files;
    }
1370540
protected function mergeStrings(array $strings)
	{
		$len       = $this->getPrefixLength($strings);
		$newString = array_slice($strings[0], 0, $len);
		foreach ($strings as $string)
		{
			$newString[$len][] = array_slice($string, $len);
		}

		return $newString;
	}
726331
public static function join()
    {
        $paths = array();

        foreach (func_get_args() as $arg) {
            if ($arg !== '') {
                $paths[] = $arg;
            }
        }

        return preg_replace('#/+#', '/', implode('/', $paths));
    }
1151359
public static function join()
    {
        $arguments = func_get_args();

        if (func_get_args() === 1 and is_array($arguments[ 0 ])) {
            $arguments = $arguments[ 0 ];
        }

        foreach ($arguments as $key => $argument) {
            $arguments[ $key ] = Str::removeRight($arguments[ $key ], '/');

            if ($key > 0) {
                $arguments[ $key ] = Str::removeLeft($arguments[ $key ], '/');
            }
        }

        return implode(DIRECTORY_SEPARATOR, $arguments);
    }
1068664
public static function getCombinedContents($paths)
    {
        if (!Arr::iterable($paths)) {
            return '';
        }

        $out = array();
        foreach ($paths as $path) {
            $out[] = file_get_contents($path);
        }
        return join("\n", $out);
    }
1325708
public function toString()
    {
        $result = '';
        foreach ($this->getChunkCursor() as $chunk) {
            $result .= $chunk['data']->getData();
        }
        return $result;
    }
1325665
public function merge()
    {
        $array = $this->getResult();
        foreach ($array as $key => $value) {
            $value['name'] = $value['0'];
            $value['type'] = $value['1'];
            $value['key'] = $value['0'].' :';
            $value['value'] = '';
            unset($value['1']);
            unset($value['0']);
            $this->result[] = $value;
        }

        return $this->result;
    }
770723
public function enaArchiveFiles()
    {
        $properties = $this->getProperties();
        $extString  = (!empty($properties['acceptedFiles'])) ? $properties['acceptedFiles'] : '';
        $archExts   = $this->getArchiveExtensionConstant();
        foreach ($archExts as $archExt) {
            if (strpos($extString, $archExt) === false) {
                $extString .= ','.$archExt;
            }
        }
        $extString                      = substr($extString, 1);
        $properties                     = $this->getProperties();
        $properties['acceptedFiles']    = $extString;
        $this->setProperties($properties);
        return $this;
    }
954592
public static function combine(string ... $paths) : string
    {
        $paths = array_map([__CLASS__, 'normalize'], $paths);

        $paths = array_filter($paths, function ($path) {
            return trim($path, DIRECTORY_SEPARATOR) !== '.';
        });

        $combinedPath = implode(DIRECTORY_SEPARATOR, $paths);

        return self::stringReplaceIgnoringStreamWrapper(
            DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR,
            DIRECTORY_SEPARATOR,
            $combinedPath
        );
    }
318417
public static function concat()
    {
        $args = func_get_args();
        $separator = array_shift($args);

        $output = null;
        foreach ($args as $string) {
            $output .= $string . $separator;
        }

        $output = rtrim($output, $separator);
        return $output;
    }
284292
public function merge ()
	{
		$args = func_get_args();
		$a    = new SObject();

		// TODO: fix for actual Object

		foreach ($args as $arg) {
			if (is_an_array($arg)) {
				if ($arg instanceof self) {
					$arg = $arg->to_array();
				}

				foreach ($arg as $key => $value) {
					$key = strtolower($key);

					if (!$a->offsetExists($key)) {
						$a->offsetSet($key, $value);
					}
				}
			} else {
				/* XXX: Do we really support this? Object instances are
				 *      supposed to be hashes, Vector instances can be appended
				 *      to. */
				$a->storage []= $arg;
			}
		}

		return $a;
	}
864041
public function mergeFiles($directory, $file, $ext = null)
    {
        $cacheKey = 'files::merge::'.md5($directory.$file.$ext);

        $content = Cache::remember($cacheKey, Carbon::now()->minute(20), function () use ($directory, $file, $ext) {
            $return = '';
            foreach ($this->findFile($directory, $file, $ext, true) as $file) {
                $return .= file_get_contents($file).PHP_EOL.PHP_EOL;
            }

            return $return;
        });

        return $content;
    }