@@ -19,19 +19,19 @@ |
||
| 19 | 19 | { |
| 20 | 20 | $tableMock = $this->getDataTableMock(); |
| 21 | 21 | $registryMock = $this->getMockBuilder('CrossKnowledge\DataTableBundle\DataTable\DataTableRegistry') |
| 22 | - ->disableOriginalConstructor() |
|
| 23 | - ->getMock(); |
|
| 22 | + ->disableOriginalConstructor() |
|
| 23 | + ->getMock(); |
|
| 24 | 24 | |
| 25 | 25 | $registryMock->expects($this->once()) |
| 26 | - ->method('retrieveByTableId') |
|
| 27 | - ->will($this->returnValue($tableMock)); |
|
| 26 | + ->method('retrieveByTableId') |
|
| 27 | + ->will($this->returnValue($tableMock)); |
|
| 28 | 28 | |
| 29 | 29 | $rendererMock = $this->getMockBuilder('CrossKnowledge\DataTableBundle\DataTable\Renderer\JsonRenderer') |
| 30 | - ->getMock(); |
|
| 30 | + ->getMock(); |
|
| 31 | 31 | |
| 32 | 32 | $rendererMock->expects($this->once()) |
| 33 | - ->method('renderJsonResponse') |
|
| 34 | - ->with($tableMock); |
|
| 33 | + ->method('renderJsonResponse') |
|
| 34 | + ->with($tableMock); |
|
| 35 | 35 | |
| 36 | 36 | $request = new Request([], [], ['tableid' => 'testtable_id']); |
| 37 | 37 | |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | //From https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Tests/bootstrap.php |
| 4 | -if (!($loader = @include __DIR__ . '/../vendor/autoload.php')) { |
|
| 4 | +if (!($loader = @include __DIR__.'/../vendor/autoload.php')) { |
|
| 5 | 5 | echo <<<EOT |
| 6 | 6 | You need to install the project dependencies using Composer: |
| 7 | 7 | $ wget http://getcomposer.org/composer.phar |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | protected function getFunctionByName(\Twig_Extension $extension, $name) |
| 17 | 17 | { |
| 18 | 18 | foreach ($extension->getFunctions() as $function) { |
| 19 | - if ($function->getName()==$name) { |
|
| 19 | + if ($function->getName() == $name) { |
|
| 20 | 20 | return $function; |
| 21 | 21 | } |
| 22 | 22 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | $value = $rawValue; |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - $colVal = $column->formatCell($value, $row, $context);//Column definition |
|
| 34 | + $colVal = $column->formatCell($value, $row, $context); //Column definition |
|
| 35 | 35 | $newRow[$colIdentifier] = $colVal; |
| 36 | 36 | } |
| 37 | 37 | |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | abstract class AbstractTable |
| 19 | 19 | { |
| 20 | - const VIEW_CONTEXT = 'view'; |
|
| 20 | + const VIEW_CONTEXT = 'view'; |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * @var Router |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | * |
| 141 | 141 | * @param OptionsResolver $resolver |
| 142 | 142 | */ |
| 143 | - public function configureOptions(OptionsResolver $resolver){} |
|
| 143 | + public function configureOptions(OptionsResolver $resolver) {} |
|
| 144 | 144 | /** |
| 145 | 145 | * @return array |
| 146 | 146 | */ |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | { |
| 181 | 181 | $t = []; |
| 182 | 182 | foreach ($this->getDataIterator() as $item) { |
| 183 | - $formatted = $this->formatter->formatRow($item, $this, $context); |
|
| 183 | + $formatted = $this->formatter->formatRow($item, $this, $context); |
|
| 184 | 184 | $t[] = $formatted; |
| 185 | 185 | } |
| 186 | 186 | |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | */ |
| 220 | 220 | public function getFilterForm() |
| 221 | 221 | { |
| 222 | - if (null===$this->filterForm) { |
|
| 222 | + if (null === $this->filterForm) { |
|
| 223 | 223 | $this->filterForm = $this->buildFilterForm( |
| 224 | 224 | $this->formFactory->createNamedBuilder($this->getTableId().'_filter') |
| 225 | 225 | ->add('dofilter', 'button') |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | */ |
| 272 | 272 | public function getColumns($context = self::VIEW_CONTEXT) |
| 273 | 273 | { |
| 274 | - if(!array_key_exists($context, $this->columns)) { |
|
| 274 | + if (!array_key_exists($context, $this->columns)) { |
|
| 275 | 275 | $this->initColumnsDefinitions($context); |
| 276 | 276 | } |
| 277 | 277 | return $this->columns[$context]; |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | $this->buildColumns($builder, $context); |
| 287 | 287 | |
| 288 | 288 | $this->columns[$context] = $builder->getColumns(); |
| 289 | - $this->columnsInitialized[$context] = true; |
|
| 289 | + $this->columnsInitialized[$context] = true; |
|
| 290 | 290 | } |
| 291 | 291 | /** |
| 292 | 292 | * Sets the table identifier |
@@ -12,9 +12,9 @@ |
||
| 12 | 12 | $jsonVars = []; |
| 13 | 13 | $jsonVars['recordsTotal'] = $table->getUnfilteredCount(); |
| 14 | 14 | $filterCount = $table->getFilteredCount(); |
| 15 | - $jsonVars['recordsFiltered'] = $filterCount!==false ? $filterCount : $jsonVars['recordsTotal']; |
|
| 15 | + $jsonVars['recordsFiltered'] = $filterCount !== false ? $filterCount : $jsonVars['recordsTotal']; |
|
| 16 | 16 | $jsonVars['data'] = array_map( |
| 17 | - function ($item) { |
|
| 17 | + function($item) { |
|
| 18 | 18 | $t = []; |
| 19 | 19 | foreach ($item as $k => $v) { |
| 20 | 20 | $t[] = $v; |