This issue is a result of #1330854: Update code to conform to literal array standards.

It re-factors a few lines of very long code in files common.inc and image.effects.inc.

A patch is forthcoming.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Lars Toomre’s picture

Status: Active » Needs review
FileSize
11.59 KB

Attached is the patch addressing 20 of the long and very long lines of code that were included in the discussion patch in #1330854-17: Update code to conform to literal array standards.

sun’s picture

Status: Needs review » Needs work
+++ b/core/includes/common.inc
@@ -2431,7 +2431,10 @@ function drupal_deliver_page($page_callback_result, $default_delivery_callback =
+      '%q' => $_GET['q']

+++ b/core/modules/image/image.effects.inc
@@ -79,7 +79,12 @@ function image_image_effect_info() {
+      '%dimensions' => $image->info['width'] . 'x' . $image->info['height']

@@ -132,7 +137,12 @@ function image_scale_effect(&$image, $data) {
+      '%dimensions' => $image->info['width'] . 'x' . $image->info['height']

@@ -186,7 +196,12 @@ function image_crop_effect(&$image, $data) {
+      '%dimensions' => $image->info['width'] . 'x' . $image->info['height']

@@ -208,7 +223,12 @@ function image_crop_effect(&$image, $data) {
+      '%dimensions' => $image->info['width'] . 'x' . $image->info['height']

@@ -227,7 +247,12 @@ function image_scale_and_crop_effect(&$image, $data) {
+      '%dimensions' => $image->info['width'] . 'x' . $image->info['height']

@@ -280,7 +305,12 @@ function image_rotate_effect(&$image, $data) {
+      '%dimensions' => $image->info['width'] . 'x' . $image->info['height']

Missing comma.

24 days to next Drupal core point release.

Lars Toomre’s picture

Status: Needs work » Needs review
FileSize
11.6 KB

Thanks @sun! I completely forgot the final commas as I was fixing the long watchdog() messages.

Attached is a revised patch that fixes the seven cases you noted.

marvil07’s picture

Status: Needs review » Needs work

The last submitted patch, Refactor_Long_Code_Lines-1333396-3.patch, failed testing.

marvil07’s picture

Status: Needs work » Needs review

Patch do not apply anymore, so I guess it needs a reroll.

BTW, this can be a massive change, an estimate of the lines that need change(assuming 100 character limit mentioned on #1330854-18: Update code to conform to literal array standards):

$ git ls-files | xargs sed -n '/^.\{101\}/p' | grep array|wc -l
3542
marvil07’s picture

Status: Needs review » Needs work
dawehner’s picture

Issue summary: View changes
Status: Needs work » Fixed

If you still care about those things, I would recommend you to open issues for the dedicated components. These kind of patches won't apply anyway anymore :P

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.