@param array $committedFiles

@return array
968665
private function getPhpFiles(array $committedFiles)
    {
        /**
         * @var PhpFilesResponse
         */
        $phpFilesResponse = $this->queryBus->handle(new PhpFilesExtractor($committedFiles));

        return $phpFilesResponse->getFiles();
    }
1323446
public function getIncludedFiles(): array
    {
        if ($this->filesIncluded === null) {
            throw new UnexpectedValueException('Must call scan() first');
        }

        sort($this->filesIncluded);

        return $this->filesIncluded;
    }
988100
public function getAppliedFiles()
    {
        $appliedFinder = $this->getFinder();

        $files = $appliedFinder->files()
            ->in($this->appliedFilesDir)
            ->name(self::PATTERN)
            ->sort($this->sort())
        ;

        return $files;
    }
607083
private function SortFilesByVersion(array $files)
    {
        $result = array();
        $foreignKeysFile = '';
        foreach ($files as $file)
        {
            if ($file == 'foreign-keys.sql')
            {
                $foreignKeysFile = $file;
                continue;
            }
            $version = Path::RemoveExtension($file);
            if ($this->installedVersion && version_compare($version, $this->installedVersion) <= 0)
            {
                continue;
            }
            $result[$version] = $file;
        }
        uksort($result, "version_compare");
        if ($foreignKeysFile)
        {
            $result[] = $foreignKeysFile;
        }
        return $result;
    }
800706
public function setLoadedFiles(array $loadedFiles)
    {
        $formatedLoadedFiles = [];
        $idLoadedFiles      = 0;
        // validation du tableau
        foreach ($loadedFiles as $loadedFile) {
            if (!array_key_exists('name', $loadedFile) || !array_key_exists('pathFile', $loadedFile)) {
                return false;
            }
            $idLoadedFiles++;
            $item                                       = [];
            $item['name']                               = $loadedFile['name'];
            $item['pathFile']                           = $loadedFile['pathFile'];
            $formatedLoadedFiles[$idLoadedFiles.'ld']   = $item;
        }

        $properties                     = $this->getProperties();
        $properties['loadedFiles']      = $formatedLoadedFiles;
        $this->setProperties($properties);
        return $this;
    }
1291315
public static function files(array $listOfFiles)
    {
        $listOfContents = array();
        foreach ($listOfFiles as $key => $filepath) {
            $listOfContents[$key] = self::file($filepath);
        }
        return $listOfContents;
    }
316714
protected function getFilePayload(?array $files) : ?array
    {
        if (empty($files)) {
            return null;
        }

        $files = array_filter($files, function($file) {
            return $file instanceof ResourceSettings || (isset($file['key']) && isset($file['filename']));
        });

        return $files;
    }
779190
private static function convertUploadedFiles(array $uploadedFiles)
    {
        $files = [];
        foreach ($uploadedFiles as $name => $uploadedFile) {
            if (!is_array($uploadedFile)) {
                $files[$name] = self::convertUploadedFile($uploadedFile);
                continue;
            }

            $files[$name] = [];
            foreach ($uploadedFile as $file) {
                $files[$name][] = self::convertUploadedFile($file);
            }
        }

        return $files;
    }
1083813
protected function getFiles($specified)
    {
        $specified = (array) $specified;

        if (php_sapi_name() === 'cli') {
            return [];
        }

        if ($this->extension === null) {
            return [];
        }

        $path = $this->extensionsManager->getExtensionPathByName($this->extension);

        if (!$path) {
            return [];
        }

        $public     = $path . DIRECTORY_SEPARATOR . 'public';
        $filesystem = app(Filesystem::class);
        if (empty($specified)) {
            return $filesystem->allFiles($public);
        }

        $return = [];

        foreach ($specified as $file) {
            $target = $public . DIRECTORY_SEPARATOR . $file;

            if (!file_exists($target) && file_exists(public_path($file))) {
                $target = public_path($file);
            }

            array_push($return, new SplFileInfo($public . DIRECTORY_SEPARATOR . $file, current(explode('/', $file)), $file));
        }

        return $return;
    }
