Attached patch fixes coding standard issues.

Problem/Motivation

(EDIT)
The patch is quite old and currently is outdated.
The full list of coding standard issues could be found by looking at the output of the automated tests at https://www.drupal.org/node/3287/qa

Proposed resolution

Patches should NOT try to fix all issues at one time - instead, they should focus on just one type of coding standards problem and fix that one type of problem for Redirect. Note that there are some issues that should probably NOT be fixed. Let's focus on getting the important things done first, like missing @param and documentation comments and solve them as child issues.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

denisha.addweb created an issue. See original summary.

andralex’s picture

Issue summary: View changes
andralex’s picture

Status: Needs review » Needs work
Issue tags: +Coding standards
solideogloria’s picture

1. redirects.view -- should this file be a .php file or something? I don't know what a .view file is.

2. redirect.admin.inc calls redirect_build_filter_query($query, array('w.message'), $keys);. I get the following error from Intelliphense:

Expected type 'QueryAlterableInterface'. Found 'QueryExtendableInterface'.

So maybe redirect_build_filter_query should have a different parameter type hint?

3. redirect.install

// Limit the number of characters used by the index.
// That allows avoiding the risk to have a PDOException
// caused the DB index limitations of some databases.

Should this be caused by the DB index limitations of some databases?

andralex’s picture

andralex’s picture

Status: Needs work » Needs review
FileSize
9.46 KB

Here is an updated patch with correct encoding and line endings.

andralex’s picture

Removed changes from .install file as it is part of 7.x-1.x branch.

solideogloria’s picture

@andralex Just FYI, 1.x and 2.x branches are the same. There is was literally no difference between the two (until recently, when a couple commits were only applied to 1.x), and that 1.x is actually used. We should target 1.x until there's actually a reason to change to 2.x.

andralex’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev

Hello @solideogloria,

I've changed the target version to 7.1.

solideogloria’s picture

Status: Needs review » Reviewed & tested by the community
Kristen Pol’s picture

Assigned: Unassigned » Kristen Pol

Assigning to myself as I'm triaging all RTBC issues.

Kristen Pol’s picture

Thanks for the issue, patches, and reviews.

Unfortunately, this is definitely very outdated. See attached output from:

phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml .

Also note 2 related issues:

#3136894: Missing doc comment
#3136904: Line exceeds 80 characters

Kristen Pol’s picture

Status: Needs work » Postponed
Related issues: +#3136895: Missing parameter type

Postponing this one for now until some others get handled first:

#3136894: Missing doc comment
#3136904: Line exceeds 80 characters
#3136895: Missing parameter type