@@ -12,13 +12,13 @@ |
||
12 | 12 | $viewVars = $table->buildView(); |
13 | 13 | $jsonVars = []; |
14 | 14 | $jsonVars['recordsTotal'] = $viewVars['unfilteredRowsCount']; |
15 | - if ($viewVars['filteredRowsCount']!==false) { |
|
15 | + if ($viewVars['filteredRowsCount'] !== false) { |
|
16 | 16 | $jsonVars['recordsFiltered'] = $viewVars['filteredRowsCount']; |
17 | 17 | } else { |
18 | 18 | $jsonVars['recordsFiltered'] = $viewVars['unfilteredRowsCount']; |
19 | 19 | } |
20 | 20 | $jsonVars['data'] = array_map( |
21 | - function ($item) { |
|
21 | + function($item) { |
|
22 | 22 | $t = []; |
23 | 23 | foreach ($item as $k => $v) { |
24 | 24 | $t[] = $v; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | * |
139 | 139 | * @param OptionsResolver $resolver |
140 | 140 | */ |
141 | - public function configureOptions(OptionsResolver $resolver){} |
|
141 | + public function configureOptions(OptionsResolver $resolver) {} |
|
142 | 142 | /** |
143 | 143 | * @return array |
144 | 144 | */ |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | { |
179 | 179 | $t = []; |
180 | 180 | foreach ($this->getDataIterator() as $item) { |
181 | - $formatted = $this->formatter->formatRow($item, $this); |
|
181 | + $formatted = $this->formatter->formatRow($item, $this); |
|
182 | 182 | $t[] = $formatted; |
183 | 183 | } |
184 | 184 | |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | */ |
217 | 217 | public function getFilterForm() |
218 | 218 | { |
219 | - if (null===$this->filterForm) { |
|
219 | + if (null === $this->filterForm) { |
|
220 | 220 | $this->filterForm = $this->buildFilterForm( |
221 | 221 | $this->formFactory->createNamedBuilder($this->getTableId().'_filter') |
222 | 222 | ->add('dofilter', 'button') |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | $this->buildColumns($builder); |
281 | 281 | |
282 | 282 | $this->columns = $builder->getColumns(); |
283 | - $this->columnsInitialized = true; |
|
283 | + $this->columnsInitialized = true; |
|
284 | 284 | } |
285 | 285 | /** |
286 | 286 | * Sets the table identifier |
@@ -11,10 +11,10 @@ |
||
11 | 11 | { |
12 | 12 | parent::configureOptions($resolver); |
13 | 13 | $resolver->setRequired('LinkTextField'); |
14 | - $resolver->setDefault('AltTextField', function (Options $options) { |
|
14 | + $resolver->setDefault('AltTextField', function(Options $options) { |
|
15 | 15 | return $options['LinkTextField']; |
16 | 16 | }); |
17 | - $resolver->setDefault('UrlField', function (Options $options) { |
|
17 | + $resolver->setDefault('UrlField', function(Options $options) { |
|
18 | 18 | return $options['LinkTextField']; |
19 | 19 | }); |
20 | 20 | $resolver->setDefault('UrlCallback', function($value, $row) { |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | * @var array |
15 | 15 | */ |
16 | 16 | public static $clientSideColumnOptions = [ |
17 | - 'cellType','className','contentPadding', 'createdCell', 'data', 'defaultContent', 'name', 'orderable', |
|
17 | + 'cellType', 'className', 'contentPadding', 'createdCell', 'data', 'defaultContent', 'name', 'orderable', |
|
18 | 18 | 'orderData', 'orderDataType', 'render', 'searchable', 'title', 'type', 'visible', 'width' |
19 | 19 | ]; |
20 | 20 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | protected $formatValueCallback; |
35 | 35 | |
36 | - public function __construct($title='', $options=[]) |
|
36 | + public function __construct($title = '', $options = []) |
|
37 | 37 | { |
38 | 38 | $this->optionsResolver = new OptionsResolver(); |
39 | 39 | $this->configureOptions($this->optionsResolver); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | { |
93 | 93 | if (is_callable($this->formatValueCallback)) { |
94 | 94 | return call_user_func_array($this->formatValueCallback, [$value, $rowData]); |
95 | - } else{ |
|
95 | + } else { |
|
96 | 96 | return $value; |
97 | 97 | } |
98 | 98 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | /** |
107 | 107 | * @param \Closure $callback |
108 | 108 | */ |
109 | - public function setFormatValueCallback(\Closure $callback=null) |
|
109 | + public function setFormatValueCallback(\Closure $callback = null) |
|
110 | 110 | { |
111 | 111 | $this->formatValueCallback = $callback; |
112 | 112 | return $this; |
@@ -31,7 +31,7 @@ |
||
31 | 31 | $value = $rawValue; |
32 | 32 | } |
33 | 33 | |
34 | - $colVal = $column->formatCell($value, $row);//Column definition |
|
34 | + $colVal = $column->formatCell($value, $row); //Column definition |
|
35 | 35 | $newRow[$colIdentifier] = $colVal; |
36 | 36 | } |
37 | 37 |
@@ -10,7 +10,7 @@ |
||
10 | 10 | { |
11 | 11 | $builder = new ColumnBuilder(); |
12 | 12 | |
13 | - for ($i=0;$i<3;$i++) { |
|
13 | + for ($i = 0; $i<3; $i++) { |
|
14 | 14 | $builder->add("testcolumn".$i, new Column("test column ".$i)); |
15 | 15 | } |
16 | 16 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | public function testFormatCellUsesCallback() |
16 | 16 | { |
17 | 17 | $column = new Column("test"); |
18 | - $column->setFormatValueCallback(function($val, $row){ |
|
18 | + $column->setFormatValueCallback(function($val, $row) { |
|
19 | 19 | return $val.'ok'; |
20 | 20 | }); |
21 | 21 |
@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | trait UsesContainerTrait |
13 | 13 | { |
14 | - protected function compileContainer(ContainerBuilder $container, $loadExt=true) |
|
14 | + protected function compileContainer(ContainerBuilder $container, $loadExt = true) |
|
15 | 15 | { |
16 | 16 | if ($loadExt) { |
17 | 17 | $extension = new CrossKnowledgeDataTableExtension(); |
@@ -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 |