446163
protected function filter_files( $files ) {
		if ( ! $files ) {
			return null;
		}

		foreach ( $files as $key => $file ) {
			if ( is_array( $file ) ) {
				$files[ $key ] = $this->filter_files( $files[ $key ] );
			}

			if ( empty( $files[ $key ] ) ) {
				unset( $files[ $key ] );
			}
		}

		return $files;
	}
404214
protected function _getFileData($_files) {
		$return_files = [];
		if (is_array($_files)) {
			foreach ($_files as $fkey => $fvalue) {
				if (is_array($fvalue)) {
					foreach ($fvalue as $varname => $varpair) {
						if (is_array($varpair)) {
							foreach ($varpair as $fieldname => $varvalue) {
								$return_files[$fkey][$fieldname][$varname]=$varvalue;
							}
						} else {
							$return_files[$fkey] = $fvalue;
						}
					}
				}
			}
		}
		return $return_files;
	}
1069626
public function countFileReferences(array $files)
    {
        if (empty($files)) {
            return array();
        }

        $connection = $this->getConnection();

        $selectQuery = $connection->createSelectQuery();
        $selectQuery->select(
            $connection->quoteColumn('filename'),
            $connection->quoteColumn('mime_type'),
            $selectQuery->alias(
                $selectQuery->expr->count($connection->quoteColumn('contentobject_attribute_id')),
                'count'
            )
        )->from(
            $connection->quoteTable($this->getStorageTable())
        )->where(
            $selectQuery->expr->in(
                $connection->quoteColumn('filename'),
                array_map(
                    array($this, 'removeMimeFromPath'),
                    $files
                )
            )
        )->groupBy(
            $connection->quoteColumn('filename'),
            $connection->quoteColumn('mime_type')
        );

        $statement = $selectQuery->prepare();
        $statement->execute();

        $countMap = array();
        foreach ($statement->fetchAll(\PDO::FETCH_ASSOC) as $row) {
            $path = $this->prependMimeToPath($row['filename'], $row['mime_type']);
            $countMap[$path] = (int)$row['count'];
        }

        // Complete counts
        foreach ($files as $path) {
            // This is already the correct path
            if (!isset($countMap[$path])) {
                $countMap[$path] = 0;
            }
        }

        return $countMap;
    }
505134
protected function filterExistingFiles(array $files, array $existingFiles)
    {
        return array_where($files, function ($value, $key) use ($existingFiles) {
            if (is_array($value)) {
                return in_array($key, $existingFiles);
            }

            return in_array($value, $existingFiles);
        });
    }
1194684
protected function getBinaryFileFields(array $collectedFields)
    {
        $filtered = [];
        foreach ($collectedFields as $identifier => $value) {
            if ($value instanceof BinaryFile) {
                $filtered[] = $value;
            }
        }

        return empty($filtered) ? null : $filtered;
    }
1022491
public function getUploadedFiles()
    {
        $files = [];

        foreach (self::normailizeUploadedFiles($this->files) as $key => $file) {
            if (isset($file['name'])) {
                $files[$key] = new UploadedFile($file);
            } else {
                foreach ($file as $f) {
                    if ('' === $f['name']) {
                        continue;
                    }

                    $files[$key][] = new UploadedFile($f);
                }
            }
        }

        return $files;
    }
780887
protected function getFiles( array $files )
	{
		$list = [];

		foreach( $files as $key => $value )
		{
			if( $value instanceof \Symfony\Component\HttpFoundation\File\UploadedFile )
			{
				$list[$key] = new \Zend\Diactoros\UploadedFile(
					$value->getRealPath(),
					$value->getSize(),
					$value->getError(),
					$value->getClientOriginalName(),
					$value->getClientMimeType()
				);
			}
			elseif( is_array( $value ) )
			{
				$list[$key] = $this->getFiles( $value );
			}
		}

		return $list;
	}
1335170
public function syncRelated(PersistenceContext $context, array $modifiedColumns, array $children) : array
    {
        return $this->bulkUpdateForeignKeys($context, $modifiedColumns, $children);
    }