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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ Documentation is available at: https://docs.dotkernel.org/light-documentation/
[![Continuous Integration](https://github.com/dotkernel/light/actions/workflows/continuous-integration.yml/badge.svg?branch=1.0)](https://github.com/dotkernel/light/actions/workflows/continuous-integration.yml)
[![codecov](https://codecov.io/gh/dotkernel/light/graph/badge.svg?token=UpVJ5ELvfZ)](https://codecov.io/gh/dotkernel/light)
[![Qodana](https://github.com/dotkernel/light/actions/workflows/qodana_code_quality.yml/badge.svg)](https://github.com/dotkernel/light/actions/workflows/qodana_code_quality.yml)

[![PHPStan](https://github.com/dotkernel/light/actions/workflows/static-analysis.yml/badge.svg?branch=1.0)](https://github.com/dotkernel/light/actions/workflows/static-analysis.yml)
![PHPstan Level](https://img.shields.io/badge/PHPStan-level%208-brightgreen)

## Installing Dotkernel `light`

Expand Down
3 changes: 3 additions & 0 deletions bin/composer-post-install-script.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

// phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols

/**
* @param array{source: string, destination: string} $file
*/
function copyFile(array $file): void
{
if (is_readable($file['destination'])) {
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
parameters:
level: 5
level: 8
paths:
- bin
- config
Expand Down
22 changes: 22 additions & 0 deletions src/App/src/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@

class ConfigProvider
{
/**
@return array{
* dependencies: array<mixed>,
* templates: array<mixed>,
* }
*/
public function __invoke(): array
{
return [
Expand All @@ -18,6 +24,12 @@ public function __invoke(): array
];
}

/**
* @return array{
* delegators: array<class-string, array<class-string>>,
* factories: array<class-string, class-string>,
* }
*/
public function getDependencies(): array
{
return [
Expand All @@ -32,6 +44,16 @@ public function getDependencies(): array
];
}

/**
* @return array{
* paths: array{
* app: array{literal-string&non-falsy-string},
* error: array{literal-string&non-falsy-string},
* layout: array{literal-string&non-falsy-string},
* partial: array{literal-string&non-falsy-string},
* }
* }
*/
public function getTemplates(): array
{
return [
Expand Down
18 changes: 18 additions & 0 deletions src/Page/src/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@

class ConfigProvider
{
/**
@return array{
* dependencies: array<mixed>,
* templates: array<mixed>,
* }
*/
public function __invoke(): array
{
return [
Expand All @@ -21,6 +27,13 @@ public function __invoke(): array
];
}

/**
@return array{
* delegators: array<class-string, array<class-string>>,
* factories: array<class-string, class-string>,
* aliases: array<class-string, class-string>
* }
*/
public function getDependencies(): array
{
return [
Expand All @@ -39,6 +52,11 @@ public function getDependencies(): array
];
}

/**
@return array{
* paths: array{page: array{literal-string&non-falsy-string}}
* }
*/
public function getTemplates(): array
{
return [
Expand Down
1 change: 1 addition & 0 deletions test/Unit/App/ConfigProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

class ConfigProviderTest extends TestCase
{
/** @var array<string, array<string, mixed>>*/
protected array $config = [];

protected function setup(): void
Expand Down
1 change: 1 addition & 0 deletions test/Unit/Page/ConfigProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

class ConfigProviderTest extends TestCase
{
/** @var array<string, array<string, mixed>>*/
protected array $config = [];

protected function setup(): void
Expand Down
Loading