diff --git a/.cspell-project-words.txt b/.cspell-project-words.txt new file mode 100644 index 0000000000000000000000000000000000000000..43ba845c9a4292856d7fab51e99862a48b820566 --- /dev/null +++ b/.cspell-project-words.txt @@ -0,0 +1 @@ +lakedrops diff --git a/BaseHandler.php b/BaseHandler.php index f3f92df29a297e1939d133b011083945fcce642c..f24f1228bde3d81f48c8cdec7c7cfc3ad7addd08 100644 --- a/BaseHandler.php +++ b/BaseHandler.php @@ -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); } diff --git a/BaseHandlerInterface.php b/BaseHandlerInterface.php index 347d08ec8623549efc5b8ef121e5c2671e0fe46a..85d3e5e840c0798f24b4dd72018ca34791c3d170 100644 --- a/BaseHandlerInterface.php +++ b/BaseHandlerInterface.php @@ -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. diff --git a/Dotenv.php b/Dotenv.php index f7153683e58896c9e2f454efad4a21d671f2055d..5cf03ab76d08c6b44279f5c0294c8c7a717a40e1 100644 --- a/Dotenv.php +++ b/Dotenv.php @@ -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. diff --git a/NestedArray.php b/NestedArray.php index 1128eb1504de297e85b477bcc1d436b54e56caa4..94626ff97b5b1e5b9a6e213a42dfe1121c1a93b2 100644 --- a/NestedArray.php +++ b/NestedArray.php @@ -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 */ diff --git a/Utils.php b/Utils.php index d2dd3b273717692cd50bc3b5a39411b0b0167343..8385604c37d659bfafb1bbc732e967e35cc308f8 100644 --- a/Utils.php +++ b/Utils.php @@ -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));