Completed
Push — master ( faff87...db1cae )
by Gordon
05:12
created
code/GalleryImageShortCodeHandler.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         $customise['Aperture'] = $galleryImage->Aperture;
31 31
         $customise['ShutterSpeed'] = $galleryImage->ShutterSpeed;
32 32
     
33
-         //set the caption
33
+          //set the caption
34 34
         $customise['Title'] = $galleryImage->Title;
35 35
    
36 36
         //overide the defaults with the arguments supplied
Please login to merge, or discard this patch.
code/GalleryImage.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -43,30 +43,30 @@
 block discarded – undo
43 43
     }
44 44
 
45 45
     /**
46
-    * An accessor method for an image for a portlet.
47
-    *
48
-    * @example
49
-    * <code>
50
-    *  return $this->NewsItemImage;
51
-    * </code>
52
-    *
53
-    * @return string
54
-    */
46
+     * An accessor method for an image for a portlet.
47
+     *
48
+     * @example
49
+     * <code>
50
+     *  return $this->NewsItemImage;
51
+     * </code>
52
+     *
53
+     * @return string
54
+     */
55 55
     public function getPortletImage()
56 56
     {
57 57
         return $this->Image();
58 58
     }
59 59
 
60 60
     /**
61
-    * An accessor for text associated with the portlet.
62
-    *
63
-    * @example
64
-    * <code>
65
-    * return $this->Summary
66
-    * </code>
67
-    *
68
-    * @return string
69
-    */
61
+     * An accessor for text associated with the portlet.
62
+     *
63
+     * @example
64
+     * <code>
65
+     * return $this->Summary
66
+     * </code>
67
+     *
68
+     * @return string
69
+     */
70 70
     public function getPortletCaption()
71 71
     {
72 72
         return '';
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     {
77 77
         //FIXME - is there a way to avoid a database call here?
78 78
         $image100 = $this->Image()->SetRatioSize(100, 100);
79
-        $result = ($intendedWidth - $image100->Width) / 2;
79
+        $result = ($intendedWidth-$image100->Width) / 2;
80 80
         error_log('HORIZONTAL MARGIN:'.$result);
81 81
         return $result;
82 82
     }
@@ -85,6 +85,6 @@  discard block
 block discarded – undo
85 85
     {
86 86
         //FIXME - is there a way to avoid a database call here?
87 87
         $image100 = $this->Image()->SetRatioSize(100, 100);
88
-        return ($intendedHeight - $image100->Height) / 2;
88
+        return ($intendedHeight-$image100->Height) / 2;
89 89
     }
90 90
 }
Please login to merge, or discard this patch.
tests/GalleryImageShortCodeHandlerTest.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 class GalleryImageShortCodeHandlerTest extends SapphireTest {
4
-	public function testParse_gallery_image() {
5
-		$this->markTestSkipped('TODO');
6
-	}
4
+  public function testParse_gallery_image() {
5
+    $this->markTestSkipped('TODO');
6
+  }
7 7
 
8
-	public function test_link_shortcode_handler() {
9
-		$this->markTestSkipped('TODO');
10
-	}
8
+  public function test_link_shortcode_handler() {
9
+    $this->markTestSkipped('TODO');
10
+  }
11 11
 
12 12
 }
Please login to merge, or discard this patch.
code/ImageMetaDataExtension.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     public function processExifData()
18 18
     {
19 19
         $image    = $this->owner->Image();
20
-        $filename = BASE_PATH . '/' . $image->Filename;
20
+        $filename = BASE_PATH.'/'.$image->Filename;
21 21
 
22 22
         // when the image is first saved, the file will still be a temp file
23 23
         if ($image->exists()) {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                     $seconds  = $latarray[2];
63 63
                     $parts    = explode('/', $seconds);
64 64
                     $seconds  = $parts[0] / $parts[1];
65
-                    $latitude = $degrees + $minutes / 60 + $seconds / 3600;
65
+                    $latitude = $degrees+$minutes / 60+$seconds / 3600;
66 66
                     $lonarray = $gps['GPSLongitude'];
67 67
                     $degrees  = $lonarray[0];
68 68
                     $parts    = explode('/', $degrees);
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                     $parts    = explode('/', $seconds);
75 75
                     $seconds  = $parts[0] / $parts[1];
76 76
 
77
-                    $longitude        = $degrees + $minutes / 60 + $seconds / 3600;
77
+                    $longitude        = $degrees+$minutes / 60+$seconds / 3600;
78 78
                     $this->owner->Lat = $latitude;
79 79
                     $this->owner->Lon = $longitude;
80 80
                 }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             $image->processExifData();
109 109
         }
110 110
 
111
-        DB::alteration_message('Updated image metadata where EXIF has not been ' . 'processed', 'changed');
111
+        DB::alteration_message('Updated image metadata where EXIF has not been '.'processed', 'changed');
112 112
     }
113 113
 
114 114
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,8 +84,7 @@
 block discarded – undo
84 84
                 $this->owner->ExifRead = true;
85 85
                 $this->owner->Orientation = $this->owner->Image()->getOrientation();
86 86
                 $this->owner->write();
87
-            }
88
-            catch (Exception $e) {
87
+            } catch (Exception $e) {
89 88
                 error_log($e->getMessage());
90 89
             }
91 90
         }
Please login to merge, or discard this patch.
tests/ImageMetaDataExtensionTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
         $folder = Folder::find_or_make('/ImageMetaDataExtensionTest/');
12 12
         $testfilePath = 'assets/ImageMetaDataExtensionTest/test.jpg'; // Important: No leading slash
13 13
 
14
-        $sourcePath = getcwd() . '/ss3gallery/tests/test.jpg';
14
+        $sourcePath = getcwd().'/ss3gallery/tests/test.jpg';
15 15
         copy($sourcePath, $testfilePath);
16 16
         $image = new Image();
17 17
         $image->Filename = $testfilePath;
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
         $image->ParentID = $folder->ID;
20 20
         $image->write();
21 21
 
22
-        error_log('IMAGE FILENAME: ' . $image->ID);
22
+        error_log('IMAGE FILENAME: '.$image->ID);
23 23
         $this->assertEquals('assets/ImageMetaDataExtensionTest/test.jpg', $image->Filename);
24 24
 
25 25
         $gi->ImageID = $image->ID;
Please login to merge, or discard this patch.