Test Setup Failed
Branch master (c9dde2)
by Craig
06:36
created
src/Repositories/DatastorePagesRepository.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@
 block discarded – undo
10 10
  */
11 11
 class DatastorePagesRepository extends BaseRepository
12 12
 {
13
-    /**
14
-     * @return string
15
-     */
16
-    public function model()
17
-    {
18
-        return DatastorePages::class;
19
-    }
13
+	/**
14
+	 * @return string
15
+	 */
16
+	public function model()
17
+	{
18
+		return DatastorePages::class;
19
+	}
20 20
 }
Please login to merge, or discard this patch.
src/Ams/Article/ItemAsset.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -5,48 +5,48 @@
 block discarded – undo
5 5
 
6 6
 class ItemAsset extends Asset {
7 7
 
8
-    public $name = 'Article';
9
-    public $shortname = 'article';
10
-    public $value_equals = 'title';
11
-    public $status_equals = 'published';
8
+	public $name = 'Article';
9
+	public $shortname = 'article';
10
+	public $value_equals = 'title';
11
+	public $status_equals = 'published';
12 12
 
13 13
 
14
-    public $properties = array(
15
-        'title' => array(
16
-            'name' => 'Heading',
17
-            'type' => self::STRING,
14
+	public $properties = array(
15
+		'title' => array(
16
+			'name' => 'Heading',
17
+			'type' => self::STRING,
18 18
 			'required' => true
19
-        ),
20
-        'intro' => array(
21
-            'name' => 'Intro',
22
-            'type' => self::TEXT
23
-        ),
24
-        'content' => array(
25
-            'name' => 'Full Body',
26
-            'type' => self::HTML
19
+		),
20
+		'intro' => array(
21
+			'name' => 'Intro',
22
+			'type' => self::TEXT
23
+		),
24
+		'content' => array(
25
+			'name' => 'Full Body',
26
+			'type' => self::HTML
27 27
 		),
28 28
 		'author' => array(
29 29
 			'name' => 'Author',
30 30
 			'type' => self::IDENTITY
31 31
 		),
32
-        'published' => array(
33
-            'name' => 'Published',
34
-            'type' => self::DROPDOWN,
32
+		'published' => array(
33
+			'name' => 'Published',
34
+			'type' => self::DROPDOWN,
35 35
 			'options' => ['draft' => 'Draft', 'published' => 'Published', 'aarchive' => 'Archived'],
36 36
 			'published' => ['published']
37
-        ),
37
+		),
38 38
 
39
-    );
39
+	);
40 40
 
41
-    public static function about() {
42
-        return 'An Article Asset  which only holds a particular page\'s content. Can be assigned to one or more Article Categories';
43
-    }
41
+	public static function about() {
42
+		return 'An Article Asset  which only holds a particular page\'s content. Can be assigned to one or more Article Categories';
43
+	}
44 44
 
45 45
 
46 46
 
47 47
 		/**
48
-	 * generate the route for this asset
49
-	 */
48
+		 * generate the route for this asset
49
+		 */
50 50
 	public static function route($record, $path = null){
51 51
 		$page = $record->page;
52 52
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 		/**
48 48
 	 * generate the route for this asset
49 49
 	 */
50
-	public static function route($record, $path = null){
50
+	public static function route($record, $path = null) {
51 51
 		$page = $record->page;
52 52
 
53 53
 		return $path ? route('frontend.ams.articles.article', ['slug' => $page->slug, 'path' => $path]) : route('frontend.ams.article.article', ['slug' => $page->slug]);
Please login to merge, or discard this patch.
src/Ams/Article/CategoryAsset.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@
 block discarded – undo
22 22
 			'required' => true
23 23
 		),
24 24
 		'status' => array(
25
-            'name' => 'Published',
26
-            'type' => self::DROPDOWN,
25
+			'name' => 'Published',
26
+			'type' => self::DROPDOWN,
27 27
 			 'options' => ['published' => 'Published', 'unpublished' => 'Unpublished'],
28 28
 			 'published' => ['published']
29
-        ),
29
+		),
30 30
 
31 31
 	);
32 32
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 	/**
41 41
 	 * generate the route for this asset
42 42
 	 */
43
-	public static function route($record, $path = null){
43
+	public static function route($record, $path = null) {
44 44
 		$page = $record->page;
45 45
 		return route('frontend.ams.article.category', ['slug' => $page->slug]);
46 46
 	}
Please login to merge, or discard this patch.
src/Ams/AutoCallBackAsset.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@
 block discarded – undo
5 5
 
6 6
 class AutoCallBackAsset extends Asset {
7 7
 
8
-    public $type = AutoCallBackAsset::class;
9
-    public $namespace = 'property';
8
+	public $type = AutoCallBackAsset::class;
9
+	public $namespace = 'property';
10 10
 
11
-    public static function html($data) {
11
+	public static function html($data) {
12 12
 		$content = explode('|', $data['meta']);
13
-        return '<span>' . $content[1] . '</span>';
13
+		return '<span>' . $content[1] . '</span>';
14 14
 	}
15 15
 
16 16
 
Please login to merge, or discard this patch.
src/Ams/ImageAsset.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 class ImageAsset extends Asset {
10 10
 
11
-    public $type = ImageAsset::class;
11
+	public $type = ImageAsset::class;
12 12
 	public $namespace = 'property';
13 13
 
14 14
 	public static function getImageUrl($filename, $width = null, $height = null){
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
 
37 37
 	}
38 38
 
39
-    public static function html($data) {
39
+	public static function html($data) {
40 40
 
41 41
 		return '<img src="' . self::getImageUrl($data['value']) . '" />';
42
-    }
42
+	}
43 43
 
44 44
 
45 45
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,23 +11,23 @@
 block discarded – undo
11 11
     public $type = ImageAsset::class;
12 12
 	public $namespace = 'property';
13 13
 
14
-	public static function getImageUrl($filename, $width = null, $height = null){
14
+	public static function getImageUrl($filename, $width = null, $height = null) {
15 15
 
16
-		$imagePath = public_path().'/vendor/phpsa-datastore/';
16
+		$imagePath = public_path() . '/vendor/phpsa-datastore/';
17 17
 
18 18
 		if ($width || $height) {
19
-			$path = 'thumbs/' . $width .  'x' . $height  . '.' . $filename;
19
+			$path = 'thumbs/' . $width . 'x' . $height . '.' . $filename;
20 20
 
21
-			if(!is_file($imagePath . $path)){
22
-				try{
23
-					Image::make(public_path().'/vendor/phpsa-datastore/img/' . $filename)->resize($width,$height, function ($constraint) {
21
+			if (!is_file($imagePath . $path)) {
22
+				try {
23
+					Image::make(public_path() . '/vendor/phpsa-datastore/img/' . $filename)->resize($width, $height, function($constraint) {
24 24
 						$constraint->aspectRatio();
25 25
 					})->save($imagePath . $path);
26
-				}catch(Exception $e){
26
+				}catch (Exception $e) {
27 27
 					//Silent fallback as the image does not exist!
28 28
 				}
29 29
 			}
30
-		}else{
30
+		}else {
31 31
 			$path = 'img/' . $filename;
32 32
 		}
33 33
 		return '/vendor/phpsa-datastore/' . $path;
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@
 block discarded – undo
23 23
 					Image::make(public_path().'/vendor/phpsa-datastore/img/' . $filename)->resize($width,$height, function ($constraint) {
24 24
 						$constraint->aspectRatio();
25 25
 					})->save($imagePath . $path);
26
-				}catch(Exception $e){
26
+				} catch(Exception $e){
27 27
 					//Silent fallback as the image does not exist!
28 28
 				}
29 29
 			}
30
-		}else{
30
+		} else{
31 31
 			$path = 'img/' . $filename;
32 32
 		}
33 33
 		return '/vendor/phpsa-datastore/' . $path;
Please login to merge, or discard this patch.
src/Ams/SubHeadingAsset.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,11 +5,11 @@
 block discarded – undo
5 5
 
6 6
 class SubHeadingAsset extends Asset {
7 7
 
8
-    public $shortname = 'SubHeading';
9
-    public $type = SubHeadingAsset::class;
10
-    public $namespace = 'property';
8
+	public $shortname = 'SubHeading';
9
+	public $type = SubHeadingAsset::class;
10
+	public $namespace = 'property';
11 11
 
12
-    public static function html($data) {
13
-        return '<h4>' . $data['value'] . '</h4>';
14
-    }
12
+	public static function html($data) {
13
+		return '<h4>' . $data['value'] . '</h4>';
14
+	}
15 15
 }
16 16
\ No newline at end of file
Please login to merge, or discard this patch.
src/Ams/FileAsset.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@
 block discarded – undo
6 6
 
7 7
 class FileAsset extends Asset {
8 8
 
9
-    public $type = FileAsset::class;
10
-    public $namespace = 'property';
9
+	public $type = FileAsset::class;
10
+	public $namespace = 'property';
11 11
 
12
-    public static function html($data) {
13
-        return Storage::url($data['value']);
14
-    }
12
+	public static function html($data) {
13
+		return Storage::url($data['value']);
14
+	}
15 15
 
16 16
 
17 17
 }
Please login to merge, or discard this patch.
src/Ams/AutoCallBackAdderAsset.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,16 +5,16 @@
 block discarded – undo
5 5
 
6 6
 class AutoCallBackAdderAsset extends Asset {
7 7
 
8
-    public $type = AutoCallBackAdderAsset::class;
9
-    public $namespace = 'property';
8
+	public $type = AutoCallBackAdderAsset::class;
9
+	public $namespace = 'property';
10 10
 
11
-    public static function html($data) {
11
+	public static function html($data) {
12 12
 		$strings = [];
13 13
 
14 14
 		foreach($data['meta'] as $k){
15 15
 			$parts = explode("|", $k);
16 16
 			$strings[] = $parts[1];
17 17
 		}
18
-        return '<span>' . implode(", ", $strings) . '</span>';
19
-    }
18
+		return '<span>' . implode(", ", $strings) . '</span>';
19
+	}
20 20
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     public static function html($data) {
12 12
 		$strings = [];
13 13
 
14
-		foreach($data['meta'] as $k){
14
+		foreach ($data['meta'] as $k) {
15 15
 			$parts = explode("|", $k);
16 16
 			$strings[] = $parts[1];
17 17
 		}
Please login to merge, or discard this patch.
src/Ams/StringAsset.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,10 +5,10 @@
 block discarded – undo
5 5
 
6 6
 class StringAsset extends Asset {
7 7
 
8
-    public $type = StringAsset::class;
9
-    public $namespace = 'property';
8
+	public $type = StringAsset::class;
9
+	public $namespace = 'property';
10 10
 
11
-    public static function html($data) {
12
-        return '<span>' . $data['value'] . '</span> STRING';
13
-    }
11
+	public static function html($data) {
12
+		return '<span>' . $data['value'] . '</span> STRING';
13
+	}
14 14
 }
Please login to merge, or discard this patch.