0/5
threads resolved
changed milestone to %Boost Refactor #mvp
added scoped labels
unmarked as a Work In Progress
1 <?php 2 3 namespace Minds\Core\Boost; 4 5 use Minds\Core\Data\cache\abstractCacher; 6 use Minds\Core\Entities\Resolver; 7 use Minds\Entities\User; 8 use Minds\Core; 9 use Minds\Helpers\Time; 10 11 abstract class Feed - Owner
rename to AbstractFeed
27 protected $quality = 0; 28 protected $type = 'newsfeed'; 29 30 protected $offsetCacheTtl = Time::FIVE_MIN; 31 32 public function __construct( 33 User $currentUser = null, 34 Resolver $resolver = null, 35 abstractCacher $cacher = null 36 ) { 37 $this->currentUser = $currentUser ?: Core\Session::getLoggedinUser(); 38 $this->resolver = $resolver ?: new Resolver(); 39 $this->cacher = $cacher ?: Core\Data\cache\factory::build('Redis'); 40 } 41 42 public function setMockIterator($mockIterator): self - Owner
Can we get some phpdoc markup on these functions?
116 103 return $response; 117 104 } 118 105 106 protected function updateTimestampsToMsValues(array $data): array - Owner
phpdoc
112 } 113 114 if (isset($data['time_created'])) { 115 if ($data['time_created'] < Time::HISTORIC_MS_VALUE) { 116 $data['time_created'] = Time::sToMs($data['time_created']); 117 } 118 } 119 120 if ($data['@created'] < Time::HISTORIC_MS_VALUE) { 121 $data['@created'] = Time::sToMs($data['@created']); 122 } 123 124 return $data; 125 } 126 127 protected function updateOldSchema(array $data): array - Owner
phpdoc
447 424 $export = array_merge($export, \Minds\Core\Events\Dispatcher::trigger('export:extender', 'all', ['entity' => $this], [])); 448 425 $export = \Minds\Helpers\Export::sanitize($export); 449 426 450 $export['met_impressions'] = Counters::get((string) $this->getId(), "boost_impressions") - Owner
We need to confirm if this is going to break counters pre-elasticsearch migration.