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