Skip to content

Commit 5e56162

Browse files
committedMar 6, 2020
wip
1 parent 2215f1b commit 5e56162

File tree

10 files changed

+36
-13
lines changed

10 files changed

+36
-13
lines changed
 

‎src/Auth/Database/Administrator.php

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class Administrator extends Model implements AuthenticatableContract
1919
use Authenticatable;
2020
use AdminBuilder;
2121
use HasPermissions;
22+
2223
protected $fillable = ['username', 'password', 'name', 'avatar'];
2324

2425
/**

‎src/Form/Field/Tags.php

+1
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ public function value($value = null)
163163
return $this;
164164
}
165165

166+
166167
/**
167168
* {@inheritdoc}
168169
*/

‎src/Grid.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,8 @@ public function getCreateUrl()
681681
$queryString = http_build_query($constraints);
682682
}
683683

684-
return sprintf('%s/create%s',
684+
return sprintf(
685+
'%s/create%s',
685686
$this->resource(),
686687
$queryString ? ('?'.$queryString) : ''
687688
);

‎src/Grid/Displayers/QRCode.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ public function display($formatter = null, $width = 150, $height = 150)
3333

3434
$img = sprintf(
3535
"<img src='https://api.qrserver.com/v1/create-qr-code/?size=%sx%s&data=%s' style='height:%spx;width:%spx;'/>",
36-
$width, $height, $content, $height, $width
36+
$width,
37+
$height,
38+
$content,
39+
$height,
40+
$width
3741
);
3842

3943
return <<<HTML

‎src/Grid/Tools/Selector.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@ protected function addSelector($column, $label, $options = [], $query = null, $t
7373
$label = __(Str::title($column));
7474
}
7575

76-
$this->selectors[$column] = compact(
77-
'label', 'options', 'type', 'query'
78-
);
76+
$this->selectors[$column] = compact('label', 'options', 'type', 'query');
7977

8078
return $this;
8179
}

‎src/Traits/HasAssets.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,8 @@ protected static function getManifestData($key)
275275
}
276276

277277
static::$manifestData = json_decode(
278-
file_get_contents(public_path(static::$manifest)), true
278+
file_get_contents(public_path(static::$manifest)),
279+
true
279280
);
280281

281282
return static::$manifestData[$key];

‎src/Widgets/ContainsForms.php

+17
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,28 @@
44

55
trait ContainsForms
66
{
7+
/**
8+
* @var string
9+
*/
710
protected $activeName = 'active';
811

12+
/**
13+
* @param array $forms
14+
* @param null $active
15+
* @return mixed
16+
*/
917
public static function forms($forms, $active = null)
1018
{
1119
$tab = new static();
1220

1321
return $tab->buildTabbedForms($forms, $active);
1422
}
1523

24+
/**
25+
* @param array $forms
26+
* @param null $active
27+
* @return $this
28+
*/
1629
protected function buildTabbedForms($forms, $active = null)
1730
{
1831
$active = $active ?: request($this->activeName);
@@ -40,6 +53,10 @@ protected function buildTabbedForms($forms, $active = null)
4053
return $this;
4154
}
4255

56+
/**
57+
* @param string $name
58+
* @return string
59+
*/
4360
protected function getTabUrl($name)
4461
{
4562
$query = [$this->activeName => $name];

‎src/Widgets/Form.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function __construct($data = [])
121121
*
122122
* @return mixed
123123
*/
124-
protected function title()
124+
public function title()
125125
{
126126
return $this->title;
127127
}
@@ -454,6 +454,9 @@ public function fieldset(string $title, Closure $setCallback)
454454
return $fieldset;
455455
}
456456

457+
/**
458+
* @return $this
459+
*/
457460
public function unbox()
458461
{
459462
$this->inbox = false;

‎tests/ImageUploadTest.php

+2-6
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,7 @@ public function testUploadMultipleImage()
176176

177177
$path = __DIR__.'/assets/test.jpg';
178178

179-
$file = new \Illuminate\Http\UploadedFile(
180-
$path, 'test.jpg', 'image/jpeg', null, true
181-
);
179+
$file = new \Illuminate\Http\UploadedFile($path, 'test.jpg', 'image/jpeg', null, true);
182180

183181
$size = rand(10, 20);
184182
$files = ['pictures' => array_pad([], $size, $file)];
@@ -212,9 +210,7 @@ public function testRemoveMultipleFiles()
212210
// upload files
213211
$path = __DIR__.'/assets/test.jpg';
214212

215-
$file = new \Illuminate\Http\UploadedFile(
216-
$path, 'test.jpg', 'image/jpeg', null, true
217-
);
213+
$file = new \Illuminate\Http\UploadedFile($path, 'test.jpg', 'image/jpeg', null, true);
218214

219215
$size = rand(10, 20);
220216
$files = ['pictures' => array_pad([], $size, $file)];

‎tests/models/Tree.php

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class Tree extends Model
1010
{
1111
use AdminBuilder;
1212
use ModelTree;
13+
1314
/**
1415
* Create a new Eloquent model instance.
1516
*

0 commit comments

Comments
 (0)
Please sign in to comment.