Showing 1,326 of 1,561 total issues
Method cropPhoto
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function cropPhoto(Request $request)
{
abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404);
$this->validate($request, [
Method store
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function store(ProfileMigrationStoreRequest $request)
{
abort_if((bool) config_cache('federation.activitypub.enabled') === false, 404);
$acct = WebfingerService::rawGet($request->safe()->acct);
if (! $acct) {
Method settings
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function settings(Request $request)
{
$cloud_storage = ConfigCacheService::get('pixelfed.cloud_storage');
$cloud_disk = config('filesystems.cloud');
$cloud_ready = ! empty(config('filesystems.disks.'.$cloud_disk.'.key')) && ! empty(config('filesystems.disks.'.$cloud_disk.'.secret'));
Method instanceEdit
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function instanceEdit(Request $request, $id)
{
$this->validate($request, [
'action' => [
'required',
Method instances
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function instances(Request $request)
{
abort_if(!$request->user() || !$request->user()->token(), 404);
abort_unless($request->user()->is_admin == 1, 404);
Method statusById
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function statusById(Request $request, $id)
{
abort_if(! $request->user() || ! $request->user()->token(), 403);
abort_unless($request->user()->tokenCan('read'), 403);
Method notifications
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function notifications(Request $request)
{
abort_if(!$request->user(), 403);
$pid = $request->user()->profile_id;
Method updateFeatures
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateFeatures(Request $request)
{
abort_if(! $request->user(), 404);
abort_if(! $request->user()->is_admin, 404);
$pid = $request->user()->profile_id;
Method store
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function store(Request $request)
{
abort_if(!$request->user(), 403);
$this->validate($request, [
Method handleLikeActivity
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handleLikeActivity()
{
$actor = $this->payload['actor'];
if(!Helpers::validateUrl($actor)) {
Method handle
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle()
{
$status = $this->status;
$actor = $status->profile;
$parent = Status::find($status->reblog_of_id);
Method updateImmediateAttributes
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function updateImmediateAttributes($status, $activity)
{
if (isset($activity['content'])) {
$status->caption = strip_tags($activity['content']);
$status->rendered = Purify::clean($activity['content']);
Method handleOrderedCollection
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handleOrderedCollection()
{
$outbox = $this->outbox;
if (!isset($outbox['next']) && !isset($outbox['first']['next']) && $this->cursor !== 1) {
Method getAudienceInboxes
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getAudienceInboxes($pid, $scope = null)
{
$key = 'pf:services:follower:audience:' . $pid;
$domains = Cache::remember($key, 432000, function() use($pid) {
$profile = Profile::whereNull(['status', 'domain'])->find($pid);
Method searchMentionAutocomplete
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function searchMentionAutocomplete(Request $request)
{
abort_if(! $request->user(), 403);
$this->validate($request, [
Method settingsSystem
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function settingsSystem(Request $request)
{
$sys = [
'pixelfed' => config('pixelfed.version'),
'php' => phpversion(),
Method placesById
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function placesById(Request $request, $id, $slug)
{
abort_if(!$request->user() || !$request->user()->token(), 403);
abort_unless($request->user()->tokenCan('read'), 403);
Method getAuthDomains
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAuthDomains(Request $request)
{
abort_unless((
config_cache('pixelfed.open_registration') &&
config('remote-auth.mastodon.enabled')
Method read
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function read(Request $request)
{
$this->validate($request, [
'id' => 'required',
'type' => 'required|in:post.cw,post.removed,post.unlist,post.autospam',
Method accountLoginActivity
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function accountLoginActivity(Request $request)
{
abort_if(!$request->user() || !$request->user()->token(), 403);
abort_unless($request->user()->tokenCan('read'), 403);