DesarrollosWeb/documentofacil

View on GitHub

Showing 464 of 464 total issues

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

<?php
 
$text = array(
"accepted_files" => "Puede Añadir archivos PDF, JPG, BMP, PNG, TIF o GIF de hasta 10MB de tamaño",
"accepted_types" => "Tipos de archivo aceptados: jpg, png, pdf, zip . Tamaño máximo 10mb",
Severity: Major
Found in gestoria/lang_es.php and 1 other location - About 1 day to fix
gestoria/lang_pt.php on lines 1..69

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

<?php
 
$text = array(
"accepted_files" =>"Você pode adicionar PDF, JPG, BMP, PNG, TIF ou GIF arquivos de até 10 MB de tamanho",
"accepted_types" =>"Tipos de arquivo aceitos: jpg, png, pdf, zip 10MB de tamanho máximo.",
Severity: Major
Found in gestoria/lang_pt.php and 1 other location - About 1 day to fix
gestoria/lang_es.php on lines 1..69

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

it('should test', () => {
cy.visit('test.php', {
onBeforeLoad(win) {
Object.defineProperty(win.navigator, 'language', {value: 'pt'});
Object.defineProperty(win.navigator, 'languages', {value: ['pt']});
Severity: Major
Found in cypress/integration/client_area/site_language.spec.js and 2 other locations - About 4 hrs to fix
cypress/integration/client_area/site_language.spec.js on lines 15..27
cypress/integration/client_area/site_language.spec.js on lines 29..41

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

it('should be able to navigate in portuguese', () => {
cy.visit("tramites.php", {
onBeforeLoad(win) {
Object.defineProperty(win.navigator, 'language', {value: 'pt'});
Object.defineProperty(win.navigator, 'languages', {value: ['pt']});
Severity: Major
Found in cypress/integration/client_area/site_language.spec.js and 2 other locations - About 4 hrs to fix
cypress/integration/client_area/site_language.spec.js on lines 2..14
cypress/integration/client_area/site_language.spec.js on lines 15..27

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

it('should be able to navigate in spanish', () => {
cy.visit("tramites.php", {
onBeforeLoad(win) {
Object.defineProperty(win.navigator, 'language', {value: 'es'});
Object.defineProperty(win.navigator, 'languages', {value: ['es']});
Severity: Major
Found in cypress/integration/client_area/site_language.spec.js and 2 other locations - About 4 hrs to fix
cypress/integration/client_area/site_language.spec.js on lines 2..14
cypress/integration/client_area/site_language.spec.js on lines 29..41

File Procedure.php has 271 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
 
//region Includes
include_once 'vendor/autoload.php';
include_once "Db.php";
Severity: Minor
Found in gestoria/Procedure.php - About 2 hrs to fix

File pago_en_linea.php has 268 lines of code (exceeds 250 allowed). Consider refactoring.
Confirmed

<?php
//region Includes
include_once 'gestoria/constants.php';
include_once 'gestoria/Procedure.php';
include_once 'gestoria/Db.php';
Severity: Minor
Found in pago_en_linea.php - About 2 hrs to fix

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

for ($i = 0; $i < count($user_orders[self::DATA]); $i++) {
$user_orders[self::DATA][$i]["creation_date"] = self::createDateTimeFromString($user_orders[self::DATA][$i]["creation_date"]);
$user_orders[self::DATA][$i]["update_date"] = self::createDateTimeFromString($user_orders[self::DATA][$i]["update_date"]);
}
Severity: Major
Found in gestoria/Procedure.php and 1 other location - About 1 hr to fix
gestoria/Procedure.php on lines 189..192

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

for ($i = 0; $i < count($procedure_data[self::DATA]); $i++) {
$procedure_data[self::DATA][$i]["creation_date"] = self::createDateTimeFromString($procedure_data[self::DATA][$i]["creation_date"]);
$procedure_data[self::DATA][$i]["update_date"] = self::createDateTimeFromString($procedure_data[self::DATA][$i]["update_date"]);
}
Severity: Major
Found in gestoria/Procedure.php and 1 other location - About 1 hr to fix
gestoria/Procedure.php on lines 140..143

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

public function get_order_and_procedure(string $procedure_id): array
{
$procedure_data = $this->db->get_query("select p.id,
creation_date,
update_date,
Severity: Minor
Found in gestoria/Procedure.php - About 1 hr to fix

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

public function process(array $post, array $files): array
{
if (IS_DEVELOPMENT) {
krumo($post);
krumo($files);
Severity: Minor
Found in gestoria/Procedure.php - About 1 hr to fix

Method get_orders_current_user has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

public function get_orders_current_user(array $limit = ["start" => 0, "items" => 10]): array
{
$user_type = $this->get_user_type($this->email);
$params = [];
if (isset($user_type["rol"]["administrator"])) {
Severity: Minor
Found in gestoria/Procedure.php - About 1 hr to fix

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

class DbTest extends TestCase {
Severity: Minor
Found in gestoria/DbTest.php by phpcodesniffer

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

class Payment
Severity: Minor
Found in gestoria/Payment.php by phpcodesniffer

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

class DB
Severity: Minor
Found in gestoria/Db.php by phpcodesniffer

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

class Procedure
Severity: Minor
Found in gestoria/Procedure.php by phpcodesniffer

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

class OneDriveClient
Severity: Minor
Found in gestoria/OneDriveClient.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 7 and the first side effect is on line 2.
Open

<?php
Severity: Minor
Found in gestoria/Db.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 7 and the first side effect is on line 5.
Open

<?php
Severity: Minor
Found in gestoria/DbTest.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 10 and the first side effect is on line 7.
Open

<?php
Severity: Minor
Found in gestoria/Payment.php by phpcodesniffer
Severity
Category
Status
Source
Language