-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to use my favorite authors to do a project (#35)
- Loading branch information
1 parent
1e8e2cf
commit cf5cad1
Showing
12 changed files
with
108 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
Tests/Fixtures/Project/src/Worldia/Bundle/ProductTestBundle/Service/Project/Author.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
namespace Worldia\Bundle\ProductTestBundle\Service\Project; | ||
|
||
use Textmaster\Client; | ||
|
||
class Author | ||
{ | ||
protected $client; | ||
protected $page; | ||
protected $projectId; | ||
|
||
public function __construct(Client $client, $projectId) | ||
{ | ||
$this->client = $client; | ||
$this->projectId = $projectId; | ||
} | ||
|
||
public function all($status = null) | ||
{ | ||
return [ | ||
'total_pages' => 1, | ||
'count' => 1, | ||
'page' => 1, | ||
'per_page' => 20, | ||
'previous_page' => null, | ||
'next_page' => null, | ||
'my_authors' => [ | ||
[ | ||
'status' => 'my_textmaster', | ||
'id' => '58f9febce27d6b5dd2b0b4ec', | ||
'author_id' => '55c3763e656462000b000027', | ||
] | ||
] | ||
]; | ||
} | ||
|
||
public function setPage($page) | ||
{ | ||
$this->page = (null === $page ? $page : (int)$page); | ||
|
||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters