Skip to content

Commit

Permalink
cleaning
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
  • Loading branch information
ArtificialOwl committed Jul 11, 2020
1 parent bf82e57 commit dacfcc7
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 11 deletions.
5 changes: 0 additions & 5 deletions lib/GlobalScale/FileShare.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
use OCA\Circles\Model\SharingFrame;
use OCA\Circles\Service\MiscService;
use OCP\Files\NotFoundException;
use OCP\IL10N;
use OCP\IUser;
use OCP\Mail\IEMailTemplate;
use OCP\Share\Exceptions\IllegalIDChangeException;
Expand All @@ -65,10 +64,6 @@ class FileShare extends AGlobalScaleEvent {
use TArrayTools;


/** @var IL10N */
private $l10n;


/**
* @param GSEvent $event
* @param bool $localCheck
Expand Down
4 changes: 3 additions & 1 deletion lib/Model/GlobalScale/GSEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ public function import(array $data): self {
$this->setSource($this->get('source', $data));
$this->setKey($this->get('key', $data));
$this->setForced($this->getBool('force', $data));
$this->setAsync($this->getBool('async', $data));

if (array_key_exists('circle', $data)) {
$this->setCircle(Circle::fromArray($data['circle']));
Expand Down Expand Up @@ -430,7 +431,8 @@ function jsonSerialize(): array {
'result' => $this->getResult(),
'key' => $this->getKey(),
'source' => $this->getSource(),
'force' => $this->isForced()
'force' => $this->isForced(),
'async' => $this->isAsync()
];

if ($this->hasCircle()) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/GlobalScaleUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function search($search) {
RequestServerException |
RequestResultNotJsonException $e
) {
$this->miscService->log('Issue while retrieving instances from lookup: ' . $e->getMessage());
$this->miscService->log('Issue while retrieving instances from lookup: ' . get_class($e) . ' ' . $e->getMessage());

return [];
}
Expand Down
2 changes: 0 additions & 2 deletions lib/Service/GSDownstreamService.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
use OCA\Circles\Exceptions\GlobalScaleDSyncException;
use OCA\Circles\Exceptions\GlobalScaleEventException;
use OCA\Circles\Exceptions\GSKeyException;
use OCA\Circles\Exceptions\GSStatusException;
use OCA\Circles\Model\GlobalScale\GSEvent;
use OCP\IURLGenerator;

Expand Down Expand Up @@ -107,7 +106,6 @@ public function __construct(
* @param GSEvent $event
*
* @throws GSKeyException
* @throws GSStatusException
* @throws GlobalScaleEventException
* @throws CircleDoesNotExistException
* @throws ConfigNoCircleAvailableException
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/GSUpstreamService.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public function newEvent(GSEvent $event) {
// $gs->verify($event); // needed ? as we check event on the 'master' of the circle
$this->confirmEvent($event);
$this->miscService->log('confirmed: ' . json_encode($event));
$gs->manage($event); // needed ? as we manage it throw the confirmEvent
// $gs->manage($event); // needed ? as we manage it throw the confirmEvent
}
} catch (Exception $e) {
$this->miscService->log(
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/GlobalScaleService.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public function getInstances(bool $all = false): array {
try {
$instances = $this->retrieveJson($request);
} catch (RequestContentException | RequestNetworkException | RequestResultSizeException | RequestServerException | RequestResultNotJsonException $e) {
$this->miscService->log('Issue while retrieving instances from lookup: ' . $e->getMessage());
$this->miscService->log('Issue while retrieving instances from lookup: ' . get_class($e) . ' ' . $e->getMessage());

return [];
}
Expand Down

0 comments on commit dacfcc7

Please sign in to comment.