Test Setup Failed
Push — master ( c9dde2...c96a31 )
by Craig
03:54
created
src/Asset.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -150,10 +150,10 @@
 block discarded – undo
150 150
 	public $meta_description = null;
151 151
 
152 152
 	 /**
153
-	 * set to 'off' to turn it off
154
-	 *
155
-	 * @var [type]
156
-	 */
153
+	  * set to 'off' to turn it off
154
+	  *
155
+	  * @var [type]
156
+	  */
157 157
 	public $meta_keywords    = null;
158 158
 
159 159
 	/**
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -293,8 +293,7 @@
 block discarded – undo
293 293
 				$out = $props[$lookup];
294 294
 				unset($obj, $props);
295 295
 				return $out;
296
-			}
297
-			else
296
+			} else
298 297
 			{
299 298
 				unset($obj, $props);
300 299
 				return false;
Please login to merge, or discard this patch.
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
  *
33 33
  * @author Craig Smith <[email protected]>
34 34
  */
35
-class Asset{
35
+class Asset {
36 36
 
37 37
 	/**
38 38
 	 * Constants for the different asset types!
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
 
44 44
 	const AUTOCALLBACKADDER  = AutoCallBackAdderAsset::class; // ajax powered autocomplete backed on a callback
45
-	const AUTOCALLBACK       = AutoCallBackAsset::class;      // ajax powered autocomplete backed on a callback
45
+	const AUTOCALLBACK       = AutoCallBackAsset::class; // ajax powered autocomplete backed on a callback
46 46
 	const AUTOCOMPLETE       = AutoCompleteAsset::class;
47 47
 	const BOOL               = BooleanAsset::class;
48 48
 	const DATEPICKER         = DatepickerAsset::class;
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	const HTML               = HtmlAsset::class;
53 53
 	const IDENTITY           = IdentityAsset::class;
54 54
 	const IMG                = ImageAsset::class;
55
-	const METATEXT			 = MetatextAsset::class;
55
+	const METATEXT = MetatextAsset::class;
56 56
 	const STRING             = StringAsset::class;
57 57
 	const SUBHEADING         = SubHeadingAsset::class;
58 58
 	const TEXT               = TextAsset::class;
@@ -65,70 +65,70 @@  discard block
 block discarded – undo
65 65
 	 *
66 66
 	 * @var string
67 67
 	 */
68
-	public $help             = null;
68
+	public $help = null;
69 69
 
70 70
 	/**
71 71
 	 * Sets the required rule for a property
72 72
 	 *
73 73
 	 * @var bool
74 74
 	 */
75
-	public $required         = true;
75
+	public $required = true;
76 76
 
77 77
 	/**
78 78
 	 * which property is the actual value name for your asset - target one of the properties
79 79
 	 *
80 80
 	 * @var string
81 81
 	 */
82
-	public $value_equals     = null;
82
+	public $value_equals = null;
83 83
 
84 84
 	/**
85 85
 	 * Assets namespace, most often extended as an asset, however may be a property if adding a new input type.
86 86
 	 *
87 87
 	 * @var string
88 88
 	 */
89
-	public $namespace        = self::ASSET;
89
+	public $namespace = self::ASSET;
90 90
 
91 91
 	/**
92 92
 	 * Generally left alone unless overrideing to be a property then should have the instance class
93 93
 	 *
94 94
 	 * @var string
95 95
 	 */
96
-	public $type             = 'asset';
96
+	public $type = 'asset';
97 97
 
98 98
 	/**
99 99
 	 * Properties for thie asset - used to define the property assets to use to build up the asset
100 100
 	 *
101 101
 	 * @var array
102 102
 	 */
103
-	public $properties       = array();
103
+	public $properties = array();
104 104
 
105 105
 	/**
106 106
 	 * Public name - This is used to identify
107 107
 	 *
108 108
 	 * @var [type]
109 109
 	 */
110
-	public $name             = null;
110
+	public $name = null;
111 111
 
112 112
 	/**
113 113
 	 *  just a shortname to use instead of the full $name above
114 114
 	 *
115 115
 	 * @var string
116 116
 	 */
117
-	public $shortname        = null;
117
+	public $shortname = null;
118 118
 
119 119
 	/**
120 120
 	 * the max number of instances, 0 means unlimited - normally used for presets like the robots.txt
121 121
 	 *
122 122
 	 * @var int
123 123
 	 */
124
-	public $max_instances    = 0;
124
+	public $max_instances = 0;
125 125
 
126 126
 	/**
127 127
 	 * IE if private is true, we do not show the page link block... and idsable the meta
128 128
 	 * but if private is false, we show the page link and let meta decide for itself:
129 129
 	 * @var bool
130 130
 	 */
131
-	public $private          = false;
131
+	public $private = false;
132 132
 
133 133
 	/**
134 134
 	 * @deprecated Initial -
@@ -136,14 +136,14 @@  discard block
 block discarded – undo
136 136
 	 *
137 137
 	 * @var [type]
138 138
 	 */
139
-	public $embedded         = null;
139
+	public $embedded = null;
140 140
 
141 141
 	/**
142 142
 	 * @deprecated version
143 143
 	 * * @TODO - Remove from here and from teh database object
144 144
 	 * @var [type]
145 145
 	 */
146
-	public $theme            = null;
146
+	public $theme = null;
147 147
 
148 148
 	/**
149 149
 	 * set to 'off' to turn it off
@@ -157,14 +157,14 @@  discard block
 block discarded – undo
157 157
 	 *
158 158
 	 * @var [type]
159 159
 	 */
160
-	public $meta_keywords    = null;
160
+	public $meta_keywords = null;
161 161
 
162 162
 	/**
163 163
 	 * set to 'off' to turn it off
164 164
 	 *
165 165
 	 * @var [type]
166 166
 	 */
167
-	public $page_css         = null;
167
+	public $page_css = null;
168 168
 
169 169
 	/**
170 170
 	 * set to 'off' to turn it off
@@ -174,12 +174,12 @@  discard block
 block discarded – undo
174 174
 	public $page_js          = null;
175 175
 
176 176
 
177
-	public $options          = false;						// Options for the element -- should actually be removed from the database table most likely
178
-	public $status_equals    = null;                        // does the asset has a status linked to a prop
179
-	public $start_date       = null;                        // does the asset has a start date linked to a prop
180
-	public $end_date         = null;                        // does the asset has an end date linked to a prop
181
-	public $comment_equals   = null;                        // does the asset allow comments (linked to a specific property - similar to status_equals)
182
-	public $warning          = null;                        // field for warnings - deprected in favour of validation_messages
177
+	public $options          = false; // Options for the element -- should actually be removed from the database table most likely
178
+	public $status_equals    = null; // does the asset has a status linked to a prop
179
+	public $start_date       = null; // does the asset has a start date linked to a prop
180
+	public $end_date         = null; // does the asset has an end date linked to a prop
181
+	public $comment_equals   = null; // does the asset allow comments (linked to a specific property - similar to status_equals)
182
+	public $warning          = null; // field for warnings - deprected in favour of validation_messages
183 183
 	//public $published		= null;							//published status
184 184
 	//public $validation_messages = null					//validation messages
185 185
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	public $module           = null;
188 188
 	public $value            = null;
189 189
 	public $status           = null;
190
-	public $meta             = false;                       // ancillary meta info/data - similar to options
190
+	public $meta             = false; // ancillary meta info/data - similar to options
191 191
 	public $callback         = null;
192 192
 
193 193
 	/**
@@ -195,36 +195,36 @@  discard block
 block discarded – undo
195 195
 	 *
196 196
 	 * @var [type]
197 197
 	 */
198
-	public $children         = null;
198
+	public $children = null;
199 199
 
200 200
 	/**
201 201
 	 * Is this a child only asset? if marked as true does not auto display on menu options and can only be linked in as a child property to an asset.
202 202
 	 *
203 203
 	 * @var bool
204 204
 	 */
205
-	public $is_child         = false;
205
+	public $is_child = false;
206 206
 
207 207
 	/**
208 208
 	 * Asset that can be a child, ie an article belonging to a category
209 209
 	 *
210 210
 	 * @var [type]
211 211
 	 */
212
-	public $accept           = null;
212
+	public $accept = null;
213 213
 
214 214
 	/**
215 215
 	 * assets that can be children, a value means it is limited to that many children, -1 means unlimited
216 216
 	 * @TodO update this to better display with a selct / multiSelect null / 0 / -1 or any falsy is unlimited, else it is limited to that number...
217 217
 	 * @var [type]
218 218
 	 */
219
-	public $accept_limit     = null;
219
+	public $accept_limit = null;
220 220
 
221 221
 
222 222
 	/**
223 223
 	 * generate the route for this asset
224 224
 	 * Overwrite this in your own assets to generate your own route
225 225
 	 */
226
-	public static function route(DatastorePages $record, $route = null){
227
-		if(null === $route){
226
+	public static function route(DatastorePages $record, $route = null) {
227
+		if (null === $route) {
228 228
 			$route = 'frontend.ams.page.slug';
229 229
 		}
230 230
 		$page = $record->page;
@@ -255,8 +255,8 @@  discard block
 block discarded – undo
255 255
 	 *
256 256
 	 * @return array
257 257
 	 */
258
-	public static function getDefaultProperties(){
259
-		$obj	 = new ReflectionClass(get_called_class());
258
+	public static function getDefaultProperties() {
259
+		$obj = new ReflectionClass(get_called_class());
260 260
 		return $obj->getDefaultProperties();
261 261
 	}
262 262
 
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 	public static function getValueLabel()
271 271
 	{
272 272
 		$props = self::getDefaultProperties();
273
-		if(empty($props['value_equals']) || empty($props['properties'][$props['value_equals']]['name'])){
273
+		if (empty($props['value_equals']) || empty($props['properties'][$props['value_equals']]['name'])) {
274 274
 			throw new DatastoreException("value_equals is a required parameter");
275 275
 		}
276 276
 
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 		{
338 338
 			$args['unique_id'] = uniqid();
339 339
 		}
340
-		$data['data']			 = $args;
340
+		$data['data'] = $args;
341 341
 		$data['asset_classname'] = $injectedform;
342 342
 		return View::make($template, $data)->render();
343 343
 	}
@@ -353,9 +353,9 @@  discard block
 block discarded – undo
353 353
 	public static function render($args = [], $params = false)
354 354
 	{
355 355
 
356
-		if(is_string($params)){
356
+		if (is_string($params)) {
357 357
 			$template = $params;
358
-		} else {
358
+		}else {
359 359
 			$template = is_array($params) && !empty($params['view']) ? $params['view'] : self::getAssetView();
360 360
 		}
361 361
 
@@ -395,8 +395,8 @@  discard block
 block discarded – undo
395 395
 	 * @return void
396 396
 	 * @author Craig Smith <[email protected]>
397 397
 	 */
398
-	public static function getPath($className = null){
399
-		if(null === $className) {
398
+	public static function getPath($className = null) {
399
+		if (null === $className) {
400 400
 			$className = get_called_class();
401 401
 		}
402 402
 		return Helpers::getPath($className);
Please login to merge, or discard this patch.
src/Database/Seeds/DatastoreRolesSeeder.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -12,23 +12,23 @@
 block discarded – undo
12 12
 class DatastoreRolesSeeder extends Seeder
13 13
 {
14 14
 
15
-    /**
16
-     * Run the database seed.
17
-     */
18
-    public function run()
19
-    {
15
+	/**
16
+	 * Run the database seed.
17
+	 */
18
+	public function run()
19
+	{
20 20
 
21
-        // Create Roles
22
-        $cms = Role::create(['name' => 'cms']);
21
+		// Create Roles
22
+		$cms = Role::create(['name' => 'cms']);
23 23
 
24
-        // Create Permissions
25
-        $permissions = ['manage datastore'];
24
+		// Create Permissions
25
+		$permissions = ['manage datastore'];
26 26
 
27
-        foreach ($permissions as $permission) {
28
-            Permission::create(['name' => $permission]);
27
+		foreach ($permissions as $permission) {
28
+			Permission::create(['name' => $permission]);
29 29
 		}
30 30
 
31 31
 		$cms->givePermissionTo('manage datastore');
32 32
 
33
-    }
33
+	}
34 34
 }
Please login to merge, or discard this patch.
Database/migrations/2019_05_06_151831_create_datastore_datastore_table.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -10,41 +10,41 @@
 block discarded – undo
10 10
  */
11 11
 class CreateDatastoreDatastoreTable extends Migration
12 12
 {
13
-    /**
14
-     * Run the migrations.
15
-     *
16
-     * @return void
17
-     */
18
-    public function up()
19
-    {
20
-        Schema::create('datastore_datastore', function (Blueprint $table) {
21
-            $table->bigIncrements('id');
22
-            $table->unsignedBigInteger('datastore_id')->nullable();
23
-            $table->unsignedBigInteger('datastore2_id')->nullable();
13
+	/**
14
+	 * Run the migrations.
15
+	 *
16
+	 * @return void
17
+	 */
18
+	public function up()
19
+	{
20
+		Schema::create('datastore_datastore', function (Blueprint $table) {
21
+			$table->bigIncrements('id');
22
+			$table->unsignedBigInteger('datastore_id')->nullable();
23
+			$table->unsignedBigInteger('datastore2_id')->nullable();
24 24
 
25 25
 			$table->unique(['datastore2_id', 'datastore_id']);
26
-            $table->index('datastore_id');
27
-            $table->index('datastore2_id');
26
+			$table->index('datastore_id');
27
+			$table->index('datastore2_id');
28 28
 
29 29
 
30
-            $table->foreign('datastore_id')->references('id')->on('datastore')->onDelete('CASCADE')->onUpdate('RESTRICT');
30
+			$table->foreign('datastore_id')->references('id')->on('datastore')->onDelete('CASCADE')->onUpdate('RESTRICT');
31 31
 			$table->foreign('datastore2_id')->references('id')->on('datastore')->onDelete('CASCADE')->onUpdate('RESTRICT');
32 32
 
33 33
 
34 34
 
35
-        });
35
+		});
36 36
 
37 37
 
38 38
 
39
-    }
39
+	}
40 40
 
41
-    /**
42
-     * Reverse the migrations.
43
-     *
44
-     * @return void
45
-     */
46
-    public function down()
47
-    {
48
-        Schema::dropIfExists('datastore_datastore');
49
-    }
41
+	/**
42
+	 * Reverse the migrations.
43
+	 *
44
+	 * @return void
45
+	 */
46
+	public function down()
47
+	{
48
+		Schema::dropIfExists('datastore_datastore');
49
+	}
50 50
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function up()
19 19
     {
20
-        Schema::create('datastore_datastore', function (Blueprint $table) {
20
+        Schema::create('datastore_datastore', function(Blueprint $table) {
21 21
             $table->bigIncrements('id');
22 22
             $table->unsignedBigInteger('datastore_id')->nullable();
23 23
             $table->unsignedBigInteger('datastore2_id')->nullable();
Please login to merge, or discard this patch.
src/Database/migrations/2019_05_06_151819_create_datastore_table.php 2 patches
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -10,68 +10,68 @@
 block discarded – undo
10 10
  */
11 11
 class CreateDatastoreTable extends Migration
12 12
 {
13
-    /**
14
-     * Run the migrations.
15
-     *
16
-     * @return void
17
-     */
18
-    public function up()
19
-    {
20
-        Schema::create('datastore', function (Blueprint $table) {
13
+	/**
14
+	 * Run the migrations.
15
+	 *
16
+	 * @return void
17
+	 */
18
+	public function up()
19
+	{
20
+		Schema::create('datastore', function (Blueprint $table) {
21 21
 			$table->bigIncrements('id');
22
-            $table->string('type', 255)->nullable();
23
-            $table->string('namespace', 255)->nullable();
24
-            $table->string('module', 255);
25
-            $table->string('name', 255)->nullable();
26
-            $table->string('key', 255)->nullable();
27
-            $table->unsignedTinyInteger('private')->nullable()->default(0);
28
-            $table->longText('value')->nullable();
29
-            $table->string('options', 255)->nullable();
30
-            $table->string('meta', 255)->nullable();
31
-            $table->string('accept', 255)->nullable()->comment('comma separated list of assets it accepts as related');
32
-            $table->string('accept_limit', 255)->nullable();
33
-            $table->unsignedBigInteger('datastore_id')->nullable();
34
-            $table->string('shortname', 255)->nullable();
35
-            $table->string('children', 255)->nullable();
36
-            $table->unsignedTinyInteger('is_child')->nullable();
37
-            $table->string('status', 255)->nullable();
38
-            $table->string('embedded', 255)->nullable();
39
-            $table->string('theme', 50)->nullable();
40
-            $table->text('meta_description')->nullable();
41
-            $table->text('meta_keywords')->nullable();
42
-            $table->text('page_css')->nullable();
43
-            $table->text('page_js')->nullable();
44
-            $table->string('limit', 20)->nullable();
45
-            $table->string('warning', 20)->nullable();
46
-            $table->string('callback', 255)->nullable();
47
-            $table->unsignedTinyInteger('required')->nullable();
48
-            $table->string('comment_equals', 255)->nullable();
49
-            $table->integer('max_instances')->nullable()->default(0);
50
-            $table->date('start_date')->nullable();
51
-            $table->date('end_date')->nullable();
22
+			$table->string('type', 255)->nullable();
23
+			$table->string('namespace', 255)->nullable();
24
+			$table->string('module', 255);
25
+			$table->string('name', 255)->nullable();
26
+			$table->string('key', 255)->nullable();
27
+			$table->unsignedTinyInteger('private')->nullable()->default(0);
28
+			$table->longText('value')->nullable();
29
+			$table->string('options', 255)->nullable();
30
+			$table->string('meta', 255)->nullable();
31
+			$table->string('accept', 255)->nullable()->comment('comma separated list of assets it accepts as related');
32
+			$table->string('accept_limit', 255)->nullable();
33
+			$table->unsignedBigInteger('datastore_id')->nullable();
34
+			$table->string('shortname', 255)->nullable();
35
+			$table->string('children', 255)->nullable();
36
+			$table->unsignedTinyInteger('is_child')->nullable();
37
+			$table->string('status', 255)->nullable();
38
+			$table->string('embedded', 255)->nullable();
39
+			$table->string('theme', 50)->nullable();
40
+			$table->text('meta_description')->nullable();
41
+			$table->text('meta_keywords')->nullable();
42
+			$table->text('page_css')->nullable();
43
+			$table->text('page_js')->nullable();
44
+			$table->string('limit', 20)->nullable();
45
+			$table->string('warning', 20)->nullable();
46
+			$table->string('callback', 255)->nullable();
47
+			$table->unsignedTinyInteger('required')->nullable();
48
+			$table->string('comment_equals', 255)->nullable();
49
+			$table->integer('max_instances')->nullable()->default(0);
50
+			$table->date('start_date')->nullable();
51
+			$table->date('end_date')->nullable();
52 52
 			$table->string('lang', 255)->nullable();
53 53
 			$table->timestamps();
54 54
 
55 55
 
56 56
 
57 57
 
58
-            $table->index('datastore_id', 'index_foreignkey_datastore');
58
+			$table->index('datastore_id', 'index_foreignkey_datastore');
59 59
 
60
-            $table->foreign('datastore_id', 'datastore_ibfk_1')->references('id')->on('datastore')->onDelete('CASCADE')->onUpdate('RESTRICT');
60
+			$table->foreign('datastore_id', 'datastore_ibfk_1')->references('id')->on('datastore')->onDelete('CASCADE')->onUpdate('RESTRICT');
61 61
 
62
-        });
62
+		});
63 63
 
64 64
 
65 65
 
66
-    }
66
+	}
67 67
 
68
-    /**
69
-     * Reverse the migrations.
70
-     *
71
-     * @return void
72
-     */
73
-    public function down()
74
-    {
75
-        Schema::dropIfExists('datastore');
76
-    }
68
+	/**
69
+	 * Reverse the migrations.
70
+	 *
71
+	 * @return void
72
+	 */
73
+	public function down()
74
+	{
75
+		Schema::dropIfExists('datastore');
76
+	}
77 77
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function up()
19 19
     {
20
-        Schema::create('datastore', function (Blueprint $table) {
20
+        Schema::create('datastore', function(Blueprint $table) {
21 21
 			$table->bigIncrements('id');
22 22
             $table->string('type', 255)->nullable();
23 23
             $table->string('namespace', 255)->nullable();
Please login to merge, or discard this patch.
Database/migrations/2019_05_06_151845_create_datastore_comments_table.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -10,34 +10,34 @@
 block discarded – undo
10 10
  */
11 11
 class CreateDatastoreCommentsTable extends Migration
12 12
 {
13
-    /**
14
-     * Run the migrations.
15
-     *
16
-     * @return void
17
-     */
18
-    public function up()
19
-    {
20
-        Schema::create('datastore_comments', function (Blueprint $table) {
21
-            $table->bigIncrements('id');
13
+	/**
14
+	 * Run the migrations.
15
+	 *
16
+	 * @return void
17
+	 */
18
+	public function up()
19
+	{
20
+		Schema::create('datastore_comments', function (Blueprint $table) {
21
+			$table->bigIncrements('id');
22 22
 			$table->bigInteger('user_id')->unsigned();
23
-            $table->bigInteger('datastore_id')->unsigned();
24
-            $table->bigInteger('parent_id')->unsigned()->nullable();
25
-            $table->text('body');
26
-            $table->timestamps();
27
-            $table->softDeletes();
28
-        });
23
+			$table->bigInteger('datastore_id')->unsigned();
24
+			$table->bigInteger('parent_id')->unsigned()->nullable();
25
+			$table->text('body');
26
+			$table->timestamps();
27
+			$table->softDeletes();
28
+		});
29 29
 
30 30
 
31 31
 
32
-    }
32
+	}
33 33
 
34
-    /**
35
-     * Reverse the migrations.
36
-     *
37
-     * @return void
38
-     */
39
-    public function down()
40
-    {
41
-        Schema::dropIfExists('datastore_comments');
42
-    }
34
+	/**
35
+	 * Reverse the migrations.
36
+	 *
37
+	 * @return void
38
+	 */
39
+	public function down()
40
+	{
41
+		Schema::dropIfExists('datastore_comments');
42
+	}
43 43
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function up()
19 19
     {
20
-        Schema::create('datastore_comments', function (Blueprint $table) {
20
+        Schema::create('datastore_comments', function(Blueprint $table) {
21 21
             $table->bigIncrements('id');
22 22
 			$table->bigInteger('user_id')->unsigned();
23 23
             $table->bigInteger('datastore_id')->unsigned();
Please login to merge, or discard this patch.
src/Database/migrations/2019_05_06_151845_create_datastore_pages_table.php 2 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -10,37 +10,37 @@
 block discarded – undo
10 10
  */
11 11
 class CreateDatastorePagesTable extends Migration
12 12
 {
13
-    /**
14
-     * Run the migrations.
15
-     *
16
-     * @return void
17
-     */
18
-    public function up()
19
-    {
20
-        Schema::create('datastore_pages', function (Blueprint $table) {
21
-            $table->bigIncrements('id');
22
-            $table->string('title', 255)->nullable();
23
-            $table->string('slug', 255)->nullable();
24
-            $table->unsignedBigInteger('asset')->nullable()->default(0);
25
-
26
-
27
-
28
-            $table->foreign('asset', 'datastore_asset_foreign_key')->references('id')->on('datastore')->onDelete('RESTRICT
13
+	/**
14
+	 * Run the migrations.
15
+	 *
16
+	 * @return void
17
+	 */
18
+	public function up()
19
+	{
20
+		Schema::create('datastore_pages', function (Blueprint $table) {
21
+			$table->bigIncrements('id');
22
+			$table->string('title', 255)->nullable();
23
+			$table->string('slug', 255)->nullable();
24
+			$table->unsignedBigInteger('asset')->nullable()->default(0);
25
+
26
+
27
+
28
+			$table->foreign('asset', 'datastore_asset_foreign_key')->references('id')->on('datastore')->onDelete('RESTRICT
29 29
 ')->onUpdate('RESTRICT');
30 30
 
31
-        });
31
+		});
32 32
 
33 33
 
34 34
 
35
-    }
35
+	}
36 36
 
37
-    /**
38
-     * Reverse the migrations.
39
-     *
40
-     * @return void
41
-     */
42
-    public function down()
43
-    {
44
-        Schema::dropIfExists('datastore_pages');
45
-    }
37
+	/**
38
+	 * Reverse the migrations.
39
+	 *
40
+	 * @return void
41
+	 */
42
+	public function down()
43
+	{
44
+		Schema::dropIfExists('datastore_pages');
45
+	}
46 46
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function up()
19 19
     {
20
-        Schema::create('datastore_pages', function (Blueprint $table) {
20
+        Schema::create('datastore_pages', function(Blueprint $table) {
21 21
             $table->bigIncrements('id');
22 22
             $table->string('title', 255)->nullable();
23 23
             $table->string('slug', 255)->nullable();
Please login to merge, or discard this patch.
src/Repositories/DatastoreDatastoreRepository.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,12 +10,12 @@
 block discarded – undo
10 10
  */
11 11
 class DatastoreDatastoreRepository extends BaseRepository
12 12
 {
13
-    /**
14
-     * @return string
15
-     */
16
-    public function model()
17
-    {
18
-        return DatastoreDatastore::class;
13
+	/**
14
+	 * @return string
15
+	 */
16
+	public function model()
17
+	{
18
+		return DatastoreDatastore::class;
19 19
 	}
20 20
 
21 21
 	public function paginateAccepted($datastore_id, $status = NULL, $limit = 25, $pageName = 'page', $page = null){
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@
 block discarded – undo
18 18
         return DatastoreDatastore::class;
19 19
 	}
20 20
 
21
-	public function paginateAccepted($datastore_id, $status = NULL, $limit = 25, $pageName = 'page', $page = null){
21
+	public function paginateAccepted($datastore_id, $status = NULL, $limit = 25, $pageName = 'page', $page = null) {
22 22
 		$this->where('datastore2_id', $datastore_id)->with('datastore');
23 23
 
24 24
 			$this->whereHas('datastore', function($query) use ($status) {
25
-				if($status){
26
-					if(!is_array($status)){
25
+				if ($status) {
26
+					if (!is_array($status)) {
27 27
 						$status = [$status];
28 28
 					}
29 29
 					$query->whereIn('status', $status);
Please login to merge, or discard this patch.
src/Repositories/DatastoreRepository.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -14,12 +14,12 @@  discard block
 block discarded – undo
14 14
  */
15 15
 class DatastoreRepository extends BaseRepository
16 16
 {
17
-    /**
18
-     * @return string
19
-     */
20
-    public function model()
21
-    {
22
-        return DatastoreModel::class;
17
+	/**
18
+	 * @return string
19
+	 */
20
+	public function model()
21
+	{
22
+		return DatastoreModel::class;
23 23
 	}
24 24
 
25 25
 	public function paginateAssets($assetData, $limit = 25, $pageName = 'page', $page = null){
@@ -29,23 +29,23 @@  discard block
 block discarded – undo
29 29
 	}
30 30
 
31 31
 
32
-	    /**
33
-     * @param int    $limit
34
-     * @param array  $columns
35
-     * @param string $pageName
36
-     * @param null   $page
37
-     *
38
-     * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
39
-     */
40
-    public function paginate($limit = 25, array $columns = ['*'], $pageName = 'page', $page = null)
41
-    {
42
-        $this->newQuery()->eagerLoad()->setClauses()->setScopes();
32
+		/**
33
+		 * @param int    $limit
34
+		 * @param array  $columns
35
+		 * @param string $pageName
36
+		 * @param null   $page
37
+		 *
38
+		 * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
39
+		 */
40
+	public function paginate($limit = 25, array $columns = ['*'], $pageName = 'page', $page = null)
41
+	{
42
+		$this->newQuery()->eagerLoad()->setClauses()->setScopes();
43 43
 
44
-        $models = $this->query->paginate($limit, $columns, $pageName, $page);
44
+		$models = $this->query->paginate($limit, $columns, $pageName, $page);
45 45
 
46
-        $this->unsetClauses();
46
+		$this->unsetClauses();
47 47
 
48
-        return $models;
48
+		return $models;
49 49
 	}
50 50
 
51 51
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         return DatastoreModel::class;
23 23
 	}
24 24
 
25
-	public function paginateAssets($assetData, $limit = 25, $pageName = 'page', $page = null){
25
+	public function paginateAssets($assetData, $limit = 25, $pageName = 'page', $page = null) {
26 26
 		$this->where('type', $assetData['class']);
27 27
 		return $this->paginate($limit, ['*'], $pageName, $page);
28 28
 
@@ -49,14 +49,14 @@  discard block
 block discarded – undo
49 49
 	}
50 50
 
51 51
 
52
-	public function paginateAccepted($datastore_id, $status = NULL, $limit = 25, $pageName = 'page', $page = null){
52
+	public function paginateAccepted($datastore_id, $status = NULL, $limit = 25, $pageName = 'page', $page = null) {
53 53
 		$ds2 = new DatastoreDatastoreRepository();
54 54
 		return $ds2->paginateAccepted($datastore_id, $status, $limit, $pageName, $page);
55 55
 	}
56 56
 
57
-	public function paginateSearchProp($property, $property_value, $parent_type, $parent_status = NULL, $limit = 25, $pageName = 'page', $page = null){
57
+	public function paginateSearchProp($property, $property_value, $parent_type, $parent_status = NULL, $limit = 25, $pageName = 'page', $page = null) {
58 58
 
59
-		if($parent_status){
59
+		if ($parent_status) {
60 60
 			$this->where('status', $published_status);
61 61
 		}
62 62
 
Please login to merge, or discard this patch.
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.