Showing 1,326 of 1,561 total issues
Method handle
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle()
{
$profile = $this->profile;
$client = new Client([
Method publishStoryPoll
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function publishStoryPoll(Request $request)
{
abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404);
$this->validate($request, [
Method accountUnfollowById
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function accountUnfollowById(Request $request, $id)
{
abort_if(! $request->user() || ! $request->user()->token(), 403);
abort_unless($request->user()->tokenCan('follow'), 403);
Function stringEncode
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function stringEncode (string) {
var pos = 0
var len = string.length
var Arr = global.Uint8Array || Array // Use byte array when possible
Method blindKeyRotation
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function blindKeyRotation($headers, $profile, $payload)
{
$signature = is_array($headers['signature']) ? $headers['signature'][0] : $headers['signature'];
$date = is_array($headers['date']) ? $headers['date'][0] : $headers['date'];
if(!$signature) {
Method remoteAnnounceDeliver
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function remoteAnnounceDeliver()
{
if (config('app.env') !== 'production' || (bool) config_cache('federation.activitypub.enabled') == false) {
return true;
}
Method handle
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle()
{
$story = $this->story;
$profile = $story->profile;
Method blindKeyRotation
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function blindKeyRotation($headers, $payload)
{
$signature = is_array($headers['signature']) ? $headers['signature'][0] : $headers['signature'];
$date = is_array($headers['date']) ? $headers['date'][0] : $headers['date'];
if(!$signature) {
Method blindKeyRotation
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function blindKeyRotation($headers, $payload)
{
$signature = is_array($headers['signature']) ? $headers['signature'][0] : $headers['signature'];
$date = is_array($headers['date']) ? $headers['date'][0] : $headers['date'];
if(!$signature) {
Method directoryHandleServerSubmission
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function directoryHandleServerSubmission(Request $request)
{
$reqs = [];
$reqs['feature_config'] = [
'open_registration' => (bool) config_cache('pixelfed.open_registration'),
Method show
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function show(Request $request, $username, $id)
{
// redirect authed users to Metro 2.0
if ($request->user()) {
// unless they force static view
Method trendingApi
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function trendingApi(Request $request)
{
abort_if(config('instance.discover.public') == false && ! $request->user(), 403);
$this->validate($request, [
Method store
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function store(Request $request)
{
$this->validate($request, [
'item' => 'required|integer|min:1',
]);
Method statusComments
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function statusComments(Request $request, $username, int $postId)
{
$this->validate($request, [
'min_id' => 'nullable|integer|min:1',
'max_id' => 'nullable|integer|min:1|max:'.PHP_INT_MAX,
Method hugeMode
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function hugeMode($minId, $limit, $log)
{
$cloudDisk = Storage::disk(config('filesystems.cloud'));
$localDisk = Storage::disk('local');
Method handle
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(): void
{
$this->info(' ____ _ ______ __ ');
$this->info(' / __ \(_) _____ / / __/__ ____/ / ');
$this->info(' / /_/ / / |/_/ _ \/ / /_/ _ \/ __ / ');
Method updateMedia
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function updateMedia($status, $activity)
{
if (! isset($activity['attachment'])) {
return;
}
Method fanoutExpiry
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function fanoutExpiry()
{
$story = $this->story;
$profile = $story->profile;
Method run
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function run($query)
{
$this->query = $query;
$q = urldecode($query->input('q'));
Method cleanup
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function cleanup($avatar, $confirm = false)
{
if(!$avatar || !$confirm) {
return;
}