mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
feat(presets): more rules
This commit is contained in:
@ -15,15 +15,15 @@ final class Base extends AbstractPreset
|
|||||||
public function execute(): void
|
public function execute(): void
|
||||||
{
|
{
|
||||||
$this->expectations[] = expect([
|
$this->expectations[] = expect([
|
||||||
|
'debug_zval_dump',
|
||||||
|
'debug_backtrace',
|
||||||
|
'debug_print_backtrace',
|
||||||
'dd',
|
'dd',
|
||||||
'ddd',
|
'ddd',
|
||||||
'dump',
|
'dump',
|
||||||
'ray',
|
'ray',
|
||||||
'die',
|
'die',
|
||||||
'var_dump',
|
'var_dump',
|
||||||
'sleep',
|
|
||||||
'usleep',
|
|
||||||
'exit',
|
|
||||||
'phpinfo',
|
'phpinfo',
|
||||||
'echo',
|
'echo',
|
||||||
'print',
|
'print',
|
||||||
|
|||||||
25
src/ArchPresets/Laravel.php
Normal file
25
src/ArchPresets/Laravel.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Pest\ArchPresets;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
final class Laravel extends AbstractPreset
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Executes the arch preset.
|
||||||
|
*/
|
||||||
|
public function execute(): void
|
||||||
|
{
|
||||||
|
$this->expectations[] = expect([
|
||||||
|
'env',
|
||||||
|
])->not->toBeUsed();
|
||||||
|
|
||||||
|
$this->expectations[] = expect([
|
||||||
|
'exit',
|
||||||
|
])->not->toBeUsed();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -15,6 +15,11 @@ final class Strict extends AbstractPreset
|
|||||||
public function execute(): void
|
public function execute(): void
|
||||||
{
|
{
|
||||||
foreach ($this->userNamespaces as $namespace) {
|
foreach ($this->userNamespaces as $namespace) {
|
||||||
|
$this->expectations[] = expect([
|
||||||
|
'sleep',
|
||||||
|
'usleep',
|
||||||
|
])->not->toBeUsed();
|
||||||
|
|
||||||
$this->expectations[] = expect($namespace)
|
$this->expectations[] = expect($namespace)
|
||||||
->toUseStrictTypes();
|
->toUseStrictTypes();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user