|
10 | 10 | * For the full copyright and license information, please view |
11 | 11 | * the LICENSE file that was distributed with this source code. |
12 | 12 | */ |
13 | | - |
| 13 | +use Boundwize\StructArmed\Rule\Rules\Function_\MustHaveReturnTypeFunctionRule; |
14 | 14 | use Boundwize\StructArmed\Preset\Presets\CodeQualityPreset; |
15 | 15 | use CodeIgniter\Cache\ResponseCache; |
16 | 16 | use CodeIgniter\HTTP\CLIRequest; |
|
52 | 52 | ]) |
53 | 53 | ->cacheDirectory(is_dir('/tmp') ? '/tmp/structarmed' : null) |
54 | 54 | ->withPresets(Preset::PSR4(), Preset::CODEQUALITY()) |
| 55 | + |
| 56 | + ->layer('Helpers', __DIR__ . '/system/Helpers') |
| 57 | + ->rule('helpers.functions_must_have_return_type', new MustHaveReturnTypeFunctionRule('Helpers')) |
| 58 | + |
55 | 59 | // Resolve CodeIgniter layers from class names because several layers share directories. |
56 | 60 | ->layerPattern('API', '/^CodeIgniter\\\\API\\\\.*$/') |
57 | 61 | ->layerPattern('Cache', '/^CodeIgniter\\\\Cache\\\\.*$/') |
|
110 | 114 | 'Security' => ['Cookie', 'HTTP', 'I18n', 'Session'], |
111 | 115 | 'Session' => ['Cookie', 'Database', 'HTTP', 'I18n'], |
112 | 116 | 'Throttle' => ['Cache', 'I18n'], |
113 | | - 'Validation' => ['Database', 'HTTP'], |
| 117 | + 'Validation' => ['Database', 'HTTP', 'Helpers'], |
114 | 118 | 'View' => ['Cache'], |
115 | 119 | ]) |
116 | 120 | ->skipPathsForRuleset(['*test*']) |
|
0 commit comments