Skip to content

Commit 2a8eae4

Browse files
yajragithub-actions[bot]
authored andcommitted
fix: pint
1 parent d57a643 commit 2a8eae4

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/DataTablesServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function boot()
4545
DataTables::macro($engine, function () use ($class) {
4646
$canCreate = [$class, 'canCreate'];
4747
if (is_callable($canCreate) && ! call_user_func_array($canCreate, func_get_args())) {
48-
throw new \InvalidArgumentException();
48+
throw new \InvalidArgumentException;
4949
}
5050

5151
$create = [$class, 'create'];

tests/Unit/HelperTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function test_compile_content_blade()
7272
{
7373
$content = '{!! $id !!}';
7474
$data = ['id' => 2];
75-
$obj = new stdClass();
75+
$obj = new stdClass;
7676
$obj->id = 2;
7777

7878
$compiled = Helper::compileContent($content, $data, $obj);
@@ -83,7 +83,7 @@ public function test_compile_content_string()
8383
{
8484
$content = 'string';
8585
$data = ['id' => 2];
86-
$obj = new stdClass();
86+
$obj = new stdClass;
8787
$obj->id = 2;
8888

8989
$compiled = Helper::compileContent($content, $data, $obj);
@@ -94,7 +94,7 @@ public function test_compile_content_integer()
9494
{
9595
$content = 1;
9696
$data = ['id' => 2];
97-
$obj = new stdClass();
97+
$obj = new stdClass;
9898
$obj->id = 2;
9999

100100
$compiled = Helper::compileContent($content, $data, $obj);
@@ -105,7 +105,7 @@ public function test_compile_content_function()
105105
{
106106
$content = fn ($obj) => $obj->id;
107107
$data = ['id' => 2];
108-
$obj = new stdClass();
108+
$obj = new stdClass;
109109
$obj->id = 2;
110110

111111
$compiled = Helper::compileContent($content, $data, $obj);
@@ -122,7 +122,7 @@ public function __invoke($obj)
122122
}
123123
};
124124
$data = ['id' => 2];
125-
$obj = new stdClass();
125+
$obj = new stdClass;
126126
$obj->id = 2;
127127

128128
$compiled = Helper::compileContent($content, $data, $obj);
@@ -145,7 +145,7 @@ public function test_get_mixed_value()
145145
'name' => 'John',
146146
'created_at' => '1234',
147147
];
148-
$class = new stdClass();
148+
$class = new stdClass;
149149
$class->id = 1;
150150
$class->name = 'John';
151151
$class->created_at = $carbon;
@@ -162,7 +162,7 @@ public function test_get_mixed_value()
162162

163163
public function test_cast_to_array_an_object()
164164
{
165-
$class = new stdClass();
165+
$class = new stdClass;
166166
$class->id = 1;
167167
$compiled = Helper::castToArray($class);
168168
$this->assertEquals(['id' => 1], $compiled);
@@ -188,11 +188,11 @@ public function test_get_or_method()
188188

189189
public function test_convert_to_array()
190190
{
191-
$row = new stdClass();
191+
$row = new stdClass;
192192
$row->id = 1;
193193
$row->name = 'John';
194194
$row->posts = ['id' => 1, 'title' => 'Demo'];
195-
$author = new stdClass();
195+
$author = new stdClass;
196196
$author->name = 'Billy';
197197
$row->author = $author;
198198

tests/Unit/RequestTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function it_can_get_the_base_request()
2121
*/
2222
protected function getRequest()
2323
{
24-
return new Request();
24+
return new Request;
2525
}
2626

2727
#[Test]

0 commit comments

Comments
 (0)