diff --git a/controller/Controller.class.php b/controller/Controller.class.php index bdf8da93..f2006a12 100644 --- a/controller/Controller.class.php +++ b/controller/Controller.class.php @@ -2,7 +2,7 @@ class Controller { - const CACHE_CLEAR_PATH = '/clear-cache'; + public const CACHE_CLEAR_PATH = '/clear-cache'; protected static $queuedFunctions = []; @@ -113,7 +113,7 @@ class Controller $router->get(['/get', 'get'], 'DownloadActions::executeGet'); foreach (array_keys(OS::getAll()) as $os) { - $router->get(['/' . $os, 'get-' . $os], 'DownloadActions::executeGet'); + $router->get(['/' . $os, 'get-' . $os], 'DownloadActions::executeGet'); } $router->get('/roadmap', 'ContentActions::executeRoadmap'); diff --git a/controller/Request.class.php b/controller/Request.class.php index 3736145c..ec2231af 100644 --- a/controller/Request.class.php +++ b/controller/Request.class.php @@ -2,10 +2,10 @@ class Request { - const GET = 'GET'; - const POST = 'POST'; - const HEAD = 'HEAD'; - const OPTIONS = 'OPTIONS'; + public const GET = 'GET'; + public const POST = 'POST'; + public const HEAD = 'HEAD'; + public const OPTIONS = 'OPTIONS'; protected static $method; diff --git a/controller/Session.class.php b/controller/Session.class.php index fda8433e..e9f578b2 100644 --- a/controller/Session.class.php +++ b/controller/Session.class.php @@ -2,10 +2,10 @@ class Session { - const KEY_LIST_SUB_ERROR = 'list_error', + public const KEY_LIST_SUB_ERROR = 'list_error', KEY_USER_CULTURE = 'user_culture'; - const NAMESPACE_DEFAULT = 'default', + public const NAMESPACE_DEFAULT = 'default', NAMESPACE_FLASH = 'flash', NAMESPACE_FLASH_REMOVE = 'flash_remove', USER_ID = 'user_id', @@ -26,7 +26,7 @@ class Session header_remove('expires'); if (!static::get('secure_and_httponly_set')) { - session_regenerate_id(); // ensure that old cookies get new settings + session_regenerate_id(); // ensure that old cookies get new settings } static::set('secure_and_httponly_set', true); diff --git a/controller/action/AcquisitionActions.class.php b/controller/action/AcquisitionActions.class.php index d9c2ec62..f521058f 100644 --- a/controller/action/AcquisitionActions.class.php +++ b/controller/action/AcquisitionActions.class.php @@ -2,7 +2,7 @@ class AcquisitionActions extends Actions { - public static function executeYouTube() + public static function executeYouTube() { return ['acquisition/youtube']; } diff --git a/controller/action/ContentActions.class.php b/controller/action/ContentActions.class.php index 37b40447..ffd3b6d9 100644 --- a/controller/action/ContentActions.class.php +++ b/controller/action/ContentActions.class.php @@ -2,7 +2,7 @@ class ContentActions extends Actions { - const + public const SLUG_RSS = 'rss.xml', SLUG_NEWS = 'news', SLUG_FAQ = 'faq', @@ -46,11 +46,11 @@ class ContentActions extends Actions if (!$slug || $slug == static::SLUG_RSS) { $posts = array_filter( - Post::find(static::VIEW_FOLDER_NEWS, Post::SORT_DATE_DESC), - function (Post $post) { + Post::find(static::VIEW_FOLDER_NEWS, Post::SORT_DATE_DESC), + function (Post $post) { return !$post->getDate() || $post->getDate()->format('U') <= date('U'); } - ); + ); if ($slug == static::SLUG_RSS) { Response::setHeader(Response::HEADER_CONTENT_TYPE, 'text/xml; charset=utf-8'); @@ -267,11 +267,11 @@ class ContentActions extends Actions $filter_post = []; $posts = array_filter( - Post::find(static::VIEW_FOLDER_NEWS, Post::SORT_DATE_DESC), - function (Post $post) use ($category) { + Post::find(static::VIEW_FOLDER_NEWS, Post::SORT_DATE_DESC), + function (Post $post) use ($category) { return (($post->getCategory() === $category) && (!$post->getDate() || $post->getDate()->format('U') <= date('U'))); } - ); + ); @@ -287,8 +287,8 @@ class ContentActions extends Actions { $jobs = array_filter( - array_map('View::parseMarkdown', glob(static::VIEW_FOLDER_JOBS . '/*')), - function ($job) { + array_map('View::parseMarkdown', glob(static::VIEW_FOLDER_JOBS . '/*')), + function ($job) { return $job[0]['status'] !== 'closed'; } ); diff --git a/controller/action/DownloadActions.class.php b/controller/action/DownloadActions.class.php index d8af7704..16d807f7 100644 --- a/controller/action/DownloadActions.class.php +++ b/controller/action/DownloadActions.class.php @@ -3,8 +3,8 @@ class DownloadActions extends Actions { //bad, fix me! - const ANDROID_STORE_URL = 'https://play.google.com/store/apps/details?id=io.lbry.browser'; - const IOS_STORE_URL = 'https://apps.apple.com/us/app/odysee/id1539444143'; + public const ANDROID_STORE_URL = 'https://play.google.com/store/apps/details?id=io.lbry.browser'; + public const IOS_STORE_URL = 'https://apps.apple.com/us/app/odysee/id1539444143'; public static function executeDownloadPrereleaseAsset(string $repo, string $ext) { @@ -19,14 +19,14 @@ class DownloadActions extends Actions public static function executeDownloadSnapshot(string $type) { if (!in_array($type, ['blockchain', 'wallet'])) { - return ['page/404']; + return ['page/404']; } $bucketName = "snapshots.lbry.com"; $bucket = S3::getBucket($bucketName, "$type/"); if (!count($bucket)) { - return ['page/404']; + return ['page/404']; } krsort($bucket); @@ -38,9 +38,9 @@ class DownloadActions extends Actions */ public static function getGetTemplateParams($os) { - $osChoices = OS::getAll(); - list($uri, $osTitle, $osIcon, $title) = $osChoices[$os]; - $params = [ + $osChoices = OS::getAll(); + list($uri, $osTitle, $osIcon, $title) = $osChoices[$os]; + $params = [ 'preferredExt' => $os === Os::OS_LINUX ? 'AppImage' : '', 'title' => $title, 'osTitle' => $osTitle, @@ -49,23 +49,18 @@ class DownloadActions extends Actions 'os' => $os ]; - if ($os === OS::OS_ANDROID) - { - $params['downloadUrl'] = static::ANDROID_STORE_URL; - $params['osScreenshotSrc'] = 'https://spee.ch/@lbry:3f/android-08-homepage.gif'; - } - else if ($os === OS::OS_IOS) - { - $params['downloadUrl'] = static::IOS_STORE_URL; - $params['osScreenshotSrc'] = 'https://spee.ch/odyseeiosimage.png'; - } - else - { - $asset = Github::getRepoAsset(GitHub::REPO_LBRY_DESKTOP, $os, $params['preferredExt']); - $params['downloadUrl'] = $asset ? $asset['browser_download_url'] : null; - } + if ($os === OS::OS_ANDROID) { + $params['downloadUrl'] = static::ANDROID_STORE_URL; + $params['osScreenshotSrc'] = 'https://spee.ch/@lbry:3f/android-08-homepage.gif'; + } elseif ($os === OS::OS_IOS) { + $params['downloadUrl'] = static::IOS_STORE_URL; + $params['osScreenshotSrc'] = 'https://spee.ch/odyseeiosimage.png'; + } else { + $asset = Github::getRepoAsset(GitHub::REPO_LBRY_DESKTOP, $os, $params['preferredExt']); + $params['downloadUrl'] = $asset ? $asset['browser_download_url'] : null; + } - return $params; + return $params; } public static function executeGet() @@ -143,19 +138,19 @@ class DownloadActions extends Actions list($uri, $osTitle, $osIcon, $oldButtonLabel, $analyticsLabel) = $osChoices[$os]; if ($os === OS::OS_ANDROID) { - $asset = ['browser_download_url' => static::ANDROID_STORE_URL]; - } else if ($os === OS::OS_IOS) { - $asset = ['browser_download_url' => static::IOS_STORE_URL]; + $asset = ['browser_download_url' => static::ANDROID_STORE_URL]; + } elseif ($os === OS::OS_IOS) { + $asset = ['browser_download_url' => static::IOS_STORE_URL]; } else { - $asset = Github::getRepoAsset(GitHub::REPO_LBRY_DESKTOP, $os, $vars['preferredExt'] ?? ''); + $asset = Github::getRepoAsset(GitHub::REPO_LBRY_DESKTOP, $os, $vars['preferredExt'] ?? ''); } $buttonLabel = __('Download for %os%', ['%os%' => $osTitle]); - if (isset($vars['preferredExt']) && $vars['preferredExt']) { - $buttonLabel = __('Download .%ext%', ['%ext%' => $vars['preferredExt']]); - } + if (isset($vars['preferredExt']) && $vars['preferredExt']) { + $buttonLabel = __('Download .%ext%', ['%ext%' => $vars['preferredExt']]); + } - $vars += [ + $vars += [ 'analyticsLabel' => $analyticsLabel, 'buttonLabel' => $buttonLabel, 'isDownload' => true, @@ -169,8 +164,8 @@ class DownloadActions extends Actions if ($os === OS::OS_LINUX && !isset($vars['preferredExt'])) { - $vars['isDownload'] = false; - $vars['downloadUrl'] = '/linux'; + $vars['isDownload'] = false; + $vars['downloadUrl'] = '/linux'; } } @@ -178,27 +173,27 @@ class DownloadActions extends Actions } - public static function prepareMetaPartial(array $vars) - { - $osChoices = OS::getAll(); + public static function prepareMetaPartial(array $vars) + { + $osChoices = OS::getAll(); - $os = static::guessOS(); + $os = static::guessOS(); - if ($os && isset($osChoices[$os])) { - list($uri, $osTitle, $osIcon, $buttonLabel, $analyticsLabel) = $osChoices[$os]; + if ($os && isset($osChoices[$os])) { + list($uri, $osTitle, $osIcon, $buttonLabel, $analyticsLabel) = $osChoices[$os]; - if ($os === OS::OS_ANDROID) { - $asset = ['browser_download_url' => static::ANDROID_STORE_URL, 'size' => 0]; - $release = []; - } else if ($os === OS::OS_IOS) { - $asset = ['browser_download_url' => static::IOS_STORE_URL, 'size' => 0]; - $release = []; - } else { - $release = Github::getRepoRelease(GitHub::REPO_LBRY_DESKTOP, false); - $asset = Github::getRepoAsset(GitHub::REPO_LBRY_DESKTOP, $os); - } + if ($os === OS::OS_ANDROID) { + $asset = ['browser_download_url' => static::ANDROID_STORE_URL, 'size' => 0]; + $release = []; + } elseif ($os === OS::OS_IOS) { + $asset = ['browser_download_url' => static::IOS_STORE_URL, 'size' => 0]; + $release = []; + } else { + $release = Github::getRepoRelease(GitHub::REPO_LBRY_DESKTOP, false); + $asset = Github::getRepoAsset(GitHub::REPO_LBRY_DESKTOP, $os); + } - $vars += [ + $vars += [ 'os' => $os, 'osTitle' => $osTitle, 'osIcon' => $osIcon, @@ -208,8 +203,8 @@ class DownloadActions extends Actions 'version' => $release ? $release['name'] : null, 'isAuto' => Request::getParam('auto'), ]; - } + } - return $vars; - } + return $vars; + } } diff --git a/controller/action/MailActions.class.php b/controller/action/MailActions.class.php index 55de2a47..dd03d615 100644 --- a/controller/action/MailActions.class.php +++ b/controller/action/MailActions.class.php @@ -16,9 +16,9 @@ class MailActions extends Actions $email = Request::getPostParam('email'); if (!$email || !filter_var($email, FILTER_VALIDATE_EMAIL)) { Session::set( - Session::KEY_LIST_SUB_ERROR, - $email ? __('Please provide a valid email address.') : __('Please provide an email address.') - ); + Session::KEY_LIST_SUB_ERROR, + $email ? __('Please provide a valid email address.') : __('Please provide an email address.') + ); return Controller::redirect(Request::getRelativeUri()); } @@ -80,17 +80,17 @@ class MailActions extends Actions public static function prepareSettingsFormPartial(array $vars) { - $tags = LBRY::listTags($vars['token']); - $tagMetadata = []; + $tags = LBRY::listTags($vars['token']); + $tagMetadata = []; - foreach($tags as $tag) { - if ($tag['is_user_addable']) { - $tagMetadata[$tag['name']] = [ + foreach ($tags as $tag) { + if ($tag['is_user_addable']) { + $tagMetadata[$tag['name']] = [ 'label' => $tag['display_name'], 'description' => $tag['description'] ]; + } } - } - return $vars + ['tagMetadata' => $tagMetadata]; + return $vars + ['tagMetadata' => $tagMetadata]; } } diff --git a/controller/action/ReportActions.class.php b/controller/action/ReportActions.class.php index 658c334a..dcc4af7f 100644 --- a/controller/action/ReportActions.class.php +++ b/controller/action/ReportActions.class.php @@ -2,7 +2,6 @@ class ReportActions extends Actions { - /** * Handles all routing requests without a claimId as parameter. * E.g. /dmca @@ -10,8 +9,8 @@ class ReportActions extends Actions * @return array * @throws Exception */ - public static function executeDmca() { - + public static function executeDmca() + { self::setResponseHeader(); self::redirectIfPostRequest(false, ''); @@ -35,8 +34,8 @@ class ReportActions extends Actions * @return array * @throws Exception */ - public static function executeDmcaWithClaimId(string $claimId): array { - + public static function executeDmcaWithClaimId(string $claimId): array + { $claimId = htmlspecialchars($claimId); self::setResponseHeader(); @@ -63,7 +62,6 @@ class ReportActions extends Actions */ private static function validateForm(array $values, array $errors) { - foreach (['name', 'email', 'rightsholder', 'identifier'] as $field) { $value = Request::getPostParam($field); @@ -82,7 +80,6 @@ class ReportActions extends Actions Session::setFlash('success', '

Report Submitted

We will respond shortly.

This ID for this report is ' . $values['report_id'] . '. Please reference this ID when contacting us regarding this report.

'); return Controller::redirect(Request::getRelativeUri(), 303); } - } /** @@ -101,8 +98,8 @@ class ReportActions extends Actions * * @return array */ - private static function redirectIfPostRequest(bool $hasClaimId = false, string $claimId = '') { - + private static function redirectIfPostRequest(bool $hasClaimId = false, string $claimId = '') + { if ($hasClaimId && !empty($claimId)) { $returnValue = ['report/dmca', ['claimId' => $claimId]]; } else { diff --git a/controller/action/i18nActions.class.php b/controller/action/i18nActions.class.php index e5064692..c3dd9460 100644 --- a/controller/action/i18nActions.class.php +++ b/controller/action/i18nActions.class.php @@ -39,7 +39,7 @@ class i18nActions extends Actions Response::setHeader(Response::HEADER_CROSS_ORIGIN, "*"); if ($usecache) { - Response::enablePublicMutableCache(md5(json_encode($json))); + Response::enablePublicMutableCache(md5(json_encode($json))); } return View::renderJson($json); diff --git a/data/dummy/githubroadmap.php b/data/dummy/githubroadmap.php index c66666dd..ec2a7afa 100644 --- a/data/dummy/githubroadmap.php +++ b/data/dummy/githubroadmap.php @@ -1,7 +1,8 @@ - array ( + array( 'url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/243', 'repository_url' => 'https://api.github.com/repos/lbryio/internal-issues', 'labels_url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/243/labels{/name}', @@ -13,7 +14,7 @@ return array ( 'number' => 243, 'title' => 'Android 1.0', 'user' => - array ( + array( 'login' => 'kauffj', 'id' => 530774, 'node_id' => 'MDQ6VXNlcjUzMDc3NA==', @@ -34,9 +35,9 @@ return array ( 'site_admin' => false, ), 'labels' => - array ( + array( 0 => - array ( + array( 'id' => 1153942272, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyMjcy', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/2019', @@ -45,7 +46,7 @@ return array ( 'default' => false, ), 1 => - array ( + array( 'id' => 1153942434, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNDM0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/App%20Team', @@ -54,7 +55,7 @@ return array ( 'default' => false, ), 2 => - array ( + array( 'id' => 1222257315, 'node_id' => 'MDU6TGFiZWwxMjIyMjU3MzE1', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Q1', @@ -65,15 +66,15 @@ return array ( ), 'state' => 'open', 'locked' => false, - 'assignee' => NULL, + 'assignee' => null, 'assignees' => - array ( + array( ), - 'milestone' => NULL, + 'milestone' => null, 'comments' => 3, 'created_at' => '2019-01-07T18:50:36Z', 'updated_at' => '2019-02-05T23:45:18Z', - 'closed_at' => NULL, + 'closed_at' => null, 'author_association' => 'NONE', 'body_html' => '

LBRY released a functional mobile beta in 2018.

As soon as possible in 2019 we must release a proper mobile app as well as promotion around it.

@@ -85,7 +86,7 @@ return array ( ', ), 1 => - array ( + array( 'url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/242', 'repository_url' => 'https://api.github.com/repos/lbryio/internal-issues', 'labels_url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/242/labels{/name}', @@ -97,7 +98,7 @@ return array ( 'number' => 242, 'title' => 'Advertising', 'user' => - array ( + array( 'login' => 'kauffj', 'id' => 530774, 'node_id' => 'MDQ6VXNlcjUzMDc3NA==', @@ -118,9 +119,9 @@ return array ( 'site_admin' => false, ), 'labels' => - array ( + array( 0 => - array ( + array( 'id' => 1153942272, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyMjcy', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/2019', @@ -129,7 +130,7 @@ return array ( 'default' => false, ), 1 => - array ( + array( 'id' => 1153942434, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNDM0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/App%20Team', @@ -138,7 +139,7 @@ return array ( 'default' => false, ), 2 => - array ( + array( 'id' => 1153942704, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNzA0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Growth%20Team', @@ -147,7 +148,7 @@ return array ( 'default' => false, ), 3 => - array ( + array( 'id' => 1222257445, 'node_id' => 'MDU6TGFiZWwxMjIyMjU3NDQ1', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Q3', @@ -158,15 +159,15 @@ return array ( ), 'state' => 'open', 'locked' => false, - 'assignee' => NULL, + 'assignee' => null, 'assignees' => - array ( + array( ), - 'milestone' => NULL, + 'milestone' => null, 'comments' => 6, 'created_at' => '2019-01-07T18:01:17Z', 'updated_at' => '2019-02-05T23:50:06Z', - 'closed_at' => NULL, + 'closed_at' => null, 'author_association' => 'NONE', 'body_html' => '

A significant majority of people prefer advertisements to paying small fees for content. Adding advertisements would allow users who are in that category to avoid spending LBC for content. Additionally, advertisements would allow new users to watch sufficiently cheap content for free without needing to acquire LBC, reducing startup costs.

The most likely model for advertisements is:

@@ -183,7 +184,7 @@ return array ( ', ), 2 => - array ( + array( 'url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/237', 'repository_url' => 'https://api.github.com/repos/lbryio/internal-issues', 'labels_url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/237/labels{/name}', @@ -195,7 +196,7 @@ return array ( 'number' => 237, 'title' => 'Technical Community', 'user' => - array ( + array( 'login' => 'kauffj', 'id' => 530774, 'node_id' => 'MDQ6VXNlcjUzMDc3NA==', @@ -216,9 +217,9 @@ return array ( 'site_admin' => false, ), 'labels' => - array ( + array( 0 => - array ( + array( 'id' => 1153942272, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyMjcy', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/2019', @@ -227,7 +228,7 @@ return array ( 'default' => false, ), 1 => - array ( + array( 'id' => 1153942434, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNDM0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/App%20Team', @@ -236,7 +237,7 @@ return array ( 'default' => false, ), 2 => - array ( + array( 'id' => 1153942605, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNjA1', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Blockchain%20Team', @@ -245,7 +246,7 @@ return array ( 'default' => false, ), 3 => - array ( + array( 'id' => 647280744, 'node_id' => 'MDU6TGFiZWw2NDcyODA3NDQ=', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Epic', @@ -254,7 +255,7 @@ return array ( 'default' => false, ), 4 => - array ( + array( 'id' => 1153942704, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNzA0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Growth%20Team', @@ -263,7 +264,7 @@ return array ( 'default' => false, ), 5 => - array ( + array( 'id' => 1222257315, 'node_id' => 'MDU6TGFiZWwxMjIyMjU3MzE1', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Q1', @@ -272,7 +273,7 @@ return array ( 'default' => false, ), 6 => - array ( + array( 'id' => 1153942516, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNTE2', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/SDK%20Team', @@ -283,15 +284,15 @@ return array ( ), 'state' => 'open', 'locked' => false, - 'assignee' => NULL, + 'assignee' => null, 'assignees' => - array ( + array( ), - 'milestone' => NULL, + 'milestone' => null, 'comments' => 4, 'created_at' => '2018-12-07T16:24:18Z', 'updated_at' => '2019-02-05T23:58:59Z', - 'closed_at' => NULL, + 'closed_at' => null, 'author_association' => 'NONE', 'body_html' => '

Lbry.tech only soft-launched at the end of 2018 and the whitepaper and full specification of the protocol are only just being added as 2019 goals are being specified.

With these resources ready, LBRY should make a concerted effort to grow it’s technical reputation and 3rd-party development.

@@ -306,7 +307,7 @@ return array ( ', ), 3 => - array ( + array( 'url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/236', 'repository_url' => 'https://api.github.com/repos/lbryio/internal-issues', 'labels_url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/236/labels{/name}', @@ -318,7 +319,7 @@ return array ( 'number' => 236, 'title' => 'Robust Data Market', 'user' => - array ( + array( 'login' => 'kauffj', 'id' => 530774, 'node_id' => 'MDQ6VXNlcjUzMDc3NA==', @@ -339,9 +340,9 @@ return array ( 'site_admin' => false, ), 'labels' => - array ( + array( 0 => - array ( + array( 'id' => 1153942272, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyMjcy', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/2019', @@ -350,7 +351,7 @@ return array ( 'default' => false, ), 1 => - array ( + array( 'id' => 1153942605, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNjA1', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Blockchain%20Team', @@ -359,7 +360,7 @@ return array ( 'default' => false, ), 2 => - array ( + array( 'id' => 647280744, 'node_id' => 'MDU6TGFiZWw2NDcyODA3NDQ=', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Epic', @@ -368,7 +369,7 @@ return array ( 'default' => false, ), 3 => - array ( + array( 'id' => 1222257481, 'node_id' => 'MDU6TGFiZWwxMjIyMjU3NDgx', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Q4', @@ -377,7 +378,7 @@ return array ( 'default' => false, ), 4 => - array ( + array( 'id' => 1153942516, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNTE2', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/SDK%20Team', @@ -388,15 +389,15 @@ return array ( ), 'state' => 'open', 'locked' => false, - 'assignee' => NULL, + 'assignee' => null, 'assignees' => - array ( + array( ), - 'milestone' => NULL, + 'milestone' => null, 'comments' => 0, 'created_at' => '2018-12-07T16:23:17Z', 'updated_at' => '2019-02-05T23:52:51Z', - 'closed_at' => NULL, + 'closed_at' => null, 'author_association' => 'NONE', 'body_html' => '

While the LBRY data network is decentralized and designed to function without LBRY Inc. involvement, there’s room for improvement. The LBRY data network must improve incentives for participation and performance and ensure it has zero dependency on LBRY Inc. infrastructure.

This means ensuring that proper incentives exist to participate as a host or to fulfill any role that LBRY Inc. currently participates in (e.g. wallet servers).

@@ -408,7 +409,7 @@ return array ( ', ), 4 => - array ( + array( 'url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/235', 'repository_url' => 'https://api.github.com/repos/lbryio/internal-issues', 'labels_url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/235/labels{/name}', @@ -420,7 +421,7 @@ return array ( 'number' => 235, 'title' => 'Creator Partnerships', 'user' => - array ( + array( 'login' => 'kauffj', 'id' => 530774, 'node_id' => 'MDQ6VXNlcjUzMDc3NA==', @@ -441,9 +442,9 @@ return array ( 'site_admin' => false, ), 'labels' => - array ( + array( 0 => - array ( + array( 'id' => 1153942272, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyMjcy', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/2019', @@ -452,7 +453,7 @@ return array ( 'default' => false, ), 1 => - array ( + array( 'id' => 1153942434, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNDM0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/App%20Team', @@ -461,7 +462,7 @@ return array ( 'default' => false, ), 2 => - array ( + array( 'id' => 647280744, 'node_id' => 'MDU6TGFiZWw2NDcyODA3NDQ=', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Epic', @@ -470,7 +471,7 @@ return array ( 'default' => false, ), 3 => - array ( + array( 'id' => 1153942704, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNzA0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Growth%20Team', @@ -479,7 +480,7 @@ return array ( 'default' => false, ), 4 => - array ( + array( 'id' => 1222257364, 'node_id' => 'MDU6TGFiZWwxMjIyMjU3MzY0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Q2', @@ -490,15 +491,15 @@ return array ( ), 'state' => 'open', 'locked' => false, - 'assignee' => NULL, + 'assignee' => null, 'assignees' => - array ( + array( ), - 'milestone' => NULL, + 'milestone' => null, 'comments' => 1, 'created_at' => '2018-12-07T16:21:52Z', 'updated_at' => '2019-02-05T23:50:36Z', - 'closed_at' => NULL, + 'closed_at' => null, 'author_association' => 'NONE', 'body_html' => '

While LBRY has relationships with a large number of creators, many of these are weak or passive relationships.

LBRY must seek partnerships with creators that see enough value and potential in LBRY technology to proactively promote it, not just passively co-publish.

@@ -510,7 +511,7 @@ return array ( ', ), 5 => - array ( + array( 'url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/234', 'repository_url' => 'https://api.github.com/repos/lbryio/internal-issues', 'labels_url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/234/labels{/name}', @@ -522,7 +523,7 @@ return array ( 'number' => 234, 'title' => 'Protocol Performance', 'user' => - array ( + array( 'login' => 'kauffj', 'id' => 530774, 'node_id' => 'MDQ6VXNlcjUzMDc3NA==', @@ -543,9 +544,9 @@ return array ( 'site_admin' => false, ), 'labels' => - array ( + array( 0 => - array ( + array( 'id' => 1153942272, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyMjcy', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/2019', @@ -554,7 +555,7 @@ return array ( 'default' => false, ), 1 => - array ( + array( 'id' => 1153942434, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNDM0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/App%20Team', @@ -563,7 +564,7 @@ return array ( 'default' => false, ), 2 => - array ( + array( 'id' => 647280744, 'node_id' => 'MDU6TGFiZWw2NDcyODA3NDQ=', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Epic', @@ -572,7 +573,7 @@ return array ( 'default' => false, ), 3 => - array ( + array( 'id' => 1222257315, 'node_id' => 'MDU6TGFiZWwxMjIyMjU3MzE1', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Q1', @@ -581,7 +582,7 @@ return array ( 'default' => false, ), 4 => - array ( + array( 'id' => 1153942516, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNTE2', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/SDK%20Team', @@ -592,15 +593,15 @@ return array ( ), 'state' => 'open', 'locked' => false, - 'assignee' => NULL, + 'assignee' => null, 'assignees' => - array ( + array( ), - 'milestone' => NULL, + 'milestone' => null, 'comments' => 2, 'created_at' => '2018-12-07T16:21:00Z', 'updated_at' => '2019-02-05T23:53:00Z', - 'closed_at' => NULL, + 'closed_at' => null, 'author_association' => 'NONE', 'body_html' => '

Performance was a focus in 2018 to decent success. Failed streams were reduced by more than 66% and stream performance has improved substantially as well, especially with the final releases of 2018.

All of it is still not enough.

@@ -614,7 +615,7 @@ return array ( ', ), 6 => - array ( + array( 'url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/233', 'repository_url' => 'https://api.github.com/repos/lbryio/internal-issues', 'labels_url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/233/labels{/name}', @@ -626,7 +627,7 @@ return array ( 'number' => 233, 'title' => 'LBC Onramps / Offramps', 'user' => - array ( + array( 'login' => 'kauffj', 'id' => 530774, 'node_id' => 'MDQ6VXNlcjUzMDc3NA==', @@ -647,9 +648,9 @@ return array ( 'site_admin' => false, ), 'labels' => - array ( + array( 0 => - array ( + array( 'id' => 1153942272, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyMjcy', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/2019', @@ -658,7 +659,7 @@ return array ( 'default' => false, ), 1 => - array ( + array( 'id' => 1153942434, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNDM0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/App%20Team', @@ -667,7 +668,7 @@ return array ( 'default' => false, ), 2 => - array ( + array( 'id' => 647280744, 'node_id' => 'MDU6TGFiZWw2NDcyODA3NDQ=', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Epic', @@ -676,7 +677,7 @@ return array ( 'default' => false, ), 3 => - array ( + array( 'id' => 1153942704, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNzA0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Growth%20Team', @@ -685,7 +686,7 @@ return array ( 'default' => false, ), 4 => - array ( + array( 'id' => 1222257445, 'node_id' => 'MDU6TGFiZWwxMjIyMjU3NDQ1', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Q3', @@ -697,7 +698,7 @@ return array ( 'state' => 'open', 'locked' => false, 'assignee' => - array ( + array( 'login' => 'finer9', 'id' => 16390156, 'node_id' => 'MDQ6VXNlcjE2MzkwMTU2', @@ -718,9 +719,9 @@ return array ( 'site_admin' => false, ), 'assignees' => - array ( + array( 0 => - array ( + array( 'login' => 'finer9', 'id' => 16390156, 'node_id' => 'MDQ6VXNlcjE2MzkwMTU2', @@ -741,11 +742,11 @@ return array ( 'site_admin' => false, ), ), - 'milestone' => NULL, + 'milestone' => null, 'comments' => 0, 'created_at' => '2018-12-07T16:19:09Z', 'updated_at' => '2019-02-05T23:51:10Z', - 'closed_at' => NULL, + 'closed_at' => null, 'author_association' => 'NONE', 'body_html' => '

All current primary ways of acquiring and/or converting LBC (rewards, community, and exchanges) are either high effort or inflexible.

If we want creators to take LBC seriously, as well as allow users to participate fully, we need to provide a low friction way of converting to and from LBC to the currency they desire.

@@ -757,7 +758,7 @@ return array ( ', ), 7 => - array ( + array( 'url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/232', 'repository_url' => 'https://api.github.com/repos/lbryio/internal-issues', 'labels_url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/232/labels{/name}', @@ -769,7 +770,7 @@ return array ( 'number' => 232, 'title' => 'Creator Features', 'user' => - array ( + array( 'login' => 'kauffj', 'id' => 530774, 'node_id' => 'MDQ6VXNlcjUzMDc3NA==', @@ -790,9 +791,9 @@ return array ( 'site_admin' => false, ), 'labels' => - array ( + array( 0 => - array ( + array( 'id' => 1153942272, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyMjcy', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/2019', @@ -801,7 +802,7 @@ return array ( 'default' => false, ), 1 => - array ( + array( 'id' => 1153942434, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNDM0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/App%20Team', @@ -810,7 +811,7 @@ return array ( 'default' => false, ), 2 => - array ( + array( 'id' => 647280744, 'node_id' => 'MDU6TGFiZWw2NDcyODA3NDQ=', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Epic', @@ -819,7 +820,7 @@ return array ( 'default' => false, ), 3 => - array ( + array( 'id' => 1222257364, 'node_id' => 'MDU6TGFiZWwxMjIyMjU3MzY0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Q2', @@ -828,7 +829,7 @@ return array ( 'default' => false, ), 4 => - array ( + array( 'id' => 1153942516, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNTE2', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/SDK%20Team', @@ -839,15 +840,15 @@ return array ( ), 'state' => 'open', 'locked' => false, - 'assignee' => NULL, + 'assignee' => null, 'assignees' => - array ( + array( ), - 'milestone' => NULL, + 'milestone' => null, 'comments' => 1, 'created_at' => '2018-12-07T16:18:16Z', 'updated_at' => '2019-02-05T23:51:16Z', - 'closed_at' => NULL, + 'closed_at' => null, 'author_association' => 'NONE', 'body_html' => '

LBRY is a win for creators in terms of trust and earnings, but we have more to do in terms of the features creators expect out of a content distribution platform.

This includes giving them more control over the presentation of their work, more insight into how their content is performing, and an ability to provide proof about their identity.

@@ -860,7 +861,7 @@ return array ( ', ), 8 => - array ( + array( 'url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/231', 'repository_url' => 'https://api.github.com/repos/lbryio/internal-issues', 'labels_url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/231/labels{/name}', @@ -872,7 +873,7 @@ return array ( 'number' => 231, 'title' => 'Community Swarm', 'user' => - array ( + array( 'login' => 'kauffj', 'id' => 530774, 'node_id' => 'MDQ6VXNlcjUzMDc3NA==', @@ -893,9 +894,9 @@ return array ( 'site_admin' => false, ), 'labels' => - array ( + array( 0 => - array ( + array( 'id' => 1153942272, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyMjcy', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/2019', @@ -904,7 +905,7 @@ return array ( 'default' => false, ), 1 => - array ( + array( 'id' => 647280744, 'node_id' => 'MDU6TGFiZWw2NDcyODA3NDQ=', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Epic', @@ -913,7 +914,7 @@ return array ( 'default' => false, ), 2 => - array ( + array( 'id' => 1153942704, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNzA0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Growth%20Team', @@ -922,7 +923,7 @@ return array ( 'default' => false, ), 3 => - array ( + array( 'id' => 1222257364, 'node_id' => 'MDU6TGFiZWwxMjIyMjU3MzY0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Q2', @@ -933,15 +934,15 @@ return array ( ), 'state' => 'open', 'locked' => false, - 'assignee' => NULL, + 'assignee' => null, 'assignees' => - array ( + array( ), - 'milestone' => NULL, + 'milestone' => null, 'comments' => 0, 'created_at' => '2018-12-07T16:17:10Z', 'updated_at' => '2019-02-05T23:51:23Z', - 'closed_at' => NULL, + 'closed_at' => null, 'author_association' => 'NONE', 'body_html' => '

Existing community initiatives have relied too much on LBRY Inc. They do not scale, are resource intensive, require us to pick winners and losers under significant uncertainty, and hinder our ability to get traction internationally or in other areas where we’re less familiar.

In Q4 2018, the growth team drafted and began implementing a plan to massively scale community efforts. Currently titled the “swarm plan”, it involves appointing and empowering a large number of community members with explicit roles, responsibilities, and budgets. Swarms are community slices aligned along a geographic area or cultural interest.

@@ -955,7 +956,7 @@ return array ( ', ), 9 => - array ( + array( 'url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/229', 'repository_url' => 'https://api.github.com/repos/lbryio/internal-issues', 'labels_url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/229/labels{/name}', @@ -967,7 +968,7 @@ return array ( 'number' => 229, 'title' => 'Blockchain Bricklaying', 'user' => - array ( + array( 'login' => 'kauffj', 'id' => 530774, 'node_id' => 'MDQ6VXNlcjUzMDc3NA==', @@ -988,9 +989,9 @@ return array ( 'site_admin' => false, ), 'labels' => - array ( + array( 0 => - array ( + array( 'id' => 1153942272, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyMjcy', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/2019', @@ -999,7 +1000,7 @@ return array ( 'default' => false, ), 1 => - array ( + array( 'id' => 1153942605, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNjA1', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Blockchain%20Team', @@ -1008,7 +1009,7 @@ return array ( 'default' => false, ), 2 => - array ( + array( 'id' => 1222257445, 'node_id' => 'MDU6TGFiZWwxMjIyMjU3NDQ1', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Q3', @@ -1020,7 +1021,7 @@ return array ( 'state' => 'open', 'locked' => false, 'assignee' => - array ( + array( 'login' => 'BrannonKing', 'id' => 1509322, 'node_id' => 'MDQ6VXNlcjE1MDkzMjI=', @@ -1041,9 +1042,9 @@ return array ( 'site_admin' => false, ), 'assignees' => - array ( + array( 0 => - array ( + array( 'login' => 'BrannonKing', 'id' => 1509322, 'node_id' => 'MDQ6VXNlcjE1MDkzMjI=', @@ -1064,11 +1065,11 @@ return array ( 'site_admin' => false, ), ), - 'milestone' => NULL, + 'milestone' => null, 'comments' => 0, 'created_at' => '2018-12-07T16:12:04Z', 'updated_at' => '2019-02-05T23:51:34Z', - 'closed_at' => NULL, + 'closed_at' => null, 'author_association' => 'NONE', 'body_html' => '

The LBRY blockchain layer has done an admirable job through 2018. It’s seen substantial improvements in terms of claim expiration and normalization, as well as improved performance and organization.

Most importantly, the LBRY blockchain has remained secure, and the security of the blockchain layer is always goal number one.

@@ -1083,7 +1084,7 @@ return array ( ', ), 10 => - array ( + array( 'url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/227', 'repository_url' => 'https://api.github.com/repos/lbryio/internal-issues', 'labels_url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/227/labels{/name}', @@ -1095,7 +1096,7 @@ return array ( 'number' => 227, 'title' => 'Community Metadata', 'user' => - array ( + array( 'login' => 'kauffj', 'id' => 530774, 'node_id' => 'MDQ6VXNlcjUzMDc3NA==', @@ -1116,9 +1117,9 @@ return array ( 'site_admin' => false, ), 'labels' => - array ( + array( 0 => - array ( + array( 'id' => 1153942272, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyMjcy', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/2019', @@ -1127,7 +1128,7 @@ return array ( 'default' => false, ), 1 => - array ( + array( 'id' => 1153942434, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNDM0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/App%20Team', @@ -1136,7 +1137,7 @@ return array ( 'default' => false, ), 2 => - array ( + array( 'id' => 1153942605, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNjA1', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Blockchain%20Team', @@ -1145,7 +1146,7 @@ return array ( 'default' => false, ), 3 => - array ( + array( 'id' => 1153942704, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNzA0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Growth%20Team', @@ -1154,7 +1155,7 @@ return array ( 'default' => false, ), 4 => - array ( + array( 'id' => 1222257481, 'node_id' => 'MDU6TGFiZWwxMjIyMjU3NDgx', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Q4', @@ -1163,7 +1164,7 @@ return array ( 'default' => false, ), 5 => - array ( + array( 'id' => 1153942516, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNTE2', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/SDK%20Team', @@ -1175,7 +1176,7 @@ return array ( 'state' => 'open', 'locked' => false, 'assignee' => - array ( + array( 'login' => 'BrannonKing', 'id' => 1509322, 'node_id' => 'MDQ6VXNlcjE1MDkzMjI=', @@ -1196,9 +1197,9 @@ return array ( 'site_admin' => false, ), 'assignees' => - array ( + array( 0 => - array ( + array( 'login' => 'BrannonKing', 'id' => 1509322, 'node_id' => 'MDQ6VXNlcjE1MDkzMjI=', @@ -1219,11 +1220,11 @@ return array ( 'site_admin' => false, ), ), - 'milestone' => NULL, + 'milestone' => null, 'comments' => 3, 'created_at' => '2018-12-07T16:09:29Z', 'updated_at' => '2019-02-05T23:51:41Z', - 'closed_at' => NULL, + 'closed_at' => null, 'author_association' => 'NONE', 'body_html' => '

One downside of giving the publisher exclusive control over the metadata stored in the LBRY blockchain is that the publisher has exclusive control over the metadata stored in the LBRY blockchain. Less tautologically, metadata can sometimes be inaccurate, malicious, or immutable due to lost keys (though expiration handles this eventually we dont have expiration...).

The strongest solution to this problem is to allow community-based updates to metadata. Sometimes called “metadata overlays”, these are suggested changes or corrections to publisher-provided metadata. Such corrections could range from correcting errors, to correctly marking a file as containing adult content, to attributions that a file is maligned via a tag.

@@ -1237,7 +1238,7 @@ return array ( ', ), 11 => - array ( + array( 'url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/226', 'repository_url' => 'https://api.github.com/repos/lbryio/internal-issues', 'labels_url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/226/labels{/name}', @@ -1249,7 +1250,7 @@ return array ( 'number' => 226, 'title' => 'Multi-Device Experience', 'user' => - array ( + array( 'login' => 'kauffj', 'id' => 530774, 'node_id' => 'MDQ6VXNlcjUzMDc3NA==', @@ -1270,9 +1271,9 @@ return array ( 'site_admin' => false, ), 'labels' => - array ( + array( 0 => - array ( + array( 'id' => 1153942272, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyMjcy', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/2019', @@ -1281,7 +1282,7 @@ return array ( 'default' => false, ), 1 => - array ( + array( 'id' => 1153943283, 'node_id' => 'MDU6TGFiZWwxMTUzOTQzMjgz', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/API%20Team', @@ -1290,7 +1291,7 @@ return array ( 'default' => false, ), 2 => - array ( + array( 'id' => 1153942434, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNDM0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/App%20Team', @@ -1299,7 +1300,7 @@ return array ( 'default' => false, ), 3 => - array ( + array( 'id' => 1153942605, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNjA1', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Blockchain%20Team', @@ -1308,7 +1309,7 @@ return array ( 'default' => false, ), 4 => - array ( + array( 'id' => 1222257364, 'node_id' => 'MDU6TGFiZWwxMjIyMjU3MzY0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Q2', @@ -1317,7 +1318,7 @@ return array ( 'default' => false, ), 5 => - array ( + array( 'id' => 1153942516, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNTE2', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/SDK%20Team', @@ -1329,7 +1330,7 @@ return array ( 'state' => 'open', 'locked' => false, 'assignee' => - array ( + array( 'login' => 'skhameneh', 'id' => 1191370, 'node_id' => 'MDQ6VXNlcjExOTEzNzA=', @@ -1350,9 +1351,9 @@ return array ( 'site_admin' => false, ), 'assignees' => - array ( + array( 0 => - array ( + array( 'login' => 'skhameneh', 'id' => 1191370, 'node_id' => 'MDQ6VXNlcjExOTEzNzA=', @@ -1373,11 +1374,11 @@ return array ( 'site_admin' => false, ), ), - 'milestone' => NULL, + 'milestone' => null, 'comments' => 1, 'created_at' => '2018-12-07T16:08:19Z', 'updated_at' => '2019-02-05T23:51:54Z', - 'closed_at' => NULL, + 'closed_at' => null, 'author_association' => 'NONE', 'body_html' => '

Even with a mobile application in an early beta, we ran into user experience issues and confusion around the locality of wallets and other user data.

Regardless of the underlying architecture of LBRY, we must provide an emergent consumer experience that matches what they expect in other places: the ability to have the same views, data, and accounts across devices.

@@ -1389,7 +1390,7 @@ return array ( ', ), 12 => - array ( + array( 'url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/225', 'repository_url' => 'https://api.github.com/repos/lbryio/internal-issues', 'labels_url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/225/labels{/name}', @@ -1401,7 +1402,7 @@ return array ( 'number' => 225, 'title' => 'Internationalization', 'user' => - array ( + array( 'login' => 'kauffj', 'id' => 530774, 'node_id' => 'MDQ6VXNlcjUzMDc3NA==', @@ -1422,9 +1423,9 @@ return array ( 'site_admin' => false, ), 'labels' => - array ( + array( 0 => - array ( + array( 'id' => 1153942272, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyMjcy', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/2019', @@ -1433,7 +1434,7 @@ return array ( 'default' => false, ), 1 => - array ( + array( 'id' => 1153943283, 'node_id' => 'MDU6TGFiZWwxMTUzOTQzMjgz', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/API%20Team', @@ -1442,7 +1443,7 @@ return array ( 'default' => false, ), 2 => - array ( + array( 'id' => 1153942434, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNDM0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/App%20Team', @@ -1451,7 +1452,7 @@ return array ( 'default' => false, ), 3 => - array ( + array( 'id' => 1153942605, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNjA1', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Blockchain%20Team', @@ -1460,7 +1461,7 @@ return array ( 'default' => false, ), 4 => - array ( + array( 'id' => 647280744, 'node_id' => 'MDU6TGFiZWw2NDcyODA3NDQ=', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Epic', @@ -1469,7 +1470,7 @@ return array ( 'default' => false, ), 5 => - array ( + array( 'id' => 1153942704, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNzA0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Growth%20Team', @@ -1478,7 +1479,7 @@ return array ( 'default' => false, ), 6 => - array ( + array( 'id' => 1222257481, 'node_id' => 'MDU6TGFiZWwxMjIyMjU3NDgx', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Q4', @@ -1487,7 +1488,7 @@ return array ( 'default' => false, ), 7 => - array ( + array( 'id' => 1153942516, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNTE2', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/SDK%20Team', @@ -1499,7 +1500,7 @@ return array ( 'state' => 'open', 'locked' => false, 'assignee' => - array ( + array( 'login' => 'alyssaoc', 'id' => 26887062, 'node_id' => 'MDQ6VXNlcjI2ODg3MDYy', @@ -1520,9 +1521,9 @@ return array ( 'site_admin' => false, ), 'assignees' => - array ( + array( 0 => - array ( + array( 'login' => 'alyssaoc', 'id' => 26887062, 'node_id' => 'MDQ6VXNlcjI2ODg3MDYy', @@ -1543,11 +1544,11 @@ return array ( 'site_admin' => false, ), ), - 'milestone' => NULL, + 'milestone' => null, 'comments' => 2, 'created_at' => '2018-12-07T16:06:50Z', 'updated_at' => '2019-02-05T23:52:23Z', - 'closed_at' => NULL, + 'closed_at' => null, 'author_association' => 'NONE', 'body_html' => '

International audiences are a ripe target for adoption of LBRY for several reasons:

    @@ -1567,7 +1568,7 @@ return array (
', ), 13 => - array ( + array( 'url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/224', 'repository_url' => 'https://api.github.com/repos/lbryio/internal-issues', 'labels_url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/224/labels{/name}', @@ -1579,7 +1580,7 @@ return array ( 'number' => 224, 'title' => 'Discovery', 'user' => - array ( + array( 'login' => 'kauffj', 'id' => 530774, 'node_id' => 'MDQ6VXNlcjUzMDc3NA==', @@ -1600,9 +1601,9 @@ return array ( 'site_admin' => false, ), 'labels' => - array ( + array( 0 => - array ( + array( 'id' => 1153942272, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyMjcy', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/2019', @@ -1611,7 +1612,7 @@ return array ( 'default' => false, ), 1 => - array ( + array( 'id' => 1153943283, 'node_id' => 'MDU6TGFiZWwxMTUzOTQzMjgz', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/API%20Team', @@ -1620,7 +1621,7 @@ return array ( 'default' => false, ), 2 => - array ( + array( 'id' => 1153942434, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNDM0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/App%20Team', @@ -1629,7 +1630,7 @@ return array ( 'default' => false, ), 3 => - array ( + array( 'id' => 1222257364, 'node_id' => 'MDU6TGFiZWwxMjIyMjU3MzY0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Q2', @@ -1638,7 +1639,7 @@ return array ( 'default' => false, ), 4 => - array ( + array( 'id' => 1153942516, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNTE2', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/SDK%20Team', @@ -1649,15 +1650,15 @@ return array ( ), 'state' => 'open', 'locked' => false, - 'assignee' => NULL, + 'assignee' => null, 'assignees' => - array ( + array( ), - 'milestone' => NULL, + 'milestone' => null, 'comments' => 1, 'created_at' => '2018-12-07T16:05:09Z', 'updated_at' => '2019-02-05T23:53:14Z', - 'closed_at' => NULL, + 'closed_at' => null, 'author_association' => 'NONE', 'body_html' => '

Lackluster content discovery has throttled user engagement. While search has improved and subscriptions were added, existing experiences still do not do a sufficient job driving people to content that is interesting to them.

LBRY must look to improve discovery through any possible mechanism. The most promising avenues are:

@@ -1677,7 +1678,7 @@ return array ( ', ), 14 => - array ( + array( 'url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/223', 'repository_url' => 'https://api.github.com/repos/lbryio/internal-issues', 'labels_url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/223/labels{/name}', @@ -1689,7 +1690,7 @@ return array ( 'number' => 223, 'title' => 'Commenting', 'user' => - array ( + array( 'login' => 'kauffj', 'id' => 530774, 'node_id' => 'MDQ6VXNlcjUzMDc3NA==', @@ -1710,9 +1711,9 @@ return array ( 'site_admin' => false, ), 'labels' => - array ( + array( 0 => - array ( + array( 'id' => 1153942272, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyMjcy', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/2019', @@ -1721,7 +1722,7 @@ return array ( 'default' => false, ), 1 => - array ( + array( 'id' => 1153942434, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNDM0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/App%20Team', @@ -1730,7 +1731,7 @@ return array ( 'default' => false, ), 2 => - array ( + array( 'id' => 1153942605, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNjA1', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Blockchain%20Team', @@ -1739,7 +1740,7 @@ return array ( 'default' => false, ), 3 => - array ( + array( 'id' => 647280744, 'node_id' => 'MDU6TGFiZWw2NDcyODA3NDQ=', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Epic', @@ -1748,7 +1749,7 @@ return array ( 'default' => false, ), 4 => - array ( + array( 'id' => 1222257315, 'node_id' => 'MDU6TGFiZWwxMjIyMjU3MzE1', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Q1', @@ -1757,7 +1758,7 @@ return array ( 'default' => false, ), 5 => - array ( + array( 'id' => 1153942516, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNTE2', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/SDK%20Team', @@ -1768,15 +1769,15 @@ return array ( ), 'state' => 'open', 'locked' => false, - 'assignee' => NULL, + 'assignee' => null, 'assignees' => - array ( + array( ), - 'milestone' => NULL, + 'milestone' => null, 'comments' => 0, 'created_at' => '2018-12-07T16:04:03Z', 'updated_at' => '2019-02-05T23:52:00Z', - 'closed_at' => NULL, + 'closed_at' => null, 'author_association' => 'NONE', 'body_html' => '

In a decentralized system with no authority like LBRY, it is imperative that the community itself be able to provide feedback about the content itself. Is it legitimate? Is there a problem with it? Was it good?

One solution to this is comments. This is related to Community Metadata, but is a less thorny problem since it doesn’t pose the same user experience challenges. Any system that does this ought to meet the same egalitarian standard that LBRY itself aims for. Required attributes:

@@ -1793,7 +1794,7 @@ return array ( ', ), 15 => - array ( + array( 'url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/222', 'repository_url' => 'https://api.github.com/repos/lbryio/internal-issues', 'labels_url' => 'https://api.github.com/repos/lbryio/internal-issues/issues/222/labels{/name}', @@ -1805,7 +1806,7 @@ return array ( 'number' => 222, 'title' => 'LBRY on the Web', 'user' => - array ( + array( 'login' => 'kauffj', 'id' => 530774, 'node_id' => 'MDQ6VXNlcjUzMDc3NA==', @@ -1826,9 +1827,9 @@ return array ( 'site_admin' => false, ), 'labels' => - array ( + array( 0 => - array ( + array( 'id' => 1153942272, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyMjcy', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/2019', @@ -1837,7 +1838,7 @@ return array ( 'default' => false, ), 1 => - array ( + array( 'id' => 1153943283, 'node_id' => 'MDU6TGFiZWwxMTUzOTQzMjgz', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/API%20Team', @@ -1846,7 +1847,7 @@ return array ( 'default' => false, ), 2 => - array ( + array( 'id' => 1153942434, 'node_id' => 'MDU6TGFiZWwxMTUzOTQyNDM0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/App%20Team', @@ -1855,7 +1856,7 @@ return array ( 'default' => false, ), 3 => - array ( + array( 'id' => 647280744, 'node_id' => 'MDU6TGFiZWw2NDcyODA3NDQ=', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Epic', @@ -1864,7 +1865,7 @@ return array ( 'default' => false, ), 4 => - array ( + array( 'id' => 1222257364, 'node_id' => 'MDU6TGFiZWwxMjIyMjU3MzY0', 'url' => 'https://api.github.com/repos/lbryio/internal-issues/labels/Q2', @@ -1875,15 +1876,15 @@ return array ( ), 'state' => 'open', 'locked' => false, - 'assignee' => NULL, + 'assignee' => null, 'assignees' => - array ( + array( ), - 'milestone' => NULL, + 'milestone' => null, 'comments' => 0, 'created_at' => '2018-12-07T16:02:35Z', 'updated_at' => '2019-02-05T23:52:08Z', - 'closed_at' => NULL, + 'closed_at' => null, 'author_association' => 'NONE', 'body_html' => '

Providing a desktop-based application experience was a necessary step towards getting the protocol working and will always be necessary for people who want a complete, full, and uncontrolled LBRY experience.

We always knew most people wouldn’t want that. Installing an application is high friction and requires users to be fully responsible for their own security.

diff --git a/lib/routing/Dispatcher.class.php b/lib/routing/Dispatcher.class.php index 429ddcb5..cf56ecd4 100644 --- a/lib/routing/Dispatcher.class.php +++ b/lib/routing/Dispatcher.class.php @@ -69,12 +69,12 @@ class Dispatcher return false; } - return (boolean)$routes[$httpMethod]; + return (bool)$routes[$httpMethod]; } try { $handler = $this->dispatchVariableRoute($httpMethod, $uri); - return (boolean)$handler; + return (bool)$handler; } catch (HttpRouteNotFoundException | HttpMethodNotAllowedException $e) { return false; } diff --git a/lib/routing/HandlerResolver.class.php b/lib/routing/HandlerResolver.class.php index 7421d098..e67b1bae 100644 --- a/lib/routing/HandlerResolver.class.php +++ b/lib/routing/HandlerResolver.class.php @@ -7,7 +7,7 @@ class HandlerResolver implements HandlerResolverInterface public function resolve($handler) { if (is_array($handler) && is_string($handler[0])) { - $handler[0] = new $handler[0]; + $handler[0] = new $handler[0](); } return $handler; diff --git a/lib/routing/Route.class.php b/lib/routing/Route.class.php index ef8b9a6b..40e4a94f 100644 --- a/lib/routing/Route.class.php +++ b/lib/routing/Route.class.php @@ -7,19 +7,19 @@ class Route /** * Constants for before and after filters */ - const BEFORE = 'before'; - const AFTER = 'after'; - const PREFIX = 'prefix'; + public const BEFORE = 'before'; + public const AFTER = 'after'; + public const PREFIX = 'prefix'; /** * Constants for common HTTP methods */ - const ANY = 'ANY'; - const GET = 'GET'; - const HEAD = 'HEAD'; - const POST = 'POST'; - const PUT = 'PUT'; - const PATCH = 'PATCH'; - const DELETE = 'DELETE'; - const OPTIONS = 'OPTIONS'; + public const ANY = 'ANY'; + public const GET = 'GET'; + public const HEAD = 'HEAD'; + public const POST = 'POST'; + public const PUT = 'PUT'; + public const PATCH = 'PATCH'; + public const DELETE = 'DELETE'; + public const OPTIONS = 'OPTIONS'; } diff --git a/lib/routing/RouteCollector.class.php b/lib/routing/RouteCollector.class.php index ce60f0d7..f7e910e1 100644 --- a/lib/routing/RouteCollector.class.php +++ b/lib/routing/RouteCollector.class.php @@ -4,9 +4,9 @@ namespace Routing; class RouteCollector { - const DEFAULT_CONTROLLER_ROUTE = 'index'; + public const DEFAULT_CONTROLLER_ROUTE = 'index'; - const APPROX_CHUNK_SIZE = 10; + public const APPROX_CHUNK_SIZE = 10; /** * @var RouteParser diff --git a/lib/routing/RouteParser.class.php b/lib/routing/RouteParser.class.php index 79a34323..e26b1774 100644 --- a/lib/routing/RouteParser.class.php +++ b/lib/routing/RouteParser.class.php @@ -9,7 +9,6 @@ namespace Routing; */ class RouteParser { - /** * Search through the given route looking for dynamic portions. * @@ -22,7 +21,7 @@ class RouteParser * * Finally we look for an optional '?' which is used to signify an optional route. */ - const VARIABLE_REGEX = + public const VARIABLE_REGEX = "~\{ \s* ([a-zA-Z0-9_]*) \s* (?: @@ -33,7 +32,7 @@ class RouteParser /** * The default parameter character restriction (One or more characters that is not a '/'). */ - const DEFAULT_DISPATCH_REGEX = '[^/]+'; + public const DEFAULT_DISPATCH_REGEX = '[^/]+'; private $parts; diff --git a/lib/thirdparty/Github.class.php b/lib/thirdparty/Github.class.php index c1899317..d3365895 100644 --- a/lib/thirdparty/Github.class.php +++ b/lib/thirdparty/Github.class.php @@ -2,7 +2,7 @@ class Github { - const REPO_LBRY_DESKTOP = 'lbry-desktop'; + public const REPO_LBRY_DESKTOP = 'lbry-desktop'; public static function isAssetForOs(array $asset, string $os) { @@ -102,10 +102,10 @@ class Github } return CurlWithCache::get( - 'https://api.github.com' . $endpoint . '?' . http_build_query($params), - [], - ['headers' => $headers, 'user_agent' => 'LBRY', 'json_response' => true, 'cache' => $cache === true ? $twoHoursInSeconds : $cache] - ); + 'https://api.github.com' . $endpoint . '?' . http_build_query($params), + [], + ['headers' => $headers, 'user_agent' => 'LBRY', 'json_response' => true, 'cache' => $cache === true ? $twoHoursInSeconds : $cache] + ); } public static function listRoadmapItems($year, $cache = true) diff --git a/lib/thirdparty/LBRY.class.php b/lib/thirdparty/LBRY.class.php index b9a213fa..050bcf90 100644 --- a/lib/thirdparty/LBRY.class.php +++ b/lib/thirdparty/LBRY.class.php @@ -2,7 +2,7 @@ class LBRY { - const DEFAULT_TIMEOUT = 10; + public const DEFAULT_TIMEOUT = 10; public static function getApiUrl($endpoint) { @@ -15,8 +15,8 @@ class LBRY public static function listTags($authToken) { - $response = Curl::get(static::getApiUrl('/tag/list'), ['auth_token' => $authToken], ['json_response' => true]); - return $response['data'] ?? []; + $response = Curl::get(static::getApiUrl('/tag/list'), ['auth_token' => $authToken], ['json_response' => true]); + return $response['data'] ?? []; } public static function subscribe($email, $tag = null) @@ -31,9 +31,9 @@ class LBRY { list($status, $headers, $body) = Curl::doCurl( Curl::POST, - static::getApiUrl('/user_email/status'), - ['auth_token' => $token], - ['json_response' => true, 'timeout' => static::DEFAULT_TIMEOUT] + static::getApiUrl('/user_email/status'), + ['auth_token' => $token], + ['json_response' => true, 'timeout' => static::DEFAULT_TIMEOUT] ); return array($status,$headers,$body); } diff --git a/lib/thirdparty/Mailgun.class.php b/lib/thirdparty/Mailgun.class.php index 7860d729..7cb5dfe0 100644 --- a/lib/thirdparty/Mailgun.class.php +++ b/lib/thirdparty/Mailgun.class.php @@ -2,12 +2,12 @@ class Mailgun { - const BASE_URL = 'https://api.mailgun.net/v3'; + public const BASE_URL = 'https://api.mailgun.net/v3'; - const TOP_DOMAIN = 'lbry.com'; - const MAIL_DOMAIN = 'mail.lbry.com'; + public const TOP_DOMAIN = 'lbry.com'; + public const MAIL_DOMAIN = 'mail.lbry.com'; - const LIST_GENERAL = 'lbryians@lbry.com'; + public const LIST_GENERAL = 'lbryians@lbry.com'; public static function sendDmcaReport($data) { diff --git a/lib/thirdparty/Salesforce.class.php b/lib/thirdparty/Salesforce.class.php index 4601087b..fae84b13 100644 --- a/lib/thirdparty/Salesforce.class.php +++ b/lib/thirdparty/Salesforce.class.php @@ -2,7 +2,7 @@ class Salesforce { - const + public const API_URL = 'https://api.salesforceiq.com/v2/', DEFAULT_LIST_ID = '58387a94e4b0a1fea2c76f4a'; diff --git a/lib/thirdparty/Transifex.class.php b/lib/thirdparty/Transifex.class.php index 68bbb333..54439286 100644 --- a/lib/thirdparty/Transifex.class.php +++ b/lib/thirdparty/Transifex.class.php @@ -5,7 +5,7 @@ class Transifex { public static function isConfigured() { - return (boolean)Config::get(Config::TRANSIFEX_API_KEY); + return (bool)Config::get(Config::TRANSIFEX_API_KEY); } public static function getTranslationResourceFile($project, $resource, $language, $cache = true) diff --git a/lib/tools/Config.class.php b/lib/tools/Config.class.php index 8143e7dc..8590f58a 100644 --- a/lib/tools/Config.class.php +++ b/lib/tools/Config.class.php @@ -2,26 +2,26 @@ class Config { - const HELP_CONTACT_EMAIL = 'hello@lbry.com'; + public const HELP_CONTACT_EMAIL = 'hello@lbry.com'; //Constant to help with managing strings - const IS_PROD = "is_prod"; - const CHAINQUERY_DSN = 'chainquery_dsn'; - const CHAINQUERY_USERNAME = 'chainquery_username'; - const CHAINQUERY_PASSWORD = 'chainquery_password'; - const GITHUB_KEY = "github_key"; - const GITHUB_APP_CLIENT_ID = "github_app_client_id"; - const GITHUB_APP_CLIENT_SECRET = "github_app_client_secret"; - const GITHUB_PERSONAL_AUTH_TOKEN = 'github_personal_auth_token'; - const LBRY_API_SERVER = "lbry_api_server"; - const MAILCHIMP_KEY = "mailchimp_key"; - const TRANSIFEX_API_KEY = 'transifex_api_key'; - const AWS_LOG_ACCESS_KEY = "aws_log_access_key"; - const AWS_LOG_SECRET_KEY = "aws_log_secret_key"; - const MAILGUN_API_KEY = "mailgun_api_key"; - const SALESFORCE_KEY = "salesforce_key"; - const SALESFORCE_SECRET = "salesforce_secret"; - const SLACK_ERROR_NOTIFICATION_URL = "slack_error_notification_url"; + public const IS_PROD = "is_prod"; + public const CHAINQUERY_DSN = 'chainquery_dsn'; + public const CHAINQUERY_USERNAME = 'chainquery_username'; + public const CHAINQUERY_PASSWORD = 'chainquery_password'; + public const GITHUB_KEY = "github_key"; + public const GITHUB_APP_CLIENT_ID = "github_app_client_id"; + public const GITHUB_APP_CLIENT_SECRET = "github_app_client_secret"; + public const GITHUB_PERSONAL_AUTH_TOKEN = 'github_personal_auth_token'; + public const LBRY_API_SERVER = "lbry_api_server"; + public const MAILCHIMP_KEY = "mailchimp_key"; + public const TRANSIFEX_API_KEY = 'transifex_api_key'; + public const AWS_LOG_ACCESS_KEY = "aws_log_access_key"; + public const AWS_LOG_SECRET_KEY = "aws_log_secret_key"; + public const MAILGUN_API_KEY = "mailgun_api_key"; + public const SALESFORCE_KEY = "salesforce_key"; + public const SALESFORCE_SECRET = "salesforce_secret"; + public const SLACK_ERROR_NOTIFICATION_URL = "slack_error_notification_url"; protected static $loaded = false; diff --git a/lib/tools/Curl.class.php b/lib/tools/Curl.class.php index 2dc0ce6f..a11c2438 100644 --- a/lib/tools/Curl.class.php +++ b/lib/tools/Curl.class.php @@ -2,7 +2,7 @@ class Curl { - const + public const GET = 'GET', POST = 'POST', PUT = 'PUT', diff --git a/lib/tools/CurlWithCache.class.php b/lib/tools/CurlWithCache.class.php index 01682f5f..be21fd08 100644 --- a/lib/tools/CurlWithCache.class.php +++ b/lib/tools/CurlWithCache.class.php @@ -2,7 +2,7 @@ class CurlWithCache extends Curl { - const DEFAULT_CACHE = 600000; + public const DEFAULT_CACHE = 600000; public static function doCurl($method, $url, $params = [], $options = []) { diff --git a/lib/tools/Debug.class.php b/lib/tools/Debug.class.php index 5c71e7f6..8d94f4a3 100644 --- a/lib/tools/Debug.class.php +++ b/lib/tools/Debug.class.php @@ -26,13 +26,13 @@ class Debug $args = isset($frame['args']) ? static::exceptionFrameArgsToString($frame['args']) : ''; $rtn .= sprintf( - "#%s %s(%s): %s(%s)\n", - $count, - $frame['file'] ?? 'unknown file', - $frame['line'] ?? 'unknown line', - isset($frame['class']) ? $frame['class'].$frame['type'].$frame['function'] : $frame['function'], - $args - ); + "#%s %s(%s): %s(%s)\n", + $count, + $frame['file'] ?? 'unknown file', + $frame['line'] ?? 'unknown line', + isset($frame['class']) ? $frame['class'].$frame['type'].$frame['function'] : $frame['function'], + $args + ); } return $rtn; } diff --git a/lib/tools/OS.class.php b/lib/tools/OS.class.php index f1f97adb..dd4a73e0 100644 --- a/lib/tools/OS.class.php +++ b/lib/tools/OS.class.php @@ -5,7 +5,7 @@ class OS /* * if changing below constants, you should add permanent redirects for old OS names used in URLs */ - const OS_ANDROID = 'android', + public const OS_ANDROID = 'android', OS_IOS = 'ios', OS_LINUX = 'linux', OS_OSX = 'osx', diff --git a/lib/tools/Smaz.class.php b/lib/tools/Smaz.class.php index 3a2b8783..fd480ca3 100644 --- a/lib/tools/Smaz.class.php +++ b/lib/tools/Smaz.class.php @@ -13,11 +13,11 @@ */ class Smaz { - const CODEBOOK_DEFAULT = 'default'; - const CODEBOOK_EMAIL = 'email'; + public const CODEBOOK_DEFAULT = 'default'; + public const CODEBOOK_EMAIL = 'email'; - const VERBATIM_CHAR = 254; - const VERBATIM_STR = 255; + public const VERBATIM_CHAR = 254; + public const VERBATIM_STR = 255; protected static $encodeBooks = []; protected static $decodeBooks = [ diff --git a/model/Post.class.php b/model/Post.class.php index 72f089da..c4640bd4 100644 --- a/model/Post.class.php +++ b/model/Post.class.php @@ -1,6 +1,8 @@ getMetadata(); foreach ($filters as $filterAttr => $filterValue) { if (!isset($metadata[$filterAttr]) || ( - ($metadata[$filterAttr] != $filterValue) && + ($metadata[$filterAttr] != $filterValue) && (!is_array($metadata[$filterAttr]) || !in_array($filterValue, $metadata[$filterAttr])) - )) { + )) { return false; } } @@ -311,7 +313,7 @@ class Post $metadata = $this->getMetadata(); if (isset($metadata['og']) && $metadata['og']) { - $urls[] = $metadata['og']; + $urls[] = $metadata['og']; } $cover = $this->getCover(); diff --git a/php-cs-fixer b/php-cs-fixer index e4df4dcf..f490357f 100755 Binary files a/php-cs-fixer and b/php-cs-fixer differ diff --git a/view/Response.class.php b/view/Response.class.php index ac1b5ab9..8112754e 100644 --- a/view/Response.class.php +++ b/view/Response.class.php @@ -2,18 +2,18 @@ class Response { - const HEADER_STATUS = 'Status'; - const HEADER_LOCATION = 'Location'; + public const HEADER_STATUS = 'Status'; + public const HEADER_LOCATION = 'Location'; - const HEADER_CACHE_CONTROL = 'Cache-Control'; - const HEADER_ETAG = 'Etag'; + public const HEADER_CACHE_CONTROL = 'Cache-Control'; + public const HEADER_ETAG = 'Etag'; - const HEADER_CONTENT_TYPE = 'Content-Type'; - const HEADER_CONTENT_LENGTH = 'Content-Length'; - const HEADER_CONTENT_DISPOSITION = 'Content-Disposition'; - const HEADER_CONTENT_TYPE_OPTIONS = 'X-Content-Type-Options'; - const HEADER_CONTENT_ENCODING = 'Content-Encoding'; - const HEADER_CROSS_ORIGIN = 'Access-Control-Allow-Origin'; + public const HEADER_CONTENT_TYPE = 'Content-Type'; + public const HEADER_CONTENT_LENGTH = 'Content-Length'; + public const HEADER_CONTENT_DISPOSITION = 'Content-Disposition'; + public const HEADER_CONTENT_TYPE_OPTIONS = 'X-Content-Type-Options'; + public const HEADER_CONTENT_ENCODING = 'Content-Encoding'; + public const HEADER_CROSS_ORIGIN = 'Access-Control-Allow-Origin'; protected static $metaDescription = ''; protected static $metaTitle = ''; @@ -357,12 +357,12 @@ class Response protected static function normalizeHeaderName($name): string { return preg_replace_callback( - '/\-(.)/', - function ($matches) { + '/\-(.)/', + function ($matches) { return '-' . strtoupper($matches[1]); }, - strtr(ucfirst(strtolower($name)), '_', '-') - ); + strtr(ucfirst(strtolower($name)), '_', '-') + ); } public static function addPostRenderCallback($cb) diff --git a/view/View.class.php b/view/View.class.php index 7c06cc88..5643593c 100644 --- a/view/View.class.php +++ b/view/View.class.php @@ -12,14 +12,14 @@ function js_end() class View { - const LAYOUT_PARAMS = '_layout_params'; + public const LAYOUT_PARAMS = '_layout_params'; - const WEB_DIR = ROOT_DIR . '/web'; - const COMPONENTS_DIR = self::WEB_DIR . '/components/sass'; - const COLORS_DIR = self::WEB_DIR . '/scss/color'; - const SCSS_DIR = self::WEB_DIR . '/scss'; - const CSS_DIR = self::WEB_DIR . '/css'; - const JS_DIR = self::WEB_DIR . '/js'; + public const WEB_DIR = ROOT_DIR . '/web'; + public const COMPONENTS_DIR = self::WEB_DIR . '/components/sass'; + public const COLORS_DIR = self::WEB_DIR . '/scss/color'; + public const SCSS_DIR = self::WEB_DIR . '/scss'; + public const CSS_DIR = self::WEB_DIR . '/css'; + public const JS_DIR = self::WEB_DIR . '/js'; public static function render($template, array $vars = []): string { @@ -193,8 +193,7 @@ class View } return $parser->saveHTML($dom); - } - catch (Error $e) { + } catch (Error $e) { Slack::slackGrin(); return $html; } diff --git a/view/template/internal/json.php b/view/template/internal/json.php index 16d3ab1e..45df6f45 100644 --- a/view/template/internal/json.php +++ b/view/template/internal/json.php @@ -1 +1,3 @@ -