Showing 68 of 213 total issues
Function __buildButtons
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, __buildButtons: function(buttonsArray, container) {
var i,
ns = this.$ns,
handler = this.$handler,
callback = this.$callback;
Method form
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
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) {
Function keyup
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, keyup: function (e) {
var blocked = false;
switch(e.keyCode) {
case 40: // down arrow
case 38: // up arrow
Method up
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
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
Open
public function table(WorkOrder $workOrder)
{
$parts = $workOrder->parts();
return $this->table->of('work-orders.parts', function (TableGrid $table) use ($workOrder, $parts) {
Method tableHistory
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function tableHistory($for, MorphMany $revisions)
{
return $this->table->of("$for.revisions", function (TableGrid $table) use ($revisions) {
$table->with($revisions)->paginate($this->perPage);
Method form
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
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';
Method tableInventory
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function tableInventory(WorkOrder $workOrder, Inventory $inventory)
{
$inventory = $inventory->noVariants();
return $this->table->of('work-orders.inventory', function (TableGrid $table) use ($inventory, $workOrder) {
Method tableVariants
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
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) {
Method table
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function table($workOrder)
{
return $this->table->of('work-orders', function (TableGrid $table) use ($workOrder) {
$table->with($workOrder)->paginate($this->perPage);
Function showPreview
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, showPreview: function() {
var options = this.$options,
container = this.$textarea,
afterContainer = container.next(),
replacementContainer = $('<div/>',{'class':'md-preview','data-provider':'markdown-preview'}),
Method up
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
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';
Method up
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
Open
public function form(Status $status)
{
return $this->form->of('work-orders.statuses', function (FormGrid $form) use ($status) {
if ($status->exists) {
$method = 'PATCH';
Function strong_em
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function strong_em( tag, md ) {
var state_slot = tag + "_state",
other_slot = tag == "strong" ? "em_state" : "strong_state";
Method form
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
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()]);
Method up
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
Open
public function table($item)
{
return $this->table->of('inventory', function (TableGrid $table) use ($item) {
$table->with($item)->paginate($this->perPage);