Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • composer/library/composer-json-utils
1 result
Show changes
Commits on Source (3)
lakedrops
......@@ -179,7 +179,7 @@ abstract class BaseHandler implements BaseHandlerInterface {
/**
* {@inheritdoc}
*/
public function git(string $command, string $path = NULL): void {
public function git(string $command, ?string $path = NULL): void {
Utils::git($command, $path);
}
......
......@@ -14,7 +14,7 @@ use Symfony\Component\Console\Input\InputInterface;
interface BaseHandlerInterface {
/**
* Provides the cofig Id.
* Provides the config Id.
*
* @return string
* The config Id.
......@@ -28,7 +28,7 @@ interface BaseHandlerInterface {
* The composer event.
*
* @return self
* This hanlder.
* This handler.
*/
public function setEvent(Event $event): BaseHandlerInterface;
......@@ -39,7 +39,7 @@ interface BaseHandlerInterface {
* The input handler.
*
* @return self
* This hanlder.
* This handler.
*/
public function setInput(InputInterface $input): BaseHandlerInterface;
......@@ -94,7 +94,7 @@ interface BaseHandlerInterface {
* @param string|null $path
* Optional path into which to chdir before executing command.
*/
public function git(string $command, string $path = NULL): void;
public function git(string $command, ?string $path = NULL): void;
/**
* Add the given pattern to gitignore if necessary.
......
......@@ -198,7 +198,7 @@ final class Dotenv {
* @param string $item
* String in which to replace environment variable placeholders.
* @param array $matches
* List of environment vairables to replace in the given string.
* List of environment variables to replace in the given string.
*
* @return string
* The string with replaced environment variables.
......
......@@ -3,7 +3,7 @@
namespace LakeDrops\Component\Composer;
/**
* Provides helper functions to deal with neted arrays.
* Provides helper functions to deal with nested arrays.
*
* @package LakeDrops\Docker4Drupal
*/
......
......@@ -26,7 +26,7 @@ final class Utils {
*/
protected static function gitInit(): void {
if (!file_exists('.git')) {
passthru(escapeshellcmd('git init'));
passthru(escapeshellcmd('git init --initial-branch=develop'));
}
}
......@@ -38,7 +38,7 @@ final class Utils {
* @param string|null $path
* The optional path where to execute the git command.
*/
public static function git(string $command, string $path = NULL): void {
public static function git(string $command, ?string $path = NULL): void {
self::gitInit();
$prefix = $path === NULL ? '' : 'cd ' . $path . ' && ';
passthru($prefix . escapeshellcmd('git -c "user.email=composer@lakedrops.com" ' . $command));
......