Commit 4fa0d879 authored by Mark Harding's avatar Mark Harding

(fix): code styling and other issues

1 merge request!353Entity Centric Manager
Pipeline #87575376 passed with stages
in 10 minutes and 33 seconds
......@@ -10,17 +10,21 @@ use Minds\Traits\MagicAttributes;
/**
* Class EntityCentricRecord
* @package Minds\Core\Analytics\Views
* @method DownsampledView setResolution(int $year)
* @package Minds\Core\Analytics\EntityCentric
* @method EntityCentricRecord setResolution(int $year)
* @method string getResolution()
* @method DownsampledView setEntityUrn(string $entityUrn)
* @method EntityCentricRecord setEntityUrn(string $entityUrn)
* @method string getEntityUrn()
* @method DownsampledView setOwnerGuid(string $ownerGuid)
* @method EntityCentricRecord setOwnerGuid(string $ownerGuid)
* @method string getOwnerGuid()
* @method DownsampledView setTimestampMs(int $timestampMs)
* @method EntityCentricRecord setTimestampMs(int $timestampMs)
* @method int getTimestampMs()
* @method DownsampledView setViews(int $views)
* @method EntityCentricRecord setTimestamp(int $timestamp)
* @method int getTimestamp()
* @method EntityCentricRecord setViews(int $views)
* @method int getViews()
* @method EntityCentricRecord setSums(array $sums)
* @method int getSums()
*/
class EntityCentricRecord
{
......@@ -29,6 +33,9 @@ class EntityCentricRecord
/** @var string */
private $resolution;
/** @var int */
protected $timestamp;
/** @var int */
protected $timestampMs;
......@@ -45,7 +52,7 @@ class EntityCentricRecord
* Increment views
* @param string $metric
* @param int $value
* @return DownsampledView
* @return EntityCentricRecord
*/
public function incrementSum($metric, $value = 1): EntityCentricRecord
{
......
......@@ -45,9 +45,9 @@ class Manager
/**
* Synchronise views from cassandra to elastic
* @return void
* @return iterable
*/
public function sync()
public function sync(): iterable
{
foreach (Manager::SYNCHRONISERS as $synchroniserClass) {
$synchroniser = new $synchroniserClass;
......
......@@ -6,7 +6,6 @@
namespace Minds\Core\Analytics\EntityCentric;
use Minds\Core\Analytics\Views\DownsampledView;
use DateTime;
use DateTimeZone;
use Exception;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment