src/Templates/Template.php
public function storeOnDisc( $name, $namespace, $contents, $directory ) {
		$filepath = implode( DIRECTORY_SEPARATOR, [$directory, 'app', 'src', $namespace, $name . '.php'] );

		if ( file_exists( $filepath ) ) {
			throw new InvalidArgumentException( 'Class file already exists (' . $filepath . ')' );
		}

		file_put_contents( $filepath, $contents );

		return $filepath;
	}
public function storeOnDisc( $name, $namespace, $contents, $directory ) {
		$filepath = implode( DIRECTORY_SEPARATOR, [$directory, 'app', 'src', $namespace, $name . '.php'] );

		if ( file_exists( $filepath ) ) {
			throw new InvalidArgumentException( 'Class file already exists (' . $filepath . ')' );
		}

		file_put_contents( $filepath, $contents );

		return $filepath;
	}
public function storeOnDisc ( $ name , $ namespace , $ contents , $ directory ) { $ filepath = implode ( DIRECTORY_SEPARATOR , [ $ directory , 'app' , 'src' , $ namespace , $ name . '.php' ] ) ; if ( file_exists ( $ filepath ) ) { throw new InvalidArgumentException ( 'Class file already exists (' . $ filepath . ')' ) ; } file_put_contents ( $ filepath , $ contents ) ; return $ filepath ; }
Store file on disc returning the filepath

@param  string $name
@param  string $namespace
@param  string $contents
@param  string $directory
@return string
Store file on disc returning the filepath