Showing 437 of 494 total issues
Method readDefinition
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function readDefinition($modifier, $json)
{
$definitions = [];
if (isset($json->fixed)) {
Method commons
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function commons($user)
{
static $gas_count = null;
$ret = [
Function success
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
success: (data) => {
if (data.hasOwnProperty('status') && data.status == 'error') {
utils.displayServerError(null, data);
return;
}
Method queryMovements
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function queryMovements($query = null, $type = 'all')
{
if (is_null($query)) {
$query = Movement::orderBy('created_at', 'desc');
}
Method create
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function create(array $data)
{
$gas = Gas::find($data['gas_id']);
$user = new User();
Method roleByFunction
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function roleByFunction($identifier)
{
$gas = currentAbsoluteGas();
$role_id = $gas->roles[$identifier] ?? null;
$ret = App\Role::find($role_id);
Method up
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function up()
{
Schema::create('invoices', function (Blueprint $table) {
$table->string('id')->primary();
$table->timestamps();
Method formatSummaryShipping
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function formatSummaryShipping($order, $fields, $status, $shipping_place, $extra_modifiers)
{
$rows = [];
$total = 0;
$formattable = OrderFormatter::formattableColumns('summary');
Function init
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static init(container)
{
$('.dates-for-orders', container).each((index, item) => {
/*
Questo è per fare in modo che le date siano sempre coerenti tra
Method index
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function index(Request $request)
{
try {
$data['movements'] = $this->service->list($request->all());
$ret = null;
Method store
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function store(Request $request)
{
DB::beginTransaction();
$data = $request->input('data');
Method up
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function up()
{
Schema::table('roles', function (Blueprint $table) {
$table->string('identifier')->default('');
$table->boolean('system')->default(false);
Method run
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function run($request)
{
$user = Auth::user();
$service = app()->make('BookingsService');
Method filterBySupplier
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function filterBySupplier($supplier, $user, $query, $own)
{
$type = 'all';
if ($supplier) {
Method handle
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle()
{
$hub = app()->make('GlobalScopeHub');
$gas = $hub->getGasObj();
Method selective
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function selective()
{
if (currentAbsoluteGas()->hasFeature('shipping_places')) {
return [
'truck' => (object) [
Function updateBookingModifiers
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static updateBookingModifiers(dynamic_modifiers, container)
{
$('input[name^="modifier-"]', container).each(function() {
let modid = parseInt($(this).attr('name').split('-')[1]);
if (modid == 0) {
Method descriptions
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function descriptions($target)
{
/*
Qui predispongo le stringhe descrittive per tutte le possibili
combinazioni di valori, destinate a rendere più comprensibile la
Method getConvenientStringsAttribute
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getConvenientStringsAttribute()
{
$suppliers = [];
$shipping_date = PHP_INT_MAX;
Function completionRowsInit
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function completionRowsInit(node) {
$(node).find('input:text').each(function() {
if ($(this).hasClass('ui-autocomplete-input') == true) {
return;
}