Skip to content

Commit 9a2857b

Browse files
committed
Removed unused form builder class.
1 parent 3a6f880 commit 9a2857b

File tree

3 files changed

+5
-27
lines changed

3 files changed

+5
-27
lines changed

src/Html/Builder.php

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Yajra\Datatables\Html;
44

5-
use Collective\Html\FormBuilder;
65
use Collective\Html\HtmlBuilder;
76
use Illuminate\Contracts\Config\Repository;
87
use Illuminate\Contracts\View\Factory;
@@ -38,11 +37,6 @@ class Builder
3837
*/
3938
public $html;
4039

41-
/**
42-
* @var FormBuilder
43-
*/
44-
public $form;
45-
4640
/**
4741
* @var string|array
4842
*/
@@ -90,19 +84,13 @@ class Builder
9084
* @param Repository $config
9185
* @param Factory $view
9286
* @param HtmlBuilder $html
93-
* @param FormBuilder $form
94-
*/
95-
public function __construct(
96-
Repository $config,
97-
Factory $view,
98-
HtmlBuilder $html,
99-
FormBuilder $form
100-
) {
87+
*/
88+
public function __construct(Repository $config, Factory $view, HtmlBuilder $html)
89+
{
10190
$this->config = $config;
10291
$this->view = $view;
10392
$this->html = $html;
10493
$this->collection = new Collection;
105-
$this->form = $form;
10694
}
10795

10896
/**
@@ -630,7 +618,7 @@ private function compileTableFooter()
630618
{
631619
$footer = [];
632620
foreach ($this->collection->all() as $row) {
633-
$footer[] = '<th>' . $row->footer . '</th>';
621+
$footer[] = '<th>' . $row->footer . '</th>';
634622
}
635623

636624
return $footer;

tests/HtmlBuilderTest.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ public function test_generate_table_html()
1313
{
1414
$builder = $this->getHtmlBuilder();
1515
$builder->html->shouldReceive('attributes')->times(8)->andReturn('id="foo"');
16-
$builder->form->shouldReceive('checkbox')
17-
->once()
18-
->andReturn('<input type="checkbox" id="foo"/>');
1916

2017
$builder->columns(['foo', 'bar' => ['data' => 'foo']])
2118
->addCheckbox(['id' => 'foo'])
@@ -56,9 +53,6 @@ public function test_generate_table_html_with_empty_footer()
5653
{
5754
$builder = $this->getHtmlBuilder();
5855
$builder->html->shouldReceive('attributes')->times(8)->andReturn('id="foo"');
59-
$builder->form->shouldReceive('checkbox')
60-
->once()
61-
->andReturn('<input type="checkbox" id="foo"/>');
6256

6357
$builder->columns(['foo', 'bar' => ['data' => 'foo']])
6458
->addCheckbox(['id' => 'foo'])
@@ -89,9 +83,6 @@ public function test_generate_table_html_with_footer_content()
8983
{
9084
$builder = $this->getHtmlBuilder();
9185
$builder->html->shouldReceive('attributes')->times(8)->andReturn('id="foo"');
92-
$builder->form->shouldReceive('checkbox')
93-
->once()
94-
->andReturn('<input type="checkbox" id="foo"/>');
9586

9687
$builder->columns(['foo', 'bar' => ['data' => 'foo']])
9788
->addCheckbox(['id' => 'foo', 'footer' => 'test'])

tests/helper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ function app($instance)
1212
return new Builder(
1313
m::mock('Illuminate\Contracts\Config\Repository'),
1414
m::mock('Illuminate\Contracts\View\Factory'),
15-
m::mock('Collective\Html\HtmlBuilder'),
16-
m::mock('Collective\Html\FormBuilder')
15+
m::mock('Collective\Html\HtmlBuilder')
1716
);
1817
case 'config':
1918
return new Config;

0 commit comments

Comments
 (0)