Skip to content

Commit a7cebf0

Browse files
committed
linting fixes
Signed-off-by: bidi <bidi@apidemia.com>
1 parent 5ec9bdc commit a7cebf0

File tree

6 files changed

+63
-64
lines changed

6 files changed

+63
-64
lines changed

docs/book/v7/core-features/authentication.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,18 +141,18 @@ The response contains a new `access_token` and `refresh_token`:
141141

142142
## Common Issues
143143

144-
**"Invalid credentials" error**
144+
### "Invalid credentials" error
145145

146146
- Check username/password are correct.
147147
- Verify client_id and client_secret match OAuth client in the database.
148148
- Confirm the user account exists and is active.
149149

150-
**"Token has expired" error**
150+
### "Token has expired" error
151151

152152
- Use refresh_token to get a new access_token.
153153
- If refresh_token is expired, re-authenticate with credentials.
154154

155-
**"Invalid scope" error**
155+
### "Invalid scope" error
156156

157157
- Verify `scope` field is set to `"api"` (the only configured scope)
158158

docs/book/v7/installation/composer.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ The automatic setup script performs these tasks:
2121
- Configures PHP CodeSniffer, a utility to detect code style errors in PHP code.
2222
- Generate and save the OAuth2 keys in the `data/oauth` folder.
2323
- Creates the initial `config/autoload` configuration files:
24-
- config/autoload/local.php
25-
- config/autoload/local.test.php
26-
- config/autoload/mail.global.php
24+
- config/autoload/local.php
25+
- config/autoload/local.test.php
26+
- config/autoload/mail.global.php
2727

2828
You should see this text below, along with a long list of packages to be installed instead of the `[...]`.
2929

docs/book/v7/introduction/architecture-at-a-glance.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Location: `src/Core/src/`
2121

2222
You typically don't modify Core unless you're updating system behavior or adding shared infrastructure features.
2323

24-
## App Layer
24+
### App Layer
2525

2626
The **App** is where you build your project-specific features—the "business logic" of your application:
2727

@@ -36,7 +36,7 @@ Location: `src/App/src/`
3636

3737
You spend most development time here, implementing your API's features and business logic.
3838

39-
# Headless CMS Architecture
39+
## Headless CMS Architecture
4040

4141
Dotkernel API is built toward a Headless CMS architecture:
4242

@@ -71,7 +71,7 @@ Dotkernel API is built toward a Headless CMS architecture:
7171
└───────────────────────────────────┘
7272
```
7373

74-
# Modular Design
74+
## Modular Design
7575

7676
Applications are organized into modules, each handling a specific domain.
7777

@@ -85,7 +85,7 @@ Applications are organized into modules, each handling a specific domain.
8585

8686
Custom Modules: You can create your own modules (e.g., Book, Product, Article) following the same pattern.
8787

88-
## Request Flow
88+
### Request Flow
8989

9090
Here's how a typical request flows through Dotkernel API:
9191

@@ -112,9 +112,9 @@ Here's how a typical request flows through Dotkernel API:
112112
5. HTTP Response
113113
```
114114

115-
# Key Components
115+
## Key Components
116116

117-
## Handlers (PSR-15)
117+
### Handlers (PSR-15)
118118

119119
Single-action request handlers instead of multi-action controllers:
120120

@@ -129,7 +129,7 @@ src/User/src/Handler/
129129

130130
Benefits: Separation of concerns, easier testing, clearer intent.
131131

132-
## Services
132+
### Services
133133

134134
The Business logic layer sits between the handlers and repositories:
135135

@@ -143,23 +143,23 @@ Services handle:
143143
- Data transformation
144144
- Cross-cutting concerns (caching, logging)
145145

146-
## Repositories
146+
### Repositories
147147

148148
Data access layer using Doctrine ORM:
149149

150150
- Query building
151151
- Entity persistence
152152
- Database abstraction
153153

154-
## Input Filters
154+
### Input Filters
155155

156156
Request validation using Laminas InputFilter:
157157

158158
```quote
159159
Request → InputFilter → Validation → Handler
160160
```
161161

162-
## Entities
162+
### Entities
163163

164164
Doctrine ORM entities representing database tables:
165165

@@ -169,7 +169,7 @@ Doctrine ORM entities representing database tables:
169169
class User { ... }
170170
```
171171

172-
# Configuration Organization
172+
## Configuration Organization
173173

174174
```quote
175175
config/
@@ -184,7 +184,7 @@ config/
184184
└─ local.php (Environment-specific, ignored by VCS, private config)
185185
```
186186

187-
# Dependency Injection
187+
## Dependency Injection
188188

189189
Dotkernel API uses constructor injection with attributes:
190190

@@ -206,7 +206,7 @@ class UserHandler
206206

207207
Services are automatically resolved and injected by AttributedServiceFactory.
208208

209-
# Data Flow Architecture
209+
## Data Flow Architecture
210210

211211
```quote
212212
┌─────────────────────────────────────────┐
@@ -248,7 +248,7 @@ Services are automatically resolved and injected by AttributedServiceFactory.
248248
└─────────────────────────────────────────┘
249249
```
250250

251-
# Standards & PSRs
251+
## Standards & PSRs
252252

253253
Dotkernel API adheres to PHP standards for interoperability:
254254

@@ -259,7 +259,7 @@ Dotkernel API adheres to PHP standards for interoperability:
259259

260260
This ensures your code can integrate with other PSR-compliant libraries.
261261

262-
# Security Layers
262+
## Security Layers
263263

264264
```quote
265265
┌─────────────────────────────┐
@@ -277,12 +277,12 @@ This ensures your code can integrate with other PSR-compliant libraries.
277277
└─────────────────────────────┘
278278
```
279279

280-
# When to Use Each Layer
280+
## When to Use Each Layer
281281

282-
| Layer | Purpose | Example |
283-
|-------------|:--------------------------:|-------------------------------------:|
284-
| Core | System infrastructure | Authentication, database setup |
285-
| App | Project features | User CRUD operations, custom logic |
286-
| Handler | Request/response mapping | Extract user ID, call service |
287-
| Service | Business rules | Validate user data, calculate totals |
288-
| Repository | Data queries | Find users, save entity |
282+
| Layer | Purpose | Example |
283+
|------------|:------------------------:|-------------------------------------:|
284+
| Core | System infrastructure | Authentication, database setup |
285+
| App | Project features | User CRUD operations, custom logic |
286+
| Handler | Request/response mapping | Extract user ID, call service |
287+
| Service | Business rules | Validate user data, calculate totals |
288+
| Repository | Data queries | Find users, save entity |

docs/book/v7/introduction/introduction.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ Below are some practical use cases (it's by no means an exhaustive list).
2323

2424
Below is a quick overview of features in Dotkernel API and how they interconnect.
2525

26-
| Feature | Purpose | Configuration |
27-
|----------------------|-------------------------------------|------------------------------------------------|
28-
| OAuth2 | Authentication | config/autoload/local.php |
29-
| RBAC | Authorization | config/autoload/authorization.global.php |
30-
| Content Negotiation | Request/response format validation | config/autoload/content-negotiation.global.php |
31-
| OpenAPI/Swagger | API documentation | Auto-generated |
26+
| Feature | Purpose | Configuration |
27+
|---------------------|------------------------------------|------------------------------------------------|
28+
| OAuth2 | Authentication | config/autoload/local.php |
29+
| RBAC | Authorization | config/autoload/authorization.global.php |
30+
| Content Negotiation | Request/response format validation | config/autoload/content-negotiation.global.php |
31+
| OpenAPI/Swagger | API documentation | Auto-generated |
3232

3333
## Doctrine 3 ORM
3434

docs/book/v7/introduction/psr.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
- **Long-Term Maintenance**: PSRs are stable standards maintained by the PHP community, ensuring longevity.
99
- **Code Quality**: Following standards encourages best practices and makes code more maintainable.
1010

11-
## PSRs (PHP Standards Recommendations)
11+
## PHP Standards Recommendations (PSRs)
1212

1313
Dotkernel API adheres to PHP Standards Recommendations (PSRs) established by the PHP-FIG (Framework Interoperability Group). These standards ensure code interoperability and allow Dotkernel API to work seamlessly with other PSR-compliant libraries.
1414

1515
Some PSRs are at the **core** of Dotkernel API's architecture, while others are installed as dependencies through third-party packages.
1616

17-
# Core PSRs (Essential to Dotkernel API)
17+
## Core PSRs (Essential to Dotkernel API)
1818

19-
## PSR-7: HTTP Message Interfaces
19+
### PSR-7: HTTP Message Interfaces
2020

2121
**Repository**: [php-fig/http-message](https://github.com/php-fig/http-message)
2222

@@ -29,7 +29,7 @@ Defines standardized interfaces for HTTP messages (requests and responses) and U
2929
- Allows middleware and handlers to work with consistent interfaces.
3030
- Implemented via `Laminas\Diactoros`.
3131

32-
## PSR-15: HTTP Server Request Handlers and Middleware
32+
### PSR-15: HTTP Server Request Handlers and Middleware
3333

3434
**Repository**: [php-fig/http-server-handler](https://github.com/php-fig/http-server-handler) and [php-fig/http-server-middleware](https://github.com/php-fig/http-server-middleware)
3535

@@ -42,7 +42,7 @@ Defines the interface for HTTP request handlers and middleware components that p
4242
- Middleware pipeline processes requests in a chain.
4343
- Single-action handlers follow this pattern for clean separation of concerns.
4444

45-
## PSR-11: Container Interface
45+
### PSR-11: Container Interface
4646

4747
**Repository**: [php-fig/container](https://github.com/php-fig/container)
4848

@@ -55,9 +55,9 @@ Defines the standard interface for dependency injection containers.
5555
- Enables loose coupling between components.
5656
- Implemented via `Laminas\ServiceManager`.
5757

58-
# Supporting PSRs (Installed via Dependencies)
58+
## Supporting PSRs (Installed via Dependencies)
5959

60-
## PSR-3: Logger Interface
60+
### PSR-3: Logger Interface
6161

6262
**Repository**: [php-fig/log](https://github.com/php-fig/log)
6363

@@ -66,7 +66,7 @@ Provides a standard interface for logging libraries.
6666
**Usage**: Error handling, debugging, audit trails
6767
**Implemented in**: `dotkernel/dot-errorhandler`
6868

69-
## PSR-4: Autoloader
69+
### PSR-4: Autoloader
7070

7171
**Repository**: [php-fig/log](https://github.com/php-fig/log)
7272

@@ -75,7 +75,7 @@ Defines how PHP files are automatically loaded based on namespaces and file path
7575
**Usage**: Automatic class loading without manual `require` statements
7676
**Implemented in**: `Laminas\Loader`
7777

78-
## PSR-6: Caching Interface
78+
### PSR-6: Caching Interface
7979

8080
**Repository**: [php-fig/cache](https://github.com/php-fig/cache)
8181

@@ -84,7 +84,7 @@ Defines standard interfaces for caching systems to improve application performan
8484
**Usage**: Caching query results, configuration, templates
8585
**Implemented in**: `dotkernel/dot-cache`
8686

87-
## PSR-13: Link Definition Interfaces
87+
### PSR-13: Link Definition Interfaces
8888

8989
**Repository**: [php-fig/link](https://github.com/php-fig/link)
9090

@@ -93,7 +93,7 @@ Describes how to represent hypermedia links independently of serialization forma
9393
**Usage**: HAL (Hypertext Application Language) resource links
9494
**Implemented in**: `mezzio/mezzio-hal`
9595

96-
## PSR-14: Event Dispatcher
96+
### PSR-14: Event Dispatcher
9797

9898
**Repository**: [php-fig/event-dispatcher](https://github.com/php-fig/event-dispatcher)
9999

@@ -102,7 +102,7 @@ Mechanism for event-based extension and collaboration between components.
102102
**Usage**: Triggering events on user actions, logging events, notifications
103103
**Implemented in**: Third-party packages as needed
104104

105-
## PSR-17: HTTP Factories
105+
### PSR-17: HTTP Factories
106106

107107
**Repository**: [php-fig/http-factory](https://github.com/php-fig/http-factory)
108108

@@ -111,7 +111,7 @@ Standard for factories that create PSR-7 compliant HTTP objects.
111111
**Usage**: Creating requests, responses, and streams programmatically
112112
**Implemented in**: `Laminas\Diactoros`
113113

114-
## PSR-18: HTTP Client
114+
### PSR-18: HTTP Client
115115

116116
**Repository**: [php-fig/http-client](https://github.com/php-fig/http-client)
117117

@@ -120,7 +120,7 @@ Interface for sending HTTP requests and receiving HTTP responses.
120120
**Usage**: Calling external APIs from your Dotkernel API
121121
**Implemented in**: `symfony/http-client` or similar packages
122122

123-
## PSR-20: Clock
123+
### PSR-20: Clock
124124

125125
**Repository**: [php-fig/clock](https://github.com/php-fig/clock)
126126

@@ -129,7 +129,7 @@ Provides a standard interface for reading the system clock.
129129
**Usage**: Getting current time in a testable way
130130
**Implemented in**: Third-party packages as needed
131131

132-
## PSR Implementation Hierarchy
132+
### PSR Implementation Hierarchy
133133

134134
```quote
135135
┌───────────────────────────────────────────┐
@@ -155,9 +155,8 @@ Provides a standard interface for reading the system clock.
155155
└───────────────────────────────────────────┘
156156
```
157157

158-
# Next Steps
158+
## Next Steps
159159

160160
- Review PSR-7 and PSR-15 in detail—these are essential for understanding Dotkernel API.
161161
- Check individual PSR pages for implementation examples.
162162
- Consider how PSRs apply to your custom code and modules.
163-

docs/book/v7/introduction/server-requirements.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ Windows is supported for development via WSL2.
2323

2424
### Apache >= 2.2
2525

26-
* mod_rewrite
27-
* .htaccess support `(AllowOverride All)`
26+
- mod_rewrite
27+
- .htaccess support `(AllowOverride All)`
2828

2929
> The repository includes a default `.htaccess` file in the `public` folder.
3030
@@ -95,20 +95,20 @@ When creating databases, use:
9595

9696
## Recommended extensions
9797

98-
* `opcache`
99-
* `pdo_mysql`, `pdo_pgsql` or `mysqli` (if using MariaDB or PostgreSQL as RDBMS)
100-
* `dom` - if working with markup files structure (HTML, XML, etc.)
101-
* `simplexml` - working with XML files
102-
* `gd`, `exif` - if working with images
103-
* `zlib`, `zip`, `bz2` - if compressing files
104-
* `curl` (required if APIs are used)
105-
* `sqlite3` - for tests
98+
- `opcache`
99+
- `pdo_mysql`, `pdo_pgsql` or `mysqli` (if using MariaDB or PostgreSQL as RDBMS)
100+
- `dom` - if working with markup files structure (HTML, XML, etc.)
101+
- `simplexml` - working with XML files
102+
- `gd`, `exif` - if working with images
103+
- `zlib`, `zip`, `bz2` - if compressing files
104+
- `curl` (required if APIs are used)
105+
- `sqlite3` - for tests
106106

107-
# Composer
107+
## Composer
108108

109109
Dotkernel API requires Composer >= 2.0 for managing PHP dependencies.
110110

111-
# Security Considerations
111+
## Security Considerations
112112

113113
- **Firewall**: Only expose ports 80 (HTTP) and 443 (HTTPS)
114114
- **PHP**: Disable dangerous functions: exec, shell_exec, passthru, system

0 commit comments

Comments
 (0)