renaming/cleaning

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
alpha1
Maxence Lange 2018-11-27 15:54:08 -01:00
rodzic d81134130a
commit bd1e0ee244
11 zmienionych plików z 13 dodań i 16 usunięć

8
composer.lock wygenerowano
Wyświetl plik

@ -12,12 +12,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/daita/my-small-php-tools.git", "url": "https://github.com/daita/my-small-php-tools.git",
"reference": "fc822e4c08072844ad9d58846d407e83a62b3d38" "reference": "ba839f3253672defc4bbb181493c78e2c96e272a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/daita/my-small-php-tools/zipball/fc822e4c08072844ad9d58846d407e83a62b3d38", "url": "https://api.github.com/repos/daita/my-small-php-tools/zipball/ba839f3253672defc4bbb181493c78e2c96e272a",
"reference": "fc822e4c08072844ad9d58846d407e83a62b3d38", "reference": "ba839f3253672defc4bbb181493c78e2c96e272a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -40,7 +40,7 @@
} }
], ],
"description": "My small PHP Tools", "description": "My small PHP Tools",
"time": "2018-11-20T22:42:57+00:00" "time": "2018-11-27T14:31:43+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],

Wyświetl plik

@ -87,7 +87,7 @@ class LocalController extends Controller {
/** /**
* NavigationController constructor. * LocalController constructor.
* *
* @param IRequest $request * @param IRequest $request
* @param string $userId * @param string $userId

Wyświetl plik

@ -36,7 +36,7 @@ use JsonSerializable;
use OCA\Social\Exceptions\ActivityCantBeVerifiedException; use OCA\Social\Exceptions\ActivityCantBeVerifiedException;
use OCA\Social\Exceptions\UrlCloudException; use OCA\Social\Exceptions\UrlCloudException;
use OCA\Social\Model\InstancePath; use OCA\Social\Model\InstancePath;
use OCA\Social\Service\ICoreService; use OCA\Social\Service\ActivityPub\ICoreService;
abstract class ACore implements JsonSerializable { abstract class ACore implements JsonSerializable {

Wyświetl plik

@ -38,7 +38,6 @@ use OCA\Social\Exceptions\UnknownItemException;
use OCA\Social\Model\ActivityPub\ACore; use OCA\Social\Model\ActivityPub\ACore;
use OCA\Social\Model\ActivityPub\Activity\Delete; use OCA\Social\Model\ActivityPub\Activity\Delete;
use OCA\Social\Service\ActivityService; use OCA\Social\Service\ActivityService;
use OCA\Social\Service\ICoreService;
use OCA\Social\Service\MiscService; use OCA\Social\Service\MiscService;

Wyświetl plik

@ -49,7 +49,6 @@ use OCA\Social\Model\ActivityPub\Person;
use OCA\Social\Model\InstancePath; use OCA\Social\Model\InstancePath;
use OCA\Social\Service\ActivityService; use OCA\Social\Service\ActivityService;
use OCA\Social\Service\ConfigService; use OCA\Social\Service\ConfigService;
use OCA\Social\Service\ICoreService;
use OCA\Social\Service\MiscService; use OCA\Social\Service\MiscService;

Wyświetl plik

@ -28,7 +28,7 @@ declare(strict_types=1);
*/ */
namespace OCA\Social\Service; namespace OCA\Social\Service\ActivityPub;
use OCA\Social\Model\ActivityPub\ACore; use OCA\Social\Model\ActivityPub\ACore;

Wyświetl plik

@ -47,7 +47,6 @@ use OCA\Social\Service\ActivityService;
use OCA\Social\Service\ActorService; use OCA\Social\Service\ActorService;
use OCA\Social\Service\ConfigService; use OCA\Social\Service\ConfigService;
use OCA\Social\Service\CurlService; use OCA\Social\Service\CurlService;
use OCA\Social\Service\ICoreService;
use OCA\Social\Service\MiscService; use OCA\Social\Service\MiscService;
class NoteService implements ICoreService { class NoteService implements ICoreService {

Wyświetl plik

@ -44,7 +44,6 @@ use OCA\Social\Exceptions\UrlCloudException;
use OCA\Social\Model\ActivityPub\ACore; use OCA\Social\Model\ActivityPub\ACore;
use OCA\Social\Model\ActivityPub\Person; use OCA\Social\Model\ActivityPub\Person;
use OCA\Social\Service\ConfigService; use OCA\Social\Service\ConfigService;
use OCA\Social\Service\ICoreService;
use OCA\Social\Service\InstanceService; use OCA\Social\Service\InstanceService;
use OCA\Social\Service\MiscService; use OCA\Social\Service\MiscService;

Wyświetl plik

@ -33,7 +33,6 @@ namespace OCA\Social\Service\ActivityPub;
use Exception; use Exception;
use OCA\Social\Model\ActivityPub\ACore; use OCA\Social\Model\ActivityPub\ACore;
use OCA\Social\Service\ICoreService;
use OCA\Social\Service\MiscService; use OCA\Social\Service\MiscService;

Wyświetl plik

@ -71,6 +71,7 @@ class ImportService {
/** @var DeleteService */ /** @var DeleteService */
private $deleteService; private $deleteService;
/** @var ConfigService */
private $configService; private $configService;
/** @var MiscService */ /** @var MiscService */

Wyświetl plik

@ -30,6 +30,7 @@ declare(strict_types=1);
namespace OCA\Social\Service; namespace OCA\Social\Service;
use Exception;
use OC\User\NoUserException; use OC\User\NoUserException;
use OCA\Social\Exceptions\ActorDoesNotExistException; use OCA\Social\Exceptions\ActorDoesNotExistException;
use OCA\Social\Exceptions\RequestException; use OCA\Social\Exceptions\RequestException;
@ -77,20 +78,20 @@ class PostService {
* @param Post $post * @param Post $post
* @param ACore $activity * @param ACore $activity
* *
* @return array * @return string
* @throws ActorDoesNotExistException * @throws ActorDoesNotExistException
* @throws NoUserException * @throws NoUserException
* @throws RequestException
* @throws SocialAppConfigException * @throws SocialAppConfigException
* @throws Exception
*/ */
public function createPost(Post $post, ACore &$activity = null) { public function createPost(Post $post, ACore &$activity = null): string {
$note = $note =
$this->noteService->generateNote( $this->noteService->generateNote(
$post->getUserId(), $post->getContent(), $post->getType() $post->getUserId(), $post->getContent(), $post->getType()
); );
$this->noteService->addRecipients($note, $post->getType(), $post->getTo());
$this->noteService->replyTo($note, $post->getReplyTo()); $this->noteService->replyTo($note, $post->getReplyTo());
$this->noteService->addRecipients($note, $post->getType(), $post->getTo());
$actor = $this->actorService->getActorFromUserId($post->getUserId()); $actor = $this->actorService->getActorFromUserId($post->getUserId());