Skip to content

Commit 730f205

Browse files
committed
Add get prefix to all accessors
1 parent 364659e commit 730f205

File tree

7 files changed

+53
-49
lines changed

7 files changed

+53
-49
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ Weblog Contracts provides set of interfaces for the Framework Interoperable Blog
2828

2929
## Features
3030

31-
- Strongly Typed.
32-
- Framework Agnostic.
33-
- Single-author Blogs.
34-
- Multi-author Blogs (MABs).
31+
- Strongly Typed
32+
- Framework Agnostic
33+
- Single-author Blogs
34+
- Multi-author Blogs (MABs)
3535
- Following PHP Standard Recommendations:
36-
- [PSR-1 (Basic Coding Standard)](http://www.php-fig.org/psr/psr-1/).
37-
- [PSR-2 (Coding Style Guide)](http://www.php-fig.org/psr/psr-2/).
38-
- [PSR-4 (Autoloading Standard)](http://www.php-fig.org/psr/psr-4/).
36+
- [PSR-1 (Basic Coding Standard)](http://www.php-fig.org/psr/psr-1/)
37+
- [PSR-2 (Coding Style Guide)](http://www.php-fig.org/psr/psr-2/)
38+
- [PSR-4 (Autoloading Standard)](http://www.php-fig.org/psr/psr-4/)
3939

4040
## Installation
4141

src/Author/Entities/Author.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@
1313

1414
namespace Cog\Contracts\Weblog\Author\Entities;
1515

16+
use Cog\Contracts\Weblog\Authorable\Entities\Authorable;
17+
1618
interface Author
1719
{
18-
public function authorable(): Authorable;
20+
public function getAuthorable(): Authorable;
1921

20-
public function blogs(): iterable;
22+
public function getBlogs(): iterable;
2123

22-
public function posts(): iterable;
24+
public function getPosts(): iterable;
2325

24-
public function comments(): iterable;
26+
public function getComments(): iterable;
2527

26-
public function id(): string;
28+
public function getId(): string;
2729
}
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111

1212
declare(strict_types=1);
1313

14-
namespace Cog\Contracts\Weblog\Author\Entities;
14+
namespace Cog\Contracts\Weblog\Authorable\Entities;
15+
16+
use Cog\Contracts\Weblog\Author\Entities\Author;
1517

1618
interface Authorable
1719
{
18-
public function blogAuthor(): Author;
20+
public function getBlogAuthor(): Author;
1921
}

src/Blog/Entities/Blog.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@
1818

1919
interface Blog
2020
{
21-
public function posts(): iterable;
21+
public function getPosts(): iterable;
2222

23-
public function owner(): Author;
23+
public function getOwner(): Author;
2424

25-
public function editors(): iterable;
25+
public function getEditors(): iterable;
2626

27-
public function writers(): iterable;
27+
public function getWriters(): iterable;
2828

29-
public function id(): string;
29+
public function getId(): string;
3030

31-
public function slug(): string;
31+
public function getSlug(): string;
3232

33-
public function name(): string;
33+
public function getName(): string;
3434

35-
public function description(): ?string;
35+
public function getDescription(): ?string;
3636

37-
public function createdAt(): DateTime;
37+
public function getCreatedAt(): DateTime;
3838

39-
public function updatedAt(): ?DateTime;
39+
public function getUpdatedAt(): ?DateTime;
4040
}

src/Category/Entities/Category.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717

1818
interface Category
1919
{
20-
public function posts(): iterable;
20+
public function getPosts(): iterable;
2121

22-
public function id(): string;
22+
public function getId(): string;
2323

24-
public function slug(): string;
24+
public function getSlug(): string;
2525

26-
public function name(): string;
26+
public function getName(): string;
2727

28-
public function createdAt(): DateTime;
28+
public function getCreatedAt(): DateTime;
2929

30-
public function updatedAt(): ?DateTime;
30+
public function getUpdatedAt(): ?DateTime;
3131
}

src/Comment/Entities/Comment.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919

2020
interface Comment
2121
{
22-
public function post(): Post;
22+
public function getPost(): Post;
2323

24-
public function author(): Author;
24+
public function getAuthor(): Author;
2525

26-
public function id(): string;
26+
public function getId(): string;
2727

28-
public function content(): string;
28+
public function getContent(): string;
2929

30-
public function createdAt(): DateTime;
30+
public function getCreatedAt(): DateTime;
3131

32-
public function updatedAt(): ?DateTime;
32+
public function getUpdatedAt(): ?DateTime;
3333
}

src/Post/Entities/Post.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,29 @@
2020

2121
interface Post
2222
{
23-
public function blog(): Blog;
23+
public function getBlog(): Blog;
2424

25-
public function category(): ?Category;
25+
public function getCategory(): ?Category;
2626

27-
public function author(): Author;
27+
public function getAuthor(): Author;
2828

29-
public function comments(): iterable;
29+
public function getComments(): iterable;
3030

31-
public function id(): string;
31+
public function getId(): string;
3232

33-
public function slug(): string;
33+
public function getSlug(): string;
3434

35-
public function title(): string;
35+
public function getTitle(): string;
3636

37-
public function subtitle(): ?string;
37+
public function getSubtitle(): ?string;
3838

39-
public function excerpt(): ?string;
39+
public function getExcerpt(): ?string;
4040

41-
public function content(): ?string;
41+
public function getContent(): ?string;
4242

43-
public function createdAt(): DateTime;
43+
public function getCreatedAt(): DateTime;
4444

45-
public function updatedAt(): ?DateTime;
45+
public function getUpdatedAt(): ?DateTime;
4646

47-
public function publishedAt(): ?DateTime;
47+
public function getPublishedAt(): ?DateTime;
4848
}

0 commit comments

Comments
 (0)