pixelfed/pixelfed

View on GitHub

Showing 1,558 of 1,561 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        if (config('database.default') == 'pgsql') {
            $s = Cache::remember(self::RECENT_KEY.$pid, self::RECENT_TTL, function () use ($pid) {
                return Story::select('stories.*', 'followers.following_id')
                    ->leftJoin('followers', 'followers.following_id', 'stories.profile_id')
                    ->where('followers.profile_id', $pid)
Severity: Major
Found in app/Http/Controllers/Stories/StoryApiV1Controller.php and 1 other location - About 1 day to fix
app/Http/Controllers/Stories/StoryApiV1Controller.php on lines 36..62

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 272.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        Route::group(['prefix' => 'local'], function () {
            // Route::post('status/compose', 'InternalApiController@composePost')->middleware('throttle:maxPostsPerHour,60')->middleware('throttle:maxPostsPerDay,1440');
            Route::get('exp/rec', 'ApiController@userRecommendations');
            Route::post('discover/tag/subscribe', 'HashtagFollowController@store');
            Route::get('discover/tag/list', 'HashtagFollowController@getTags');
Severity: Major
Found in routes/web-api.php and 1 other location - About 1 day to fix
routes/web-api.php on lines 64..84

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 270.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            Route::group(['prefix' => 'v1'], function() {
                Route::get('accounts/verify_credentials', 'ApiController@verifyCredentials');
                Route::get('accounts/relationships', 'Api\ApiV1Controller@accountRelationshipsById');
                Route::get('accounts/search', 'Api\ApiV1Controller@accountSearch');
                Route::get('accounts/{id}/statuses', 'PublicApiController@accountStatuses');
Severity: Major
Found in routes/web-api.php and 1 other location - About 1 day to fix
routes/web-api.php on lines 122..146

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 270.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Method timelineHome has 223 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function timelineHome(Request $request)
    {
        abort_if(! $request->user() || ! $request->user()->token(), 403);
        abort_unless($request->user()->tokenCan('read'), 403);

Severity: Major
Found in app/Http/Controllers/Api/ApiV1Controller.php - About 1 day to fix

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

        protected function banInstance()
        {
            $id = search(
                'Search by domain',
                fn (string $value) => strlen($value) > 0
    Severity: Major
    Found in app/Console/Commands/InstanceManager.php and 3 other locations - About 1 day to fix
    app/Console/Commands/InstanceManager.php on lines 102..140
    app/Console/Commands/InstanceManager.php on lines 142..180
    app/Console/Commands/InstanceManager.php on lines 222..260

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 262.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

        protected function unlistInstance()
        {
            $id = search(
                'Search by domain',
                fn (string $value) => strlen($value) > 0
    Severity: Major
    Found in app/Console/Commands/InstanceManager.php and 3 other locations - About 1 day to fix
    app/Console/Commands/InstanceManager.php on lines 142..180
    app/Console/Commands/InstanceManager.php on lines 182..220
    app/Console/Commands/InstanceManager.php on lines 222..260

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 262.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

        protected function unbanInstance()
        {
            $id = search(
                'Search by domain',
                fn (string $value) => strlen($value) > 0
    Severity: Major
    Found in app/Console/Commands/InstanceManager.php and 3 other locations - About 1 day to fix
    app/Console/Commands/InstanceManager.php on lines 102..140
    app/Console/Commands/InstanceManager.php on lines 142..180
    app/Console/Commands/InstanceManager.php on lines 182..220

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 262.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

        protected function relistInstance()
        {
            $id = search(
                'Search by domain',
                fn (string $value) => strlen($value) > 0
    Severity: Major
    Found in app/Console/Commands/InstanceManager.php and 3 other locations - About 1 day to fix
    app/Console/Commands/InstanceManager.php on lines 102..140
    app/Console/Commands/InstanceManager.php on lines 182..220
    app/Console/Commands/InstanceManager.php on lines 222..260

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 262.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        public static function blocks(int $profile_id)
        {
            $key = self::USER_BLOCKS_KEY . $profile_id;
            $warm = Cache::has($key . ':cached-v0');
            if($warm) {
    Severity: Major
    Found in app/Services/UserFilterService.php and 1 other location - About 1 day to fix
    app/Services/UserFilterService.php on lines 16..47

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 261.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        public static function mutes(int $profile_id)
        {
            $key = self::USER_MUTES_KEY . $profile_id;
            $warm = Cache::has($key . ':cached-v0');
            if($warm) {
    Severity: Major
    Found in app/Services/UserFilterService.php and 1 other location - About 1 day to fix
    app/Services/UserFilterService.php on lines 49..80

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 261.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 6 locations. Consider refactoring.
    Open

                    $dms = DirectMessage::selectRaw('*, max(created_at) as createdAt')
                    ->whereToId($profile)
                    ->with(['author','status'])
                    ->whereIsHidden(false)
                    ->groupBy('from_id')
    Severity: Major
    Found in app/Http/Controllers/DirectMessageController.php and 5 other locations - About 1 day to fix
    app/Http/Controllers/DirectMessageController.php on lines 55..92
    app/Http/Controllers/DirectMessageController.php on lines 96..132
    app/Http/Controllers/DirectMessageController.php on lines 136..173
    app/Http/Controllers/DirectMessageController.php on lines 218..254
    app/Http/Controllers/DirectMessageController.php on lines 258..295

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 256.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 6 locations. Consider refactoring.
    Open

                    $dms = DirectMessage::selectRaw('*, max(created_at) as createdAt')
                    ->whereToId($profile)
                    ->with(['author','status'])
                    ->whereIsHidden(true)
                    ->groupBy('from_id')
    Severity: Major
    Found in app/Http/Controllers/DirectMessageController.php and 5 other locations - About 1 day to fix
    app/Http/Controllers/DirectMessageController.php on lines 55..92
    app/Http/Controllers/DirectMessageController.php on lines 96..132
    app/Http/Controllers/DirectMessageController.php on lines 136..173
    app/Http/Controllers/DirectMessageController.php on lines 177..214
    app/Http/Controllers/DirectMessageController.php on lines 218..254

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 256.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 6 locations. Consider refactoring.
    Open

                    $dms = DirectMessage::selectRaw('*, max(created_at) as createdAt')
                    ->whereFromId($profile)
                    ->with(['author','status'])
                    ->groupBy('to_id')
                    ->orderBy('createdAt', 'desc')
    Severity: Major
    Found in app/Http/Controllers/DirectMessageController.php and 5 other locations - About 1 day to fix
    app/Http/Controllers/DirectMessageController.php on lines 55..92
    app/Http/Controllers/DirectMessageController.php on lines 96..132
    app/Http/Controllers/DirectMessageController.php on lines 136..173
    app/Http/Controllers/DirectMessageController.php on lines 177..214
    app/Http/Controllers/DirectMessageController.php on lines 258..295

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 256.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 6 locations. Consider refactoring.
    Open

                    $dms = DirectMessage::select('id', 'type', 'to_id', 'from_id', 'id', 'status_id', 'is_hidden', 'meta', 'created_at', 'read_at')
                    ->whereToId($profile)
                    ->with(['author','status'])
                    ->whereIsHidden(false)
                    ->when($page, function($q, $page) {
    Severity: Major
    Found in app/Http/Controllers/DirectMessageController.php and 5 other locations - About 1 day to fix
    app/Http/Controllers/DirectMessageController.php on lines 96..132
    app/Http/Controllers/DirectMessageController.php on lines 136..173
    app/Http/Controllers/DirectMessageController.php on lines 177..214
    app/Http/Controllers/DirectMessageController.php on lines 218..254
    app/Http/Controllers/DirectMessageController.php on lines 258..295

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 256.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 6 locations. Consider refactoring.
    Open

                    $dms = DirectMessage::select('id', 'type', 'to_id', 'from_id', 'id', 'status_id', 'is_hidden', 'meta', 'created_at', 'read_at')
                    ->whereFromId($profile)
                    ->with(['author','status'])
                    ->orderBy('id', 'desc')
                    ->when($page, function($q, $page) {
    Severity: Major
    Found in app/Http/Controllers/DirectMessageController.php and 5 other locations - About 1 day to fix
    app/Http/Controllers/DirectMessageController.php on lines 55..92
    app/Http/Controllers/DirectMessageController.php on lines 136..173
    app/Http/Controllers/DirectMessageController.php on lines 177..214
    app/Http/Controllers/DirectMessageController.php on lines 218..254
    app/Http/Controllers/DirectMessageController.php on lines 258..295

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 256.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 6 locations. Consider refactoring.
    Open

                    $dms = DirectMessage::select('id', 'type', 'to_id', 'from_id', 'id', 'status_id', 'is_hidden', 'meta', 'created_at', 'read_at')
                    ->whereToId($profile)
                    ->with(['author','status'])
                    ->whereIsHidden(true)
                    ->orderBy('id', 'desc')
    Severity: Major
    Found in app/Http/Controllers/DirectMessageController.php and 5 other locations - About 1 day to fix
    app/Http/Controllers/DirectMessageController.php on lines 55..92
    app/Http/Controllers/DirectMessageController.php on lines 96..132
    app/Http/Controllers/DirectMessageController.php on lines 177..214
    app/Http/Controllers/DirectMessageController.php on lines 218..254
    app/Http/Controllers/DirectMessageController.php on lines 258..295

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 256.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Method accountUpdateCredentials has 205 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function accountUpdateCredentials(Request $request)
        {
            abort_if(! $request->user() || ! $request->user()->token(), 403);
            abort_unless($request->user()->tokenCan('write'), 403);
    
    
    Severity: Major
    Found in app/Http/Controllers/Api/ApiV1Controller.php - About 1 day to fix

      Function FakeBlobBuilder has 200 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function FakeBlobBuilder () {
          function isDataView (obj) {
            return obj && DataView.prototype.isPrototypeOf(obj)
          }
          function bufferClone (buf) {
      Severity: Major
      Found in resources/assets/js/polyfill.js - About 1 day to fix

        Method reportsHandleProfileAction has 198 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            protected function reportsHandleProfileAction($report, $action)
            {
                switch ($action) {
                    case 'ignore':
                        Report::whereObjectId($report->object_id)
        Severity: Major
        Found in app/Http/Controllers/Admin/AdminReportController.php - About 7 hrs to fix

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                          if($status->uri == null) {
                              $media = $status->media;
                              $ai = new AccountInterstitial;
                              $ai->user_id = $status->profile->user_id;
                              $ai->type = 'post.unlist';
          Severity: Major
          Found in app/Http/Controllers/InternalApiController.php and 1 other location - About 7 hrs to fix
          app/Http/Controllers/InternalApiController.php on lines 192..218

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 241.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Severity
          Category
          Status
          Source
          Language