Documentation

Markers

Table of Contents

src/Conf/AppConf.php 4
src/Constraint/Type/ArrayModel.php 2
src/Constraint/Type/DataArrayModel.php 1
src/Constraint/Type/EntityListModel.php 1
src/Constraint/Type/EntityModel.php 3
src/Constraint/Type/IModel.php 1
src/Constraint/Type/ListModel.php 1
src/Constraint/Type/StringEnumModel.php 1
src/Constraint/Value/EnumConstraint.php 1
src/Constraint/Value/INotNullConstraint.php 1
src/Database/DbEntityManager.php 5
src/DataStructures/AppObject.php 3
src/DataStructures/AppPosIntArray.php 2
src/DataStructures/Factory/CollectionFactory.php 3
src/DataStructures/ImmutableArray.php 2
src/DataStructures/Page.php 3
src/DataStructures/Slug.php 3
src/File/FileService.php 3
src/Form/Conf/FormConfFactory.php 2
src/Form/Conf/FormFieldConf.php 2
src/Form/Defaults/SlugDefaultCallable.php 1
src/Form/Transformer/AbstractNamedTransformer.php 1
src/Form/Transformer/IFormTransformer.php 1
src/Form/Transformer/ImgFileTransformer.php 1
src/Http/Controller/IController.php 1
src/Http/Controller/IRoutedController.php 3
src/Http/DataStructures/IPageConf.php 1
src/Http/DataStructures/RouteDef.php 1
src/Http/Factory/PageFactory.php 1
src/Http/Routing/EntPageTitleFormatter.php 2
src/Http/Routing/Route.php 2
src/Http/Routing/Router.php 2
src/Http/Security/CspNonce.php 1
src/Repo/IRepo.php 1
src/SearchEngine/SearchQuery.php 1
src/Session/SessionManager.php 3
src/Validation/Violation/IndividualViolation.php 2

AppConf.php

Type Line Description
TODO 26 Add appName setting.
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?

ArrayModel.php

Type Line Description
TODO 19 Check that property keys are strings.
TODO 46 Rename to keep, pick, or select.

DataArrayModel.php

Type Line Description
TODO 29 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?

StringEnumModel.php

Type Line Description
TODO 20 ci_cd Tell Phpstan for support for generic in backed enums (e.g. BackedEnum<string>).

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 35 Could be renamed to DbEntityFactory / DbArrayFactory.
TODO 51 Wait for PHPStan to support recursive types to define apparray type.
TODO 51 Wait for PHPStan to understand that concatenation of non-decimal-int-string is non-decimal-int-string.
TODO 145 Create type for dbRows, as a list of associative arrays?
TODO 145 Throw exception is passed array is empty.

AppObject.php

Type Line Description
TODO 19 Force a certain naming style for property keys?
TODO 87 Could return true even if two objects are not of the same class but both inherit from AppObject.
TODO 87 Do we need this method?

AppPosIntArray.php

Type Line Description
TODO 18 Add tests
TODO 18 Maybe not necessary, could be done with PHPStan?

CollectionFactory.php

Type Line Description
TODO 54 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 115 Return AppObject instead?
TODO 115 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 374 Delete?

Page.php

Type Line Description
TODO 15 Should go in Http namespace?
TODO 15 Remove accessor methods?
TODO 21 Url should be handled by routes? At least it should be computed there.

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 47 Assume that filenames are one-byte encoded.
TODO 47 Assume that filenames are in lowercase.
TODO 47 Hard-coded file extensions.

FormConfFactory.php

Type Line Description
TODO 38 Create FormConf class? Inheriting AppObject or using traits?
TODO 121 Type hint with callable instead of Closure?

FormFieldConf.php

Type Line Description
TODO 38 Use enum for type, with support for file and image to determine accept?
TODO 38 For $values, create struct for items? (with keys 'value' and 'text' or 'label')

SlugDefaultCallable.php

Type Line Description
TODO 14 Should implement IDefaultCallable<string>

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 69 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 create(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())`.

IPageConf.php

Type Line Description
TODO 12 Rename?

RouteDef.php

Type Line Description
TODO 28 Make it implement ArrayAccess to access sub-route definitions.

PageFactory.php

Type Line Description
TODO 31 Find a way to type that return type depends on routedef's pageTitle type.

EntPageTitleFormatter.php

Type Line Description
TODO 57 Should be moved to its own class or as a global function?
TODO 57 Should return Err instead.

Route.php

Type Line Description
TODO 35 Remove def from its properties?
TODO 68 PathSegList?

Router.php

Type Line Description
TODO 41 Create SegsList type?
TODO 41 Always return a route. RoutingParamIssue and RouteNotFoundIssue are routes themselves.

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.

Search results