Skip to content

Commit 143955e

Browse files
committed
Cleanup styles
1 parent 1a22442 commit 143955e

2 files changed

Lines changed: 5 additions & 14 deletions

File tree

docs/README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -151,21 +151,14 @@ Any good database is based on conventions. Our defaults are:
151151

152152
Nodes on the fluent chain are these table names.
153153

154-
Conventions differ in style, we support many styles of casing (camel case, studly
155-
caps, lowercase) and underscoring:
156-
157-
* Default style (The above)
158-
* Sakila style (MySQL sample database)
159-
* Northwind style (SQL Server sample database)
160-
* CakePHP style (to make it easier to migrate from apps written in CakePHP)
161-
162-
Usage:
154+
Conventions differ in style. We support Standard (snake_case) and Plural
155+
(pluralized snake_case, familiar from Rails, Laravel, etc):
163156

164157
```php
165-
$mapper->setStyle(new Styles\Sakila);
158+
$mapper->setStyle(new Styles\Plural);
166159
```
167160

168-
Styles are implemented as plugins. Refer to the `Respect\Relational\Styles\Stylable`
161+
Styles are implemented as plugins. Refer to the `Respect\Data\Styles\Stylable`
169162
interface.
170163

171164
```php

tests/MapperTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -586,10 +586,8 @@ public function testStyle(): void
586586
$this->mapper->style,
587587
);
588588
$styles = [
589-
new Styles\CakePHP(),
590-
new Styles\NorthWind(),
591-
new Styles\Sakila(),
592589
new Styles\Standard(),
590+
new Styles\Plural(),
593591
];
594592
foreach ($styles as $style) {
595593
$factory = new EntityFactory(style: $style, entityNamespace: 'Respect\\Relational\\');

0 commit comments

Comments
 (0)