eveseat/notifications

View on GitHub

Showing 25 of 405 total issues

Method toSlack has 74 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function toSlack($notifiable)
    {
        return (new SlackMessage)
            ->content('A structure is under attack!')
            ->from('SeAT Structure Monitor')
Severity: Major
Found in src/Notifications/Structures/Slack/StructureUnderAttack.php - About 2 hrs to fix

    Method toSlack has 63 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function toSlack($notifiable)
        {
            return (new SlackMessage)
                ->content('A customs office is under attack!')
                ->from('SeAT Structure Monitor')
    Severity: Major
    Found in src/Notifications/Structures/Slack/OrbitalAttacked.php - About 2 hrs to fix

      File notifications.alerts.php has 258 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      /*
       * This file is part of SeAT
       *
      Severity: Minor
      Found in src/Config/notifications.alerts.php - About 2 hrs to fix

        Method toSlack has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function toSlack($notifiable)
            {
                return (new SlackMessage)
                    ->content('A new Structure is anchoring!')
                    ->from('SeAT Structure Monitor')
        Severity: Minor
        Found in src/Notifications/Structures/Slack/StructureAnchoring.php - About 1 hr to fix

          Method toSlack has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function toSlack($notifiable)
              {
                  return (new SlackMessage)
                      ->content('A structure is anchoring!')
                      ->from('SeAT Structure Monitor')
          Severity: Minor
          Found in src/Notifications/Structures/Slack/AllAnchoringMsg.php - About 1 hr to fix

            Method toSlack has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function toSlack($notifiable)
                {
                    return (new SlackMessage)
                        ->content('A new Structure is un-anchoring!')
                        ->from('SeAT Structure Monitor')
            Severity: Minor
            Found in src/Notifications/Structures/Slack/StructureUnanchoring.php - About 1 hr to fix

              Method toSlack has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function toSlack($notifiable)
                  {
                      return (new SlackMessage)
                          ->content('A new raffle has been created!')
                          ->from('SeAT Raffle President')
              Severity: Minor
              Found in src/Notifications/Characters/Slack/RaffleCreated.php - About 1 hr to fix

                Method toSlack has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function toSlack($notifiable)
                    {
                        return (new SlackMessage)
                            ->content('A new raffle has been completed!')
                            ->from('SeAT Raffle President')
                Severity: Minor
                Found in src/Notifications/Characters/Slack/RaffleFinished.php - About 1 hr to fix

                  Method toSlack has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function toSlack($notifiable)
                      {
                          return (new SlackMessage)
                              ->content('A raffle has reach end of life!')
                              ->from('SeAT Raffle President')
                  Severity: Minor
                  Found in src/Notifications/Characters/Slack/RaffleExpired.php - About 1 hr to fix

                    Function postAddAffiliation has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function postAddAffiliation(GroupAffiliation $request)
                        {
                    
                            $group = NotificationGroup::findOrFail($request->input('id'));
                    
                    
                    Severity: Minor
                    Found in src/Http/Controllers/GroupsController.php - About 1 hr to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Method toSlack has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function toSlack($notifiable)
                        {
                            return (new SlackMessage)
                                ->content('A structure has been transferred!')
                                ->from('SeAT Structure Monitor')
                    Severity: Minor
                    Found in src/Notifications/Structures/Slack/OwnershipTransferred.php - About 1 hr to fix

                      Method toSlack has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function toSlack($notifiable)
                          {
                              return (new SlackMessage)
                                  ->content('A Structure has been destroyed!')
                                  ->from('SeAT Structure Monitor')
                      Severity: Minor
                      Found in src/Notifications/Structures/Slack/StructureDestroyed.php - About 1 hr to fix

                        Method toSlack has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function toSlack($notifiable)
                            {
                                return (new SlackMessage)
                                    ->content('A structure is running low in fuel!')
                                    ->from('SeAT Structure Monitor')
                        Severity: Minor
                        Found in src/Notifications/Structures/Slack/StructureFuelAlert.php - About 1 hr to fix

                          Method toSlack has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function toSlack($notifiable)
                              {
                                  return (new SlackMessage)
                                      ->from('SeAT - New Application')
                                      ->content($this->notification->text['applicationText'])
                          Severity: Minor
                          Found in src/Notifications/Corporations/Slack/CorpAppNewMsg.php - About 1 hr to fix

                            Method toSlack has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function toSlack($notifiable)
                                {
                                    $message = (new SlackMessage())
                                        ->from('SeAT War Observer')
                                        ->content('A new War has been declared !')
                            Severity: Minor
                            Found in src/Notifications/Wars/Slack/AllWarDeclaredMsg.php - About 1 hr to fix

                              Method ajax has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function ajax()
                                  {
                                      return datatables()
                                          ->eloquent($this->applyScopes($this->query()))
                                          ->addColumn('alerts', function ($row) {
                              Severity: Minor
                              Found in src/Http/DataTables/NotificationGroupDataTable.php - About 1 hr to fix

                                Method toSlack has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function toSlack($notifiable)
                                    {
                                        $message = (new SlackMessage)
                                            ->content('A Moon Mining Extraction has been successfully completed.')
                                            ->from('SeAT Moon Tracker')
                                Severity: Minor
                                Found in src/Notifications/Structures/Slack/MoonMiningExtractionFinished.php - About 1 hr to fix

                                  Method toSlack has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function toSlack($notifiable)
                                      {
                                          return (new SlackMessage)
                                              ->content('A new corporation bill has been issued!')
                                              ->from('SeAT Corporation Accountant')
                                  Severity: Minor
                                  Found in src/Notifications/Corporations/Slack/CorpAllBillMsg.php - About 1 hr to fix

                                    Method toSlack has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function toSlack($notifiable)
                                        {
                                            $message = (new SlackMessage)
                                                ->content('A Moon Mining Extraction has been started.')
                                                ->from('SeAT Moon Tracker')
                                    Severity: Minor
                                    Found in src/Notifications/Structures/Slack/MoonMiningExtractionStarted.php - About 1 hr to fix

                                      Method toSlack has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function toSlack($notifiable)
                                          {
                                              return (new SlackMessage)
                                                  ->from('SeAT War Observer')
                                                  ->content('A war has been invalidated!')
                                      Severity: Minor
                                      Found in src/Notifications/Wars/Slack/AllWarInvalidatedMsg.php - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language