Skip to content

Commit 97a729b

Browse files
committed
Merge remote-tracking branch 'origin/dev' into wpstarter-next
2 parents 36f2366 + 9c6ab1b commit 97a729b

File tree

10 files changed

+14
-14
lines changed

10 files changed

+14
-14
lines changed

docs/02-Environment-Variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ By convention those files are often named `.env`.
6464

6565
## PHP and env vars
6666

67-
In PHP there are two functions: [`getevn`](http://php.net/manual/en/function.getenv.php) and [`putenv`](http://php.net/manual/en/function.getenv.php) that allow to, respectively, read and write env vars on the server in an OS-agnostic way.
67+
In PHP there are two functions: [`getenv`](http://php.net/manual/en/function.getenv.php) and [`putenv`](http://php.net/manual/en/function.getenv.php) that allow to, respectively, read and write env vars on the server in an OS-agnostic way.
6868

6969
There's nothing in PHP core that parse env files, but is no surprise that there are different libraries to do that.
7070

@@ -159,7 +159,7 @@ WP Starter supports an environment variable called `WP_STARTER_ENV_TO_CONST` con
159159
WP_STARTER_ENV_TO_CONST="AWESOME_PLUGIN_CONFIG,ANOTHER_VAR,YET_ANOTHER"
160160
```
161161

162-
With such env variable set, WP Start will declare constants for the three env variables.
162+
With such env variable set, WP Starter will declare constants for the three env variables.
163163

164164
Please note that env variables are always strings, while PHP constants can be any static type. For WordPress constants that is not an issue because WP Starter knows the expected type can cast the value before define the constant. For custom variables a different type can be specified using the `NAME:TYPE` syntax . For example:
165165

docs/03-WordPress-Integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ WP Starter provides an option to register default themes shipped with core packa
7474

7575
There's also the `move-content` option that when set to `true` tells WP Starter to moves the entire `wp-content` folder shipped with a WordPress package into the project's content folder.
7676

77-
If there's no interest in default plugin/themes, the suggested approach is to use the [Root's package]((https://roots.io/)), [wp-downloader](https://github.com/wecodemore/wp-downloader), or a custom package that points to a "*no-content*" WordPress distribution.
77+
If there's no interest in default plugin/themes, the suggested approach is to use the [Root's package](https://roots.io/), [wp-downloader](https://github.com/wecodemore/wp-downloader), or a custom package that points to a "*no-content*" WordPress distribution.
7878

7979

8080

src/Config/Result.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public static function promise(callable $provider): Result
9090
*
9191
* phpcs:disable Inpsyde.CodeQuality.ReturnTypeDeclaration.IncorrectVoidReturn
9292
*/
93-
private function __construct($value = null, \Throwable $error = null)
93+
private function __construct($value = null, ?\Throwable $error = null)
9494
{
9595
// phpcs:enable Inpsyde.CodeQuality.ReturnTypeDeclaration.IncorrectVoidReturn
9696
if ($value instanceof Result) {

src/Env/WordPressEnvBridge.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ public static function loadedVars(): array
347347
/**
348348
* @param Dotenv|null $dotenv
349349
*/
350-
public function __construct(Dotenv $dotenv = null)
350+
public function __construct(?Dotenv $dotenv = null)
351351
{
352352
$this->dotenv = $dotenv;
353353
}

src/Util/WpVersion.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static function normalize(string $version): string
6767
public function __construct(
6868
PackageFinder $packageFinder,
6969
Io $io,
70-
string $fallbackVersion = null
70+
?string $fallbackVersion = null
7171
) {
7272

7373
$this->packageFinder = $packageFinder;

tests/integration/Cli/PhpToolProcessFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ private function assertProcessWorks(PhpToolProcess $process): void
215215
* @return PhpToolProcessFactory
216216
*/
217217
private function factoryPhpToolProcessFactory(
218-
UrlDownloader $urlDownloader = null
218+
?UrlDownloader $urlDownloader = null
219219
): PhpToolProcessFactory {
220220

221221
$composer = $this->factoryComposer();

tests/integration/Cli/WpCliToolTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function testCheckPharError(): void
151151
* @param string|null $cwd
152152
* @return WpCliTool
153153
*/
154-
private function factoryTool(string $cwd = null): WpCliTool
154+
private function factoryTool(?string $cwd = null): WpCliTool
155155
{
156156
return new WpCliTool(
157157
new Config(

tests/src/IntegrationTestCase.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ protected function factoryComposerIo(
142142
* @return Paths
143143
*/
144144
protected function factoryPaths(
145-
string $cwd = null,
145+
?string $cwd = null,
146146
int $verbosity = OutputInterface::VERBOSITY_NORMAL,
147147
string $input = '',
148148
array $extra = []
@@ -171,7 +171,7 @@ protected function factoryPaths(
171171
protected function factoryComposerConfig(
172172
string $input = '',
173173
int $verbosity = OutputInterface::VERBOSITY_NORMAL,
174-
string $cwd = null
174+
?string $cwd = null
175175
): Composer\Config {
176176

177177
return Composer\Factory::createConfig(
@@ -194,7 +194,7 @@ protected function factoryComposer(): Composer\Composer
194194
* @param string $cwd
195195
* @return SystemProcess
196196
*/
197-
protected function factorySystemProcess(string $cwd = null): SystemProcess
197+
protected function factorySystemProcess(?string $cwd = null): SystemProcess
198198
{
199199
return new SystemProcess(
200200
$this->factoryPaths($cwd),
@@ -206,7 +206,7 @@ protected function factorySystemProcess(string $cwd = null): SystemProcess
206206
* @param string $cwd
207207
* @return PhpProcess
208208
*/
209-
protected function factoryPhpProcess(string $cwd = null): PhpProcess
209+
protected function factoryPhpProcess(?string $cwd = null): PhpProcess
210210
{
211211
$php = (new PhpExecutableFinder())->find() ?: 'php';
212212

tests/src/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ protected function factoryLocator(...$objects): Util\Locator
154154
* @param array|null $extra
155155
* @return Util\Paths
156156
*/
157-
protected function factoryPaths(array $extra = null): Util\Paths
157+
protected function factoryPaths(?array $extra = null): Util\Paths
158158
{
159159
$root = $this->fixturesPath() . '/paths-root';
160160

tests/unit/Util/RequirementsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public function testConfigsLoadedFromDefaultFileAreMerged(): void
175175
* @param string $customRoot
176176
* @return mixed
177177
*/
178-
private function executeExtractConfig(array $extra, string $customRoot = null): array
178+
private function executeExtractConfig(array $extra, ?string $customRoot = null): array
179179
{
180180
$tester = \Closure::bind(
181181
function (string $rootPath) use ($extra): array {

0 commit comments

Comments
 (0)