src/CodeGeneration/PostProcessor/FileOverrider.php
public function updateOverrideFiles(): array
    {
        $filesUpdated = [];
        $fileSame     = [];
        foreach ($this->getOverridesIterator() as $pathToFileInOverrides) {
            $relativePathToFileInProject = $this->getRelativePathInProjectFromOverridePath($pathToFileInOverrides);
            if ($this->projectFileIsSameAsOverride($pathToFileInOverrides)) {
                $fileSame[] = $relativePathToFileInProject;
                continue;
            }
            $pathToFileInProject = $this->pathToProjectRoot . $relativePathToFileInProject;
            if (false === is_file($pathToFileInProject)) {
                throw new \RuntimeException('path ' . $pathToFileInProject . ' is not a file');
            }
            copy($pathToFileInProject, $pathToFileInOverrides);
            $filesUpdated[] = $relativePathToFileInProject;
        }

        return [$this->sortFiles($filesUpdated), $this->sortFiles($fileSame)];
    }
public function updateOverrideFiles(): array
    {
        $filesUpdated = [];
        $fileSame     = [];
        foreach ($this->getOverridesIterator() as $pathToFileInOverrides) {
            $relativePathToFileInProject = $this->getRelativePathInProjectFromOverridePath($pathToFileInOverrides);
            if ($this->projectFileIsSameAsOverride($pathToFileInOverrides)) {
                $fileSame[] = $relativePathToFileInProject;
                continue;
            }
            $pathToFileInProject = $this->pathToProjectRoot . $relativePathToFileInProject;
            if (false === is_file($pathToFileInProject)) {
                throw new \RuntimeException('path ' . $pathToFileInProject . ' is not a file');
            }
            copy($pathToFileInProject, $pathToFileInOverrides);
            $filesUpdated[] = $relativePathToFileInProject;
        }

        return [$this->sortFiles($filesUpdated), $this->sortFiles($fileSame)];
    }
public function updateOverrideFiles ( ) : array { $ filesUpdated = [ ] ; $ fileSame = [ ] ; foreach ( $ this -> getOverridesIterator ( ) as $ pathToFileInOverrides ) { $ relativePathToFileInProject = $ this -> getRelativePathInProjectFromOverridePath ( $ pathToFileInOverrides ) ; if ( $ this -> projectFileIsSameAsOverride ( $ pathToFileInOverrides ) ) { $ fileSame [ ] = $ relativePathToFileInProject ; continue ; } $ pathToFileInProject = $ this -> pathToProjectRoot . $ relativePathToFileInProject ; if ( false === is_file ( $ pathToFileInProject ) ) { throw new \ RuntimeException ( 'path ' . $ pathToFileInProject . ' is not a file' ) ; } copy ( $ pathToFileInProject , $ pathToFileInOverrides ) ; $ filesUpdated [ ] = $ relativePathToFileInProject ; } return [ $ this -> sortFiles ( $ filesUpdated ) , $ this -> sortFiles ( $ fileSame ) ] ; }
Loop over all the override files and update with the file contents from the project

@return array[] the file paths that have been updated
Loop over all the override files and update with the file contents from the project