Skip to content

Commit

Permalink
fix: pint
Browse files Browse the repository at this point in the history
  • Loading branch information
yajra authored and github-actions[bot] committed Aug 17, 2024
1 parent d57a643 commit 2a8eae4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/DataTablesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function boot()
DataTables::macro($engine, function () use ($class) {
$canCreate = [$class, 'canCreate'];
if (is_callable($canCreate) && ! call_user_func_array($canCreate, func_get_args())) {
throw new \InvalidArgumentException();
throw new \InvalidArgumentException;
}

$create = [$class, 'create'];
Expand Down
18 changes: 9 additions & 9 deletions tests/Unit/HelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function test_compile_content_blade()
{
$content = '{!! $id !!}';
$data = ['id' => 2];
$obj = new stdClass();
$obj = new stdClass;
$obj->id = 2;

$compiled = Helper::compileContent($content, $data, $obj);
Expand All @@ -83,7 +83,7 @@ public function test_compile_content_string()
{
$content = 'string';
$data = ['id' => 2];
$obj = new stdClass();
$obj = new stdClass;
$obj->id = 2;

$compiled = Helper::compileContent($content, $data, $obj);
Expand All @@ -94,7 +94,7 @@ public function test_compile_content_integer()
{
$content = 1;
$data = ['id' => 2];
$obj = new stdClass();
$obj = new stdClass;
$obj->id = 2;

$compiled = Helper::compileContent($content, $data, $obj);
Expand All @@ -105,7 +105,7 @@ public function test_compile_content_function()
{
$content = fn ($obj) => $obj->id;
$data = ['id' => 2];
$obj = new stdClass();
$obj = new stdClass;
$obj->id = 2;

$compiled = Helper::compileContent($content, $data, $obj);
Expand All @@ -122,7 +122,7 @@ public function __invoke($obj)
}
};
$data = ['id' => 2];
$obj = new stdClass();
$obj = new stdClass;
$obj->id = 2;

$compiled = Helper::compileContent($content, $data, $obj);
Expand All @@ -145,7 +145,7 @@ public function test_get_mixed_value()
'name' => 'John',
'created_at' => '1234',
];
$class = new stdClass();
$class = new stdClass;
$class->id = 1;
$class->name = 'John';
$class->created_at = $carbon;
Expand All @@ -162,7 +162,7 @@ public function test_get_mixed_value()

public function test_cast_to_array_an_object()
{
$class = new stdClass();
$class = new stdClass;
$class->id = 1;
$compiled = Helper::castToArray($class);
$this->assertEquals(['id' => 1], $compiled);
Expand All @@ -188,11 +188,11 @@ public function test_get_or_method()

public function test_convert_to_array()
{
$row = new stdClass();
$row = new stdClass;
$row->id = 1;
$row->name = 'John';
$row->posts = ['id' => 1, 'title' => 'Demo'];
$author = new stdClass();
$author = new stdClass;
$author->name = 'Billy';
$row->author = $author;

Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function it_can_get_the_base_request()
*/
protected function getRequest()
{
return new Request();
return new Request;
}

#[Test]
Expand Down

0 comments on commit 2a8eae4

Please sign in to comment.