PHP code example of kinetis / framework
1. Go to this page and download the library: Download kinetis/framework library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kinetis / framework example snippets
use Kinetis\Http\Attributes\Body;
use Kinetis\Http\Attributes\Post;
final readonly class UserController
{
#[Post('/users', status: 201)]
public function store(#[Body] CreateUserRequest $data): UserResponse
{
return new UserResponse(name: $data->name, email: $data->email);
}
}
sh
# tests
docker run --rm -v "$PWD":/app -w /app php:8.4-cli-alpine php vendor/bin/phpunit
# static analysis (PHPStan level 8)
docker run --rm -v "$PWD":/app -w /app php:8.4-cli-alpine php vendor/bin/phpstan analyse --no-progress