Showing 1,327 of 1,560 total issues
Method embed
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function embed(Request $request, $username)
{
$res = view('profile.embed-removed');
if (! (bool) config_cache('instance.embed.profile')) {
Method settingsApiUpdateMediaType
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function settingsApiUpdateMediaType($request)
{
$this->validate($request, [
'image_quality' => 'required|integer|min:1|max:100',
'max_album_length' => 'required|integer|min:1|max:20',
Method passwordUpdate
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function passwordUpdate(Request $request)
{
$this->validate($request, [
'current' => 'required|string',
'password' => 'required|string',
Method store
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function store(Request $request)
{
abort_unless($request->user(), 404);
$this->validate($request, [
Method hashtagsApi
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function hashtagsApi(Request $request)
{
$this->validate($request, [
'action' => 'sometimes|in:banned,nsfw',
'sort' => 'sometimes|in:id,name,cached_count,can_search,can_trend,is_banned,is_nsfw',
Method apiEmailCheck
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function apiEmailCheck(Request $request)
{
$this->validate($request, [
'token' => 'required',
'email' => 'required'
Method statusState
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function statusState(Request $request, $username, int $postid)
{
$profile = Profile::whereUsername($username)->whereNull('status')->firstOrFail();
$status = Status::whereProfileId($profile->id)->findOrFail($postid);
$this->scopeCheck($profile, $status);
Method handle
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle()
{
if(config('app.env') !== 'local') {
$this->error('This command is meant for development purposes and should only be run in a local environment');
return Command::FAILURE;
Method actorObject
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function actorObject($profile)
{
$permalink = $profile->permalink();
return [
'id' => $permalink,
Function Blob
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Blob (chunks, opts) {
chunks = chunks || []
opts = opts == null ? {} : opts
for (var i = 0, len = chunks.length; i < len; i++) {
var chunk = chunks[i]
Method handle
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(): void
{
if(!config('exp.cached_home_timeline')) {
return;
}
Method handle
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle()
{
$media = $this->media;
if(!$media) {
return;
Method hashtags
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function hashtags()
{
$mastodonMode = self::$mastodonMode;
$q = $this->query->input('q');
$limit = $this->query->input('limit') ?? 20;
Method show
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function show(Request $request, $username)
{
if ($request->wantsJson() && (bool) config_cache('federation.activitypub.enabled')) {
$user = $this->getCachedUser($username, true);
abort_if(! $user, 404, 'Not found');
Method handle
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle($request, Closure $next)
{
$ar = [
'login',
'logout',
Method reportMailVerifications
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function reportMailVerifications(Request $request)
{
$ids = Redis::smembers('email:manual');
$ignored = Redis::smembers('email:manual-ignored');
$reports = [];
Method getTrending
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getTrending()
{
$minId = self::getMinRecentId();
$skipIds = array_merge(self::getBannedHashtags(), self::getNonTrendingHashtags(), self::getNsfwHashtags());
Method media
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function media(Request $request)
{
$this->validate($request, [
'layout' => [
'nullable',
Method directoryDeleteBannerImage
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function directoryDeleteBannerImage(Request $request)
{
$bannerImage = ConfigCache::whereK('app.banner_image')->first();
$directory = ConfigCache::whereK('pixelfed.directory')->first();
if (! $bannerImage && ! $directory || empty($directory->v)) {
Method getUser
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getUser(Request $request)
{
abort_if(!$request->user() || !$request->user()->token(), 404);
abort_unless($request->user()->is_admin == 1, 404);