Skip to content

Commit b09de60

Browse files
author
plfort
committed
Remove useless comment/use statements
Format code
1 parent 8e3c6e9 commit b09de60

File tree

2 files changed

+20
-42
lines changed

2 files changed

+20
-42
lines changed

Tests/Twig/DataGridExtensionFunctionalTest.php

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,18 @@
55
use APY\DataGridBundle\Grid\Column\ArrayColumn;
66
use APY\DataGridBundle\Grid\Column\BlankColumn;
77
use APY\DataGridBundle\Grid\Column\BooleanColumn;
8-
use APY\DataGridBundle\Grid\Column\Column;
98
use APY\DataGridBundle\Grid\Column\DateColumn;
109
use APY\DataGridBundle\Grid\Column\DateTimeColumn;
1110
use APY\DataGridBundle\Grid\Column\JoinColumn;
1211
use APY\DataGridBundle\Grid\Column\NumberColumn;
1312
use APY\DataGridBundle\Grid\Column\RankColumn;
14-
use APY\DataGridBundle\Grid\Column\TextColumn;
1513
use APY\DataGridBundle\Grid\Column\TimeColumn;
1614
use APY\DataGridBundle\Grid\Grid;
1715
use APY\DataGridBundle\Grid\Row;
1816
use APY\DataGridBundle\Twig\DataGridExtension;
19-
use Faker\Provider\ar_JO\Text;
2017
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
21-
use Symfony\Component\Routing\RouterInterface;
2218

2319
/**
24-
* Class DataGridExtensionFunctionalTest.
25-
*
26-
*
2720
* @author Pierre-Louis FORT
2821
*/
2922
class DataGridExtensionFunctionalTest extends KernelTestCase
@@ -34,7 +27,7 @@ class DataGridExtensionFunctionalTest extends KernelTestCase
3427
private $extension;
3528

3629
/**
37-
* @var
30+
* @var \Twig_Environment
3831
*/
3932
private $twig;
4033

@@ -61,6 +54,7 @@ protected function getMockGridAndInit($id, $hash, $theme = null)
6154
->method('getId')
6255
->willReturn($id);
6356
$this->extension->initGrid($grid, $theme);
57+
6458
return $grid;
6559
}
6660

@@ -162,30 +156,30 @@ public function testRenderCellArrayColumnCustomCell($gridId, $colId, $theme, $ex
162156
);
163157
}
164158

165-
/**
166-
*/
167159
public function testRenderCellBlankColumn()
168160
{
169161
$grid = $this->getMockGridAndInit('', 'GRID_HASH');
170162

171-
$column = new BlankColumn([
172-
'id'=>'blank_col'
173-
]);
163+
$column = new BlankColumn(
164+
[
165+
'id' => 'blank_col'
166+
]
167+
);
174168
$this->assertEquals(
175169
'',
176170
$this->extension->getGridCell($this->twig, $column, new Row(), $grid)
177171
);
178172
}
179173

180-
/**
181-
*/
182174
public function testRenderCellBooleanColumn()
183175
{
184176
$grid = $this->getMockGridAndInit('', 'GRID_HASH');
185177

186-
$column = new BooleanColumn([
187-
'id'=>'bool_col'
188-
]);
178+
$column = new BooleanColumn(
179+
[
180+
'id' => 'bool_col'
181+
]
182+
);
189183
$row = new Row();
190184
$row->setField('bool_col', true);
191185
$this->assertEquals(
@@ -200,16 +194,13 @@ public function testRenderCellBooleanColumn()
200194
);
201195
}
202196

203-
204-
/**
205-
*/
206197
public function testRenderCellDateColumnNoFormat()
207198
{
208199
$grid = $this->getMockGridAndInit('', 'GRID_HASH');
209200

210201
$column = new DateColumn(
211202
[
212-
'id'=>'date_col',
203+
'id' => 'date_col',
213204
'timezone' => "Europe/Paris"
214205
]
215206
);
@@ -355,11 +346,6 @@ public function numberColumnDecimalProvider()
355346

356347
/**
357348
* @dataProvider numberColumnDecimalProvider
358-
* @param $locale
359-
* @param $precision
360-
* @param $grouping
361-
* @param $number
362-
* @param $expected
363349
*/
364350
public function testRenderCellNumberColumnDecimal($locale, $roundingMode, $precision, $grouping, $number, $expected)
365351
{
@@ -592,11 +578,13 @@ public function testRenderCellJoinColumn()
592578
{
593579
$grid = $this->getMockGridAndInit('', 'GRID_HASH');
594580

595-
$column = new JoinColumn([
596-
'id' => 'join_col',
597-
'columns'=>['text_col1','text_col2'],
598-
'separator'=>'-'
599-
]);
581+
$column = new JoinColumn(
582+
[
583+
'id' => 'join_col',
584+
'columns' => ['text_col1', 'text_col2'],
585+
'separator' => '-'
586+
]
587+
);
600588

601589
$row = new Row();
602590
$row->setField('text_col1', 'text_col1_value');

Tests/app/CompilerPass.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
11
<?php
2-
/**
3-
* Created by PhpStorm.
4-
* User: pilou
5-
* Date: 10/11/17
6-
* Time: 23:19
7-
*/
8-
92
namespace APY\DataGridBundle\Tests\app;
103

11-
124
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
135
use Symfony\Component\DependencyInjection\ContainerBuilder;
146

157
class CompilerPass implements CompilerPassInterface
168
{
179

1810
/**
19-
* You can modify the container here before it is dumped to PHP code.
20-
*
2111
* @param ContainerBuilder $container
2212
*/
2313
public function process(ContainerBuilder $container)

0 commit comments

Comments
 (0)