src/Transformer.php
public function transform(string $target)
    {
        if ($this->filesystem->isFile($target)) {
            $this->doTransform($target);

            return;
        }

        $files = $this->filesystem->allFiles($target);

        array_walk($files, function (SplFileInfo $file) {
            $this->doTransform($file->getRealPath());
        });
    }
public function transform(string $target)
    {
        if ($this->filesystem->isFile($target)) {
            $this->doTransform($target);

            return;
        }

        $files = $this->filesystem->allFiles($target);

        array_walk($files, function (SplFileInfo $file) {
            $this->doTransform($file->getRealPath());
        });
    }
public function transform ( string $ target ) { if ( $ this -> filesystem -> isFile ( $ target ) ) { $ this -> doTransform ( $ target ) ; return ; } $ files = $ this -> filesystem -> allFiles ( $ target ) ; array_walk ( $ files , function ( SplFileInfo $ file ) { $ this -> doTransform ( $ file -> getRealPath ( ) ) ; } ) ; }
Transform a file or directory recursively.

@todo Skip non-php files.

@param string $target Path to the target file or directory.

@return void
Transform a file or directory recursively .