From 8c2f1d768344a1e3e0a0240516ee54c377e1bb26 Mon Sep 17 00:00:00 2001 From: Brown Date: Thu, 11 Jun 2020 13:40:28 -0400 Subject: [PATCH] Fix capitalisation --- docs/running_psalm/configuration.md | 8 ++++---- docs/running_psalm/plugins/plugins_type_system.md | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/running_psalm/configuration.md b/docs/running_psalm/configuration.md index 329f329cb..8cf984cc5 100644 --- a/docs/running_psalm/configuration.md +++ b/docs/running_psalm/configuration.md @@ -34,7 +34,7 @@ Configuration file may be split into several files using [XInclude](https://www. ``` -## Optional `` attributes +## Optional <psalm /> attributes ### Coding style @@ -253,7 +253,7 @@ When `true`, Psalm will attempt to find all unused code (including unused variab loadXdebugStub="[bool]" > ``` -If not present, Psalm will only load the Xdebug stub if psalm has unloaded the extension. +If not present, Psalm will only load the Xdebug stub if Psalm has unloaded the extension. When `true`, Psalm will load the Xdebug extension stub (as the extension is unloaded when Psalm runs). Setting to `false` prevents the stub from loading. @@ -271,7 +271,7 @@ When `true`, Psalm will complain when referencing an explicit string offset on a phpVersion="[string]" > ``` -Set the php version psalm should assume when checking and/or fixing the project. If this attribute is not set, psalm uses the declaration in `composer.json` if one is present. It will check against the earliest version of PHP that satisfies the declared `php` dependency +Set the php version Psalm should assume when checking and/or fixing the project. If this attribute is not set, Psalm uses the declaration in `composer.json` if one is present. It will check against the earliest version of PHP that satisfies the declared `php` dependency This can be overridden on the command-line using the `--php-version=` flag which takes the highest precedence over both the `phpVersion` setting and the version derived from `composer.json`. @@ -284,7 +284,7 @@ This can be overridden on the command-line using the `--php-version=` flag which When `true`, Psalm will skip checking classes, variables and functions after it comes across an `include` or `require` it cannot resolve. This allows code to reference functions and classes unknown to Psalm. -For backwards compatibility, this defaults to `true`, but if you do not rely on dynamically generated includes to cause classes otherwise unknown to psalm to come into existence, it's recommended you set this to `false` in order to reliably detect errors that would be fatal to PHP at runtime. +For backwards compatibility, this defaults to `true`, but if you do not rely on dynamically generated includes to cause classes otherwise unknown to Psalm to come into existence, it's recommended you set this to `false` in order to reliably detect errors that would be fatal to PHP at runtime. ### Running Psalm diff --git a/docs/running_psalm/plugins/plugins_type_system.md b/docs/running_psalm/plugins/plugins_type_system.md index 33938bcca..5096b27c1 100644 --- a/docs/running_psalm/plugins/plugins_type_system.md +++ b/docs/running_psalm/plugins/plugins_type_system.md @@ -185,9 +185,9 @@ new TNamedObject('Foo\Bar\SomeClass') Types within Psalm are always wrapped in a union as a convenience feature. Almost anywhere you may expect a type, you can get a union as well (property types, return types, argument types, etc). So wrapping a single atomic type (like TInt) in a union container allows to uniformly handle that type elsewhere, without repetitive checks like this: ``` php -if ($type instanceof Union) - foreach ($types->getTypes() as $atomic) - handleAtomic($atomic); +if ($type instanceof Union) + foreach ($types->getTypes() as $atomic) + handleAtomic($atomic); else handleAtomic($type); // with union container it becomes @@ -208,7 +208,7 @@ More complex types can be constructed as follows. The following represents an as 'key_3' => new Union([new TBool()])])]); ``` -The Type object includes some static helper methods, which automatically wrap the type in a Union. Thus this can be written more tersely: +The Type object includes some static helper methods, which automatically wrap the type in a Union. Thus this can be written more tersely: ``` php new Union([ @@ -228,6 +228,6 @@ Another way of creating these instances is to use the class `Psalm\Type` which i \Psalm\Type::parseString('int|null'); ``` -You can find how psalm would represent a given type as objects, by specifying the type as an input to this function, and calling `var_dump` on the result. +You can find how Psalm would represent a given type as objects, by specifying the type as an input to this function, and calling `var_dump` on the result.