diff --git a/src/ZfcDatagrid/Column/Formatter/HtmlTag.php b/src/ZfcDatagrid/Column/Formatter/HtmlTag.php
index 20f75648..b9aba106 100644
--- a/src/ZfcDatagrid/Column/Formatter/HtmlTag.php
+++ b/src/ZfcDatagrid/Column/Formatter/HtmlTag.php
@@ -149,7 +149,7 @@ public function getRowIdPlaceholder()
}
/**
- * @param AbstractColumn $col
+ * @param AbstractColumn $col
* @return string
*/
public function getFormattedValue(AbstractColumn $col)
diff --git a/src/ZfcDatagrid/Column/Style/Align.php b/src/ZfcDatagrid/Column/Style/Align.php
index e8082a33..9fa6254c 100644
--- a/src/ZfcDatagrid/Column/Style/Align.php
+++ b/src/ZfcDatagrid/Column/Style/Align.php
@@ -8,36 +8,36 @@ class Align extends AbstractStyle
* @var string
*/
public static $LEFT = 'left';
-
+
/**
*
* @var string
*/
public static $RIGHT = 'right';
-
+
/**
*
* @var string
*/
public static $CENTER = 'center';
-
+
/**
*
* @var string
*/
- public static $JUSTIFY= 'justify';
-
+ public static $JUSTIFY = 'justify';
+
/**
*
* @var string
*/
protected $alignment;
-
+
public function __construct($alignment = self::LEFT)
{
$this->setAlignment($alignment);
}
-
+
/**
*
* @param string $alignment
diff --git a/src/ZfcDatagrid/Column/Style/Color.php b/src/ZfcDatagrid/Column/Style/Color.php
index 9a823752..76802484 100644
--- a/src/ZfcDatagrid/Column/Style/Color.php
+++ b/src/ZfcDatagrid/Column/Style/Color.php
@@ -4,7 +4,6 @@
* general or based on a value
*
*/
-
namespace ZfcDatagrid\Column\Style;
class Color extends AbstractColor
diff --git a/src/ZfcDatagrid/Column/Type/Image.php b/src/ZfcDatagrid/Column/Type/Image.php
index 24b883a4..eb27a1ac 100644
--- a/src/ZfcDatagrid/Column/Type/Image.php
+++ b/src/ZfcDatagrid/Column/Type/Image.php
@@ -2,7 +2,6 @@
/**
* Image type
*/
-
namespace ZfcDatagrid\Column\Type;
use InvalidArgumentException;
diff --git a/src/ZfcDatagrid/DataSource/Doctrine2/Paginator.php b/src/ZfcDatagrid/DataSource/Doctrine2/Paginator.php
index 50fb3337..c8e57035 100644
--- a/src/ZfcDatagrid/DataSource/Doctrine2/Paginator.php
+++ b/src/ZfcDatagrid/DataSource/Doctrine2/Paginator.php
@@ -4,7 +4,6 @@
* or if we use the "safe" variant by Doctrine2
*
*/
-
namespace ZfcDatagrid\DataSource\Doctrine2;
use Doctrine\ORM\QueryBuilder;
diff --git a/src/ZfcDatagrid/Renderer/AbstractExport.php b/src/ZfcDatagrid/Renderer/AbstractExport.php
index 08db9a23..a377ec25 100644
--- a/src/ZfcDatagrid/Renderer/AbstractExport.php
+++ b/src/ZfcDatagrid/Renderer/AbstractExport.php
@@ -3,7 +3,6 @@
* Methods which can be used in (all) export renderer
*
*/
-
namespace ZfcDatagrid\Renderer;
use ZfcDatagrid\Column;
diff --git a/src/ZfcDatagrid/Renderer/BootstrapTable/View/Helper/TableRow.php b/src/ZfcDatagrid/Renderer/BootstrapTable/View/Helper/TableRow.php
index fb0a829c..a593073d 100644
--- a/src/ZfcDatagrid/Renderer/BootstrapTable/View/Helper/TableRow.php
+++ b/src/ZfcDatagrid/Renderer/BootstrapTable/View/Helper/TableRow.php
@@ -146,10 +146,10 @@ public function __invoke($row, array $cols, AbstractAction $rowClickAction = nul
$cssStyles[] = 'background-color: #' . $style->getRgbHexString();
break;
case 'ZfcDatagrid\Column\Style\Align':
- $cssStyles[] = 'text-align: '.$style->getAlignment();
+ $cssStyles[] = 'text-align: ' . $style->getAlignment();
break;
case 'ZfcDatagrid\Column\Style\Strikethrough':
- $value = ''.$value.'';
+ $value = '' . $value . '';
break;
default:
throw new \InvalidArgumentException('Not defined style: "' . get_class($style) . '"');
diff --git a/src/ZfcDatagrid/Renderer/Csv/Renderer.php b/src/ZfcDatagrid/Renderer/Csv/Renderer.php
index 0335b25e..a0b51eee 100644
--- a/src/ZfcDatagrid/Renderer/Csv/Renderer.php
+++ b/src/ZfcDatagrid/Renderer/Csv/Renderer.php
@@ -3,7 +3,6 @@
* Render datagrid as CSV
*
*/
-
namespace ZfcDatagrid\Renderer\Csv;
use Zend\Http\Headers;
diff --git a/src/ZfcDatagrid/Renderer/JqGrid/View/Helper/Columns.php b/src/ZfcDatagrid/Renderer/JqGrid/View/Helper/Columns.php
index 65369c20..279e66b4 100644
--- a/src/ZfcDatagrid/Renderer/JqGrid/View/Helper/Columns.php
+++ b/src/ZfcDatagrid/Renderer/JqGrid/View/Helper/Columns.php
@@ -123,13 +123,12 @@ public function __invoke(array $columns)
if ($column->hasFilterSelectOptions() === true) {
$options['stype'] = 'select';
$searchoptions['value'] = $column->getFilterSelectOptions();
-
+
if ($column->hasFilterDefaultValue() === true) {
$searchoptions['defaultValue'] = $column->getFilterDefaultValue();
} else {
$searchoptions['defaultValue'] = '';
}
-
} elseif ($column->hasFilterDefaultValue() === true) {
$filter = new \ZfcDatagrid\Filter();
$filter->setFromColumn($column, $column->getFilterDefaultValue());
@@ -279,9 +278,9 @@ private function getStyles(Column\AbstractColumn $col)
// do NOTHING! this is done by loadComplete event...
// At this stage jqgrid haven't created the columns...
break;
-
+
case 'ZfcDatagrid\Column\Style\Align':
- $styleString = 'cellvalue = \'\' + cellvalue + \'\';';
+ $styleString = 'cellvalue = \'\' + cellvalue + \'\';';
break;
default:
diff --git a/src/ZfcDatagrid/Renderer/PHPExcel/Renderer.php b/src/ZfcDatagrid/Renderer/PHPExcel/Renderer.php
index c67574fd..201e0453 100644
--- a/src/ZfcDatagrid/Renderer/PHPExcel/Renderer.php
+++ b/src/ZfcDatagrid/Renderer/PHPExcel/Renderer.php
@@ -2,17 +2,16 @@
/**
* Output as an excel file
*/
-
namespace ZfcDatagrid\Renderer\PHPExcel;
use PHPExcel;
use PHPExcel_Cell;
use PHPExcel_Cell_DataType;
+use PHPExcel_Style_Alignment;
use PHPExcel_Style_Border;
use PHPExcel_Style_Color;
use PHPExcel_Style_Fill;
use PHPExcel_Worksheet_PageSetup;
-use PHPExcel_Style_Alignment;
use Zend\Http\Headers;
use Zend\Http\Response\Stream as ResponseStream;
use ZfcDatagrid\Renderer\AbstractExport;
@@ -123,7 +122,7 @@ public function execute()
],
]);
break;
-
+
case 'ZfcDatagrid\Column\Style\Align':
switch ($style->getAlignment()) {
case \ZfcDatagrid\Column\Style\Align::$RIGHT:
@@ -142,9 +141,9 @@ public function execute()
//throw new \Exception('Not defined yet: "'.get_class($style->getAlignment()).'"');
break;
}
-
+
break;
-
+
case 'ZfcDatagrid\Column\Style\Strikethrough':
$columnStyle->getFont()->setStrikethrough(true);
break;
diff --git a/src/ZfcDatagrid/Renderer/TCPDF/Renderer.php b/src/ZfcDatagrid/Renderer/TCPDF/Renderer.php
index ee1fe983..900cab97 100644
--- a/src/ZfcDatagrid/Renderer/TCPDF/Renderer.php
+++ b/src/ZfcDatagrid/Renderer/TCPDF/Renderer.php
@@ -2,7 +2,6 @@
/**
* Output as a PDF file
*/
-
namespace ZfcDatagrid\Renderer\TCPDF;
use TCPDF;
@@ -26,7 +25,7 @@ class Renderer extends AbstractExport
* @var TCPDF
*/
protected $pdf;
-
+
/**
*
* @var Alignment
@@ -331,43 +330,43 @@ protected function printTableRow(array $row, $rowHeight)
if (is_array($text)) {
$text = implode(PHP_EOL, $text);
}
-
+
/*
* Styles
*/
$this->setFontData();
- $isHtml = false;
+ $isHtml = false;
$backgroundColor = false;
-
+
$styles = array_merge($this->getRowStyles(), $col->getStyles());
foreach ($styles as $style) {
/* @var $style \ZfcDatagrid\Column\Style\AbstractStyle */
if ($style->isApply($row) === true) {
switch (get_class($style)) {
-
+
case 'ZfcDatagrid\Column\Style\Bold':
$this->setBold();
break;
-
+
case 'ZfcDatagrid\Column\Style\Italic':
$this->setItalic();
break;
-
+
case 'ZfcDatagrid\Column\Style\Color':
$this->setColor($style->getRgbArray());
break;
-
+
case 'ZfcDatagrid\Column\Style\BackgroundColor':
$this->setBackgroundColor($style->getRgbArray());
$backgroundColor = true;
break;
-
+
case 'ZfcDatagrid\Column\Style\Strikethrough':
- $text = '' . $text . '';
+ $text = '' . $text . '';
$isHtml = true;
break;
-
+
case 'ZfcDatagrid\Column\Style\Align':
switch ($style->getAlignment()) {
case \ZfcDatagrid\Column\Style\Align::$RIGHT:
@@ -387,14 +386,14 @@ protected function printTableRow(array $row, $rowHeight)
break;
}
break;
-
+
default:
throw new \Exception('Not defined yet: "' . get_class($style) . '"');
break;
}
}
}
-
+
// MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0, $valign='T', $fitcell=false)
$pdf->MultiCell($col->getWidth(), $rowHeight, $text, 1, $this->getTextAlignment(), $backgroundColor, 1, $x, $y, true, 0, $isHtml);
}
@@ -494,7 +493,7 @@ protected function setBackgroundColor(array $rgb)
$pdf = $this->getPdf();
$pdf->SetFillColor($rgb['red'], $rgb['green'], $rgb['blue']);
}
-
+
/**
*
* @param string $alignment
@@ -503,7 +502,7 @@ public function setTextAlignment($alignment)
{
$this->alignment = $alignment;
}
-
+
/**
*
* @return string
diff --git a/tests/ZfcDatagridTest/Column/Style/AbstractStyleTest.php b/tests/ZfcDatagridTest/Column/Style/AbstractStyleTest.php
index 81db2106..a26e02e2 100644
--- a/tests/ZfcDatagridTest/Column/Style/AbstractStyleTest.php
+++ b/tests/ZfcDatagridTest/Column/Style/AbstractStyleTest.php
@@ -201,14 +201,14 @@ public function testStyleByColumn()
// Test lower value
$row = [
- $this->column->getUniqueId() => 5,
+ $this->column->getUniqueId() => 5,
$columnCompare->getUniqueId() => 15,
];
$this->assertFalse($style->isApply($row));
// Test greater value
$row = [
- $this->column->getUniqueId() => 15,
+ $this->column->getUniqueId() => 15,
$columnCompare->getUniqueId() => 10,
];
$this->assertTrue($style->isApply($row));
diff --git a/tests/ZfcDatagridTest/DataSource/Doctrine2/Mocks/EntityManagerMock.php b/tests/ZfcDatagridTest/DataSource/Doctrine2/Mocks/EntityManagerMock.php
index f0108c8b..deecde20 100644
--- a/tests/ZfcDatagridTest/DataSource/Doctrine2/Mocks/EntityManagerMock.php
+++ b/tests/ZfcDatagridTest/DataSource/Doctrine2/Mocks/EntityManagerMock.php
@@ -18,7 +18,6 @@
* and is licensed under the LGPL. For more information, see
* .
*/
-
namespace ZfcDatagridTest\DataSource\Doctrine2\Mocks;
/**