Skip to content

Commit

Permalink
Merge pull request #9086 from kenjis/update-contributing
Browse files Browse the repository at this point in the history
docs: update contributing Pull Request
  • Loading branch information
kenjis authored Jul 30, 2024
2 parents 9c99605 + f5a2654 commit 18ba6f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
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

0 comments on commit 18ba6f2

Please sign in to comment.