Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions contributing/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ projects outside of CodeIgniter. Basically, this means that any
dependencies should be kept to a minimum. Any dependencies must be able
to be passed into the constructor. If you do need to use one of the
other core packages, you can create that in the constructor using the
`Services` class, as long as you provide a way for dependencies to
`service()` function, as long as you provide a way for dependencies to
override that:

```php
public function __construct(?Foo $foo = null)
{
$this->foo = $foo ?? \Config\Services::foo();
$this->foo = $foo ?? service('foo');
}
```

## Type declarations
## Type Declarations

PHP7 provides [Type declarations](https://www.php.net/manual/en/language.types.declarations.php)
for method parameters and return types. Use it where possible. Return type
Expand Down Expand Up @@ -112,10 +112,9 @@ should generally match the package name.

## Autoloader

All files within the package should be added to
**system/Config/AutoloadConfig.php**, in the "classmap" property. This
is only used for core framework files, and helps to minimize file system
scans and keep performance high.
All source files within the **system/ThirdParty** should be added to
**system/Config/AutoloadConfig.php**, in the `$coreClassmap` property. This
is only used for loading the third party packages without Composer.

## Command-Line Support

Expand Down
4 changes: 2 additions & 2 deletions contributing/pull_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ PHPStan is expected to scan the entire framework by running this command in your
terminal:

```console
vendor/bin/phpstan analyse
composer phpstan:check
```

See also:
Expand All @@ -272,7 +272,7 @@ false positive and should be ignored, the baseline can be updated with the follo
command:

```console
vendor/bin/phpstan analyze --generate-baseline phpstan-baseline.php
composer phpstan:baseline
```

#### Rector
Expand Down