stevebauman/maintenance

View on GitHub

Showing 68 of 213 total issues

Function __buildButtons has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  , __buildButtons: function(buttonsArray, container) {
      var i,
          ns = this.$ns,
          handler = this.$handler,
          callback = this.$callback;
Severity: Minor
Found in resources/assets/js/libs/bootstrap-markdown.js - About 1 hr to fix

    Method form has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function form(Inventory $inventory, $variant = false)
        {
            return $this->form->of('inventory', function (FormGrid $form) use ($inventory, $variant) {
                if ($inventory->exists) {
                    if ($variant === true) {
    Severity: Minor
    Found in app/Http/Presenters/Inventory/InventoryPresenter.php - About 1 hr to fix

      Function keyup has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        , keyup: function (e) {
            var blocked = false;
            switch(e.keyCode) {
              case 40: // down arrow
              case 38: // up arrow
      Severity: Minor
      Found in resources/assets/js/libs/bootstrap-markdown.js - About 1 hr to fix

        Method up has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function up()
            {
                Schema::create('assets', function (Blueprint $table) {
                    $table->increments('id');
                    $table->timestamps();

          Method up has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function up()
              {
                  Schema::create('events', function (Blueprint $table) {
                      $table->increments('id');
                      $table->timestamps();

            Method table has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function table(WorkOrder $workOrder)
                {
                    $parts = $workOrder->parts();
            
                    return $this->table->of('work-orders.parts', function (TableGrid $table) use ($workOrder, $parts) {
            Severity: Minor
            Found in app/Http/Presenters/WorkOrder/WorkOrderPartPresenter.php - About 1 hr to fix

              Method tableHistory has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function tableHistory($for, MorphMany $revisions)
                  {
                      return $this->table->of("$for.revisions", function (TableGrid $table) use ($revisions) {
                          $table->with($revisions)->paginate($this->perPage);
              
              
              Severity: Minor
              Found in app/Http/Presenters/Presenter.php - About 1 hr to fix

                Method form has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function form(Inventory $item, InventoryStock $stock)
                    {
                        return $this->form->of('inventory.stocks', function (FormGrid $form) use ($item, $stock) {
                            if ($stock->exists) {
                                $method = 'PATCH';
                Severity: Minor
                Found in app/Http/Presenters/Inventory/InventoryStockPresenter.php - About 1 hr to fix

                  Method tableInventory has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function tableInventory(WorkOrder $workOrder, Inventory $inventory)
                      {
                          $inventory = $inventory->noVariants();
                  
                          return $this->table->of('work-orders.inventory', function (TableGrid $table) use ($inventory, $workOrder) {
                  Severity: Minor
                  Found in app/Http/Presenters/WorkOrder/WorkOrderPartPresenter.php - About 1 hr to fix

                    Method tableVariants has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function tableVariants(WorkOrder $workOrder, Inventory $item)
                        {
                            $variants = $item->variants();
                    
                            return $this->table->of('work-orders.parts.variants', function (TableGrid $table) use ($variants, $workOrder) {
                    Severity: Minor
                    Found in app/Http/Presenters/WorkOrder/WorkOrderPartStockPresenter.php - About 1 hr to fix

                      Method table has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function table($workOrder)
                          {
                              return $this->table->of('work-orders', function (TableGrid $table) use ($workOrder) {
                                  $table->with($workOrder)->paginate($this->perPage);
                      
                      
                      Severity: Minor
                      Found in app/Http/Presenters/WorkOrder/WorkOrderPresenter.php - About 1 hr to fix

                        Function showPreview has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          , showPreview: function() {
                              var options = this.$options,
                                  container = this.$textarea,
                                  afterContainer = container.next(),
                                  replacementContainer = $('<div/>',{'class':'md-preview','data-provider':'markdown-preview'}),
                        Severity: Minor
                        Found in resources/assets/js/libs/bootstrap-markdown.js - About 1 hr to fix

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

                              public function up()
                              {
                                  Schema::create('inventory_transactions', function (Blueprint $table) {
                                      $table->increments('id');
                                      $table->timestamps();

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

                                public function form(WorkOrder $workOrder, WorkOrderReport $report)
                                {
                                    return $this->form->of('work-orders.report', function (FormGrid $form) use ($workOrder, $report) {
                                        if ($report->exists) {
                                            $method = 'PATCH';
                            Severity: Minor
                            Found in app/Http/Presenters/WorkOrder/WorkOrderReportPresenter.php - About 1 hr to fix

                              Method up has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function up()
                                  {
                                      Schema::create('comments', function (Blueprint $table) {
                                          $table->increments('id');
                                          $table->timestamps();

                                Method form has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function form(Status $status)
                                    {
                                        return $this->form->of('work-orders.statuses', function (FormGrid $form) use ($status) {
                                            if ($status->exists) {
                                                $method = 'PATCH';
                                Severity: Minor
                                Found in app/Http/Presenters/WorkOrder/WorkOrderStatusPresenter.php - About 1 hr to fix

                                  Function strong_em has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function strong_em( tag, md ) {
                                  
                                    var state_slot = tag + "_state",
                                        other_slot = tag == "strong" ? "em_state" : "strong_state";
                                  
                                  
                                  Severity: Minor
                                  Found in resources/assets/js/libs/markdown.js - About 1 hr to fix

                                    Method form has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function form(Priority $priority)
                                        {
                                            return $this->form->of('work-orders.priorities', function (FormGrid $form) use ($priority) {
                                                if ($priority->exists) {
                                                    $url = route('maintenance.work-orders.priorities.update', [$priority->getKey()]);
                                    Severity: Minor
                                    Found in app/Http/Presenters/WorkOrder/WorkOrderPriorityPresenter.php - About 1 hr to fix

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

                                          public function up()
                                          {
                                              Schema::create('suppliers', function (Blueprint $table) {
                                                  $table->increments('id');
                                                  $table->timestamps();

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

                                            public function table($item)
                                            {
                                                return $this->table->of('inventory', function (TableGrid $table) use ($item) {
                                                    $table->with($item)->paginate($this->perPage);
                                        
                                        
                                        Severity: Minor
                                        Found in app/Http/Presenters/Inventory/InventoryPresenter.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language