Markers
Table of Contents
AppConf.php
| Type | Line | Description |
|---|---|---|
| TODO | 25 | Add appName setting. |
| TODO | 71 | Add JSON_THROW_ON_ERROR everywhere, and automatically check its presence. |
| TODO | 71 | Rename to "createFromFolderPath" or something like it. |
| TODO | 98 | Create model for configuration, and check it is valid? (Would make testing harder.) |
| TODO | 98 | Accept an array and create a model from it? |
RouteDef.php
| Type | Line | Description |
|---|---|---|
| TODO | 26 | Make it implement ArrayAccess to access sub-route definitions. |
| TODO | 38 | What happens when an object argument has a default??? |
ArrayModel.php
| Type | Line | Description |
|---|---|---|
| TODO | 19 | Check that property keys are strings. |
DataArrayModel.php
| Type | Line | Description |
|---|---|---|
| TODO | 30 | Find a better name? |
| TODO | 30 | Use clone? |
EntityListModel.php
| Type | Line | Description |
|---|---|---|
| TODO | 15 | Create IListModel interface for lists, with certain constraints like size. |
EntityModel.php
| Type | Line | Description |
|---|---|---|
| TODO | 17 | Disallow sub EntityModel sub properties that are not contained within a ForeignEntityModel? |
| TODO | 17 | Check all property keys are snake_case. |
| TODO | 27 | Check that property keys are strings. |
IModel.php
| Type | Line | Description |
|---|---|---|
| TODO | 42 | Type models can be seen as constraints, and it would be more consistent to have IModel renamed to ITypeConstraint and implementing IConstraint. |
ListModel.php
| Type | Line | Description |
|---|---|---|
| TODO | 13 | Rename to ScalarListModel? Merge with EntityListModel? |
EnumConstraint.php
| Type | Line | Description |
|---|---|---|
| TODO | 12 | For now, it only works with string-backed enums. |
INotNullConstraint.php
| Type | Line | Description |
|---|---|---|
| TODO | 14 | Delete and only keep NotNullConstraint? |
DbEntityManager.php
| Type | Line | Description |
|---|---|---|
| TODO | 32 | Could be renamed to DbEntityFactory / DbArrayFactory. |
| TODO | 48 | Wait for PHPStan to support recursive types to define apparray type. |
| TODO | 48 | Wait for PHPStan to understand that concatenation of non-decimal-int-string is non-decimal-int-string. |
| TODO | 135 | Create type for dbRows, as a list of associative arrays? |
| TODO | 135 | Throw exception is passed array is empty. |
AppObject.php
| Type | Line | Description |
|---|---|---|
| TODO | 19 | Force a certain naming style for property keys? |
| TODO | 97 | Could return true even if two objects are not of the same class but both inherit from AppObject. |
| TODO | 97 | Do we need this method? |
CollectionFactory.php
| Type | Line | Description |
|---|---|---|
| TODO | 52 | Delete this method, make AppObject (and AppList) handle it, this would result in less imports (CollectionFactory), more predictable (AppObjects and AppArrays never store arrays), stronger typing (null|scalar|object instead of mixed). |
| TODO | 90 | Return AppObject instead? |
| TODO | 90 | Wait for PHPStan to fix issue and remove ignore of return.type. |
ImmutableArray.php
| Type | Line | Description |
|---|---|---|
| TODO | 33 | Should not contain references to AppObject or AppList. |
| TODO | 357 | Delete? |
Page.php
| Type | Line | Description |
|---|---|---|
| TODO | 11 | Should go in Http namespace? |
| TODO | 11 | Remove accessor methods? |
Slug.php
| Type | Line | Description |
|---|---|---|
| TODO | 16 | Add tests with some sort of fuzzing. |
| TODO | 16 | Do not use dependency? |
| TODO | 16 | web namespace? |
FileService.php
| Type | Line | Description |
|---|---|---|
| TODO | 85 | Assume that filenames are one-byte encoded. |
| TODO | 85 | Assume that filenames are in lowercase. |
| TODO | 85 | Hard-coded file extensions. |
FormConfFactory.php
| Type | Line | Description |
|---|---|---|
| TODO | 37 | Create FormConf class? Inheriting AppObject or using traits? |
| TODO | 112 | Type hint with callable instead of Closure? |
FormFieldConf.php
| Type | Line | Description |
|---|---|---|
| TODO | 29 | Use enum for type, with support for file and image to determine accept? |
| TODO | 29 | For $values, create struct for items? (with keys 'value' and 'text' or 'label') |
SlugDefaultCallable.php
| Type | Line | Description |
|---|---|---|
| TODO | 14 | Should implement IDefaultCallable<string> |
FormFactory.php
| Type | Line | Description |
|---|---|---|
| TODO | 62 | To delete? |
AbstractNamedTransformer.php
| Type | Line | Description |
|---|---|---|
| TODO | 17 | Use PHP8.4 notation |
IFormTransformer.php
| Type | Line | Description |
|---|---|---|
| TODO | 15 | Add tests, with fuzzing. |
ImgFileTransformer.php
| Type | Line | Description |
|---|---|---|
| TODO | 63 | Handle multiple filenames. |
IController.php
| Type | Line | Description |
|---|---|---|
| TODO | 19 | $serverParams was added so that the error could passed to and displayed by the error page, but actually it might have sufficed to have created an IErrorController interface or something like it. |
IRoutedController.php
| Type | Line | Description |
|---|---|---|
| TODO | 19 | Add getPage(Route $route) method? |
| TODO | 19 | Errors should also be routed controllers? |
| TODO | 19 | Shoud have a different method for GET and POST? This could make each function lighter and would avoid duplicating `if ('POST' === $request->getMethod())`. |
PageConf.php
| Type | Line | Description |
|---|---|---|
| TODO | 10 | Maybe RouteDef's fqcn and fqcnIfParams could be moved there. |
| TODO | 16 | Maybe there is no reason that baseUrl is there, maybe it should be in router. |
PageEntConf.php
| Type | Line | Description |
|---|---|---|
| TODO | 19 | Make $repoFqcn nullable? Would make no sense as it is PageEntConf. |
PageFactory.php
| Type | Line | Description |
|---|---|---|
| TODO | 26 | Find a way to type that return type depends on routedef's pageTitle type. |
EntPageTitleFormatter.php
| Type | Line | Description |
|---|---|---|
| TODO | 53 | Should be moved to its own class or as a global function? |
| TODO | 53 | Should return Err instead. |
Route.php
| Type | Line | Description |
|---|---|---|
| TODO | 37 | PathSegList? |
| TODO | 117 | Should the root route return "/"? On one hand, it makes everything more consistent (a path always begins with "/"), on the other hand it makes it harder to generate a canonical URL for the home. (example.org instead of example.org/). |
Router.php
| Type | Line | Description |
|---|---|---|
| TODO | 52 | Create SegsList type? |
CspNonce.php
| Type | Line | Description |
|---|---|---|
| TODO | 12 | Should be part of the server request or something similar. |
IRepo.php
| Type | Line | Description |
|---|---|---|
| TODO | 24 | Add findAll, findOne? |
SearchQuery.php
| Type | Line | Description |
|---|---|---|
| TODO | 28 | Use Ds\Set. |
SessionManager.php
| Type | Line | Description |
|---|---|---|
| TODO | 15 | Should be moved to Http? Would make it easier to Http to access the session, but Session does not need to access Http. Besides, Form only relies on Session but does not rely on Http. |
| TODO | 36 | Magic string. |
| TODO | 89 | Should not accept null. |
IndividualViolation.php
| Type | Line | Description |
|---|---|---|
| TODO | 14 | Should be moved to Validator namespace. |
| TODO | 14 | A code or enum should be added. |