Completed
Push — master ( 18f749...9fc766 )
by Gordon
17:08 queued 02:10
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 1 patch
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.
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/GalleryImageShortCodeHandlerTest.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 class GalleryImageShortCodeHandlerTest extends SapphireTest {
4
-	protected static $fixture_file = 'ss3gallery/tests/ss3gallery.yml';
4
+  protected static $fixture_file = 'ss3gallery/tests/ss3gallery.yml';
5 5
 
6 6
     public function testValidImage()
7 7
     {
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 </div>
22 22
 
23 23
 ', $html);
24
-	}
24
+  }
25 25
 
26 26
 
27 27
     public function testNonExistentImage()
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
     {
8 8
         $page = $this->objFromFixture('Page', 'page02');
9 9
 
10
-        $galleryImage = $this->objFromFixture('GalleryImage' , 'gi01');
10
+        $galleryImage = $this->objFromFixture('GalleryImage', 'gi01');
11 11
         $content = "[GalleryImage id='{$galleryImage->ID}']";
12 12
         $page->Content = $content;
13 13
         $page->write();
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
     {
29 29
         $page = $this->objFromFixture('Page', 'page02');
30 30
 
31
-        $galleryImage = $this->objFromFixture('GalleryImage' , 'gi01');
32
-        $nonExistentID = 1000 + $galleryImage->ID;
31
+        $galleryImage = $this->objFromFixture('GalleryImage', 'gi01');
32
+        $nonExistentID = 1000+$galleryImage->ID;
33 33
         // his will not exist
34 34
         $content = "[GalleryImage id='{$nonExistentID}']";
35 35
         $page->Content = $content;
Please login to merge, or discard this patch.
tests/GalleryImageTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         $this->assertEquals(100, $thumbnail->Height);
38 38
     }
39 39
 
40
-     public function testGetPortletTitle() {
40
+      public function testGetPortletTitle() {
41 41
         $gi = $this->objFromFixture('GalleryImage', 'gi01');
42 42
         $this->assertEquals($gi->Title, $gi->getPortletTitle());
43 43
         $gi->Title = 'Another title';
Please login to merge, or discard this patch.
tests/LatestGalleryImagesExtensionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
             if ($lastEdited == null) {
21 21
                 $lastEdited = $gi->LastEdited;
22 22
             } else {
23
-                error_log('GalleryImage LastEdited: ' . $gi->LastEdited);
23
+                error_log('GalleryImage LastEdited: '.$gi->LastEdited);
24 24
                 $this->assertLessThanOrEqual($lastEdited, $gi->LastEdited);
25 25
                 $lastEdited = $gi->LastEdited;
26 26
             }
Please login to merge, or discard this patch.
tests/TestWithImage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
         $folder = Folder::find_or_make('/TestImageSS3Gallery/');
8 8
         $testfilePath = 'assets/TestImageSS3Gallery/test.jpg'; // Important: No leading slash
9 9
 
10
-        $sourcePath = getcwd() . '/ss3gallery/tests/test.jpg';
10
+        $sourcePath = getcwd().'/ss3gallery/tests/test.jpg';
11 11
         copy($sourcePath, $testfilePath);
12 12
 
13 13
         $image = new Image();
Please login to merge, or discard this patch.