(chore): Lint code

1 merge request!296WIP: (feat): Minds Pro (development branch) - Release 3
Pipeline #78675416 pending with stages
......@@ -226,5 +226,4 @@ class channel implements Interfaces\Api
{
return Factory::response([]);
}
}
......@@ -31,8 +31,7 @@ class Manager
public function __construct(
$repository = null,
$top = null
)
{
) {
$this->repository = $repository ?: new Repository();
$this->top = $top ?: new TopManager();
}
......@@ -73,7 +72,6 @@ class Manager
$container = (string) $this->user->guid;
foreach ($tags as $tag) {
$opts = [
'container_guid' => $container,
'access_id' => [2, $container],
......
......@@ -30,8 +30,7 @@ class HydrateSettingsDelegate
public function __construct(
$entitiesBuilder = null,
$config = null
)
{
) {
$this->entitiesBuilder = $entitiesBuilder ?: Di::_()->get('EntitiesBuilder');
$this->config = $config ?: Di::_()->get('Config');
}
......
......@@ -22,8 +22,7 @@ class InitializeSettingsDelegate
*/
public function __construct(
$repository = null
)
{
) {
$this->repository = $repository ?: new Repository();
}
......
......@@ -26,8 +26,7 @@ class Domain
public function __construct(
$config = null,
$repository = null
)
{
) {
$this->config = $config ?: Di::_()->get('Config');
$this->repository = $repository ?: new Repository();
}
......@@ -40,7 +39,7 @@ class Domain
{
$rootDomains = $this->config->get('root_domains') ?: [];
if (in_array(strtolower($domain), $rootDomains)) {
if (in_array(strtolower($domain), $rootDomains, true)) {
return null;
}
......
......@@ -39,8 +39,7 @@ class Manager
$saveAction = null,
$initializeSettingsDelegate = null,
$hydrateSettingsDelegate = null
)
{
) {
$this->repository = $repository ?: new Repository();
$this->saveAction = $saveAction ?: new Save();
$this->initializeSettingsDelegate = $initializeSettingsDelegate ?: new Delegates\InitializeSettingsDelegate();
......
......@@ -25,8 +25,7 @@ class Repository
*/
public function __construct(
$db = null
)
{
) {
$this->db = $db ?: Di::_()->get('Database\Cassandra\Cql');
}
......@@ -66,7 +65,7 @@ class Repository
}
if ($opts['offset']) {
$cqlOpts['paging_state_token'] = base64_decode($opts['offset']);
$cqlOpts['paging_state_token'] = base64_decode($opts['offset'], true);
}
$prepared = new Custom();
......
......@@ -21,8 +21,7 @@ class Manager
*/
public function __construct(
$middleware = null
)
{
) {
$this->middleware = $middleware ?: [
new Middleware\ProMiddleware(),
];
......
......@@ -22,8 +22,7 @@ class ProMiddleware implements RouterMiddleware
*/
public function __construct(
$proDomain = null
)
{
) {
$this->proDomain = $proDomain ?: Di::_()->get('Pro\Domain');
}
......
......@@ -424,7 +424,8 @@ class User extends \ElggUser
* @param array $pinned
* @return $this
*/
public function setPinnedPosts($pinned) {
public function setPinnedPosts($pinned)
{
$maxPinnedPosts = $this->isPro() ? 12 : 3;
$this->pinned_posts = array_slice($pinned, -$maxPinnedPosts, null, false);
......
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