Skip to content

Commit

Permalink
run php-cs-fixer fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kokspflanze committed Apr 16, 2015
1 parent bffe30a commit da614c2
Show file tree
Hide file tree
Showing 25 changed files with 31 additions and 41 deletions.
2 changes: 1 addition & 1 deletion config/daterange.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
],
],
],
]
],
];
2 changes: 1 addition & 1 deletion config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,5 +247,5 @@
'template_path_stack' => [
'ZfcDatagrid' => __DIR__ . '/../view',
],
]
],
];
23 changes: 9 additions & 14 deletions src/ZfcDatagrid/Column/Formatter/GenerateLink.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php


namespace ZfcDatagrid\Column\Formatter;


use Zend\ServiceManager\ServiceManager;
use Zend\ServiceManager\ServiceManagerAwareInterface;
use ZfcDatagrid\Column\AbstractColumn;
Expand Down Expand Up @@ -32,7 +29,7 @@ class GenerateLink extends AbstractFormatter implements ServiceManagerAwareInter
* @param null $key
* @param array $params
*/
public function __construct( ServiceManager $sm, $route, $key = null, $params = array() )
public function __construct(ServiceManager $sm, $route, $key = null, $params = [])
{
$this->setServiceManager($sm);
$this->setRoute($route);
Expand All @@ -44,17 +41,17 @@ public function __construct( ServiceManager $sm, $route, $key = null, $params =
* @param AbstractColumn $columnUniqueId
* @return string
*/
public function getFormattedValue( AbstractColumn $column )
public function getFormattedValue(AbstractColumn $column)
{
$row = $this->getRowData();
$value = $row[$column->getUniqueId()];

$routeKey = !is_null($this->getRouteKey())?
$routeKey = !is_null($this->getRouteKey()) ?
$this->getRouteKey()
:
$column->getUniqueId();

$params = $this->getRouteParams();
$params = $this->getRouteParams();
$params[$routeKey] = $value;

$url = (string) $this->getViewRenderer()->url($this->getRoute(), $params);
Expand All @@ -66,7 +63,7 @@ public function getFormattedValue( AbstractColumn $column )
* Set service manager
* @param ServiceManager $serviceManager
*/
public function setServiceManager( ServiceManager $serviceManager )
public function setServiceManager(ServiceManager $serviceManager)
{
$this->serviceManager = $serviceManager;

Expand Down Expand Up @@ -105,7 +102,7 @@ public function getRoute()
* @param string $route
* @return GenerateLink
*/
public function setRoute( $route )
public function setRoute($route)
{
$this->route = $route;

Expand All @@ -124,7 +121,7 @@ public function getRouteParams()
* @param array $routeParams
* @return GenerateLink
*/
public function setRouteParams( $routeParams )
public function setRouteParams($routeParams)
{
$this->routeParams = $routeParams;

Expand All @@ -143,12 +140,10 @@ public function getRouteKey()
* @param null|string $routeKey
* @return GenerateLink
*/
public function setRouteKey( $routeKey )
public function setRouteKey($routeKey)
{
$this->routeKey = $routeKey;

return $this;
}


}
}
1 change: 1 addition & 0 deletions src/ZfcDatagrid/Column/Style/Color.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* general or based on a value
*
*/

namespace ZfcDatagrid\Column\Style;

class Color extends AbstractColor
Expand Down
10 changes: 5 additions & 5 deletions src/ZfcDatagrid/Column/Type/DateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ public function getTypeName()
}

/**
* Set Daterange Filter enabled true/false
* @param bool $val
*/
* Set Daterange Filter enabled true/false
* @param bool $val
*/
public function setDaterangePickerEnabled($val = true)
{
$this->daterangePickerEnabled = $val;
}

/**
* Check if the Daterange Filter is enabled
*/
* Check if the Daterange Filter is enabled
*/
public function isDaterangePickerEnabled()
{
return $this->daterangePickerEnabled;
Expand Down
1 change: 1 addition & 0 deletions src/ZfcDatagrid/Column/Type/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* Image type
*/

namespace ZfcDatagrid\Column\Type;

use InvalidArgumentException;
Expand Down
2 changes: 1 addition & 1 deletion src/ZfcDatagrid/DataSource/Doctrine2/Filter.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
namespace ZfcDatagrid\DataSource\Doctrine2;

use Doctrine\ORM\QueryBuilder;
use Doctrine\ORM\Query\Expr;
use Doctrine\ORM\QueryBuilder;
use ZfcDatagrid\Column;
use ZfcDatagrid\Filter as DatagridFilter;

Expand Down
1 change: 1 addition & 0 deletions src/ZfcDatagrid/DataSource/Doctrine2/Paginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* or if we use the "safe" variant by Doctrine2
*
*/

namespace ZfcDatagrid\DataSource\Doctrine2;

use Doctrine\ORM\QueryBuilder;
Expand Down
2 changes: 1 addition & 1 deletion src/ZfcDatagrid/DataSource/Doctrine2Collection.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
namespace ZfcDatagrid\DataSource;

use DoctrineModule\Stdlib\Hydrator\DoctrineObject as DoctrineHydrator;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\EntityManager;
use DoctrineModule\Stdlib\Hydrator\DoctrineObject as DoctrineHydrator;
use ZfcDatagrid\DataSource\PhpArray as SourceArray;

class Doctrine2Collection extends AbstractDataSource
Expand Down
4 changes: 2 additions & 2 deletions src/ZfcDatagrid/Datagrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ public function setTitle($title)
{
$this->title = (string) $title;
}

/**
*
* @return string
Expand Down Expand Up @@ -734,7 +734,7 @@ public function getColumnByUniqueId($id)
return $this->columns[$id];
}

return null;
return;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/ZfcDatagrid/PrepareData.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public function prepare()
if ($col->hasFormatter($this->getRendererName()) === true) {
/* @var $formatter \ZfcDatagrid\Column\Formatter\AbstractFormatter */
$formatter = $col->getFormatter($this->getRendererName());
$formatter->setRowData((array)$row);
$formatter->setRowData((array) $row);
$formatter->setRendererName($this->getRendererName());

$row[$col->getUniqueId()] = $formatter->format($col);
Expand Down
1 change: 1 addition & 0 deletions src/ZfcDatagrid/Renderer/AbstractExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Methods which can be used in (all) export renderer
*
*/

namespace ZfcDatagrid\Renderer;

use ZfcDatagrid\Column;
Expand Down
1 change: 1 addition & 0 deletions src/ZfcDatagrid/Renderer/Csv/Renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Render datagrid as CSV
*
*/

namespace ZfcDatagrid\Renderer\Csv;

use Zend\Http\Headers;
Expand Down
1 change: 1 addition & 0 deletions src/ZfcDatagrid/Renderer/PHPExcel/Renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* Output as an excel file
*/

namespace ZfcDatagrid\Renderer\PHPExcel;

use PHPExcel;
Expand Down
1 change: 1 addition & 0 deletions src/ZfcDatagrid/Renderer/TCPDF/Renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* Output as a PDF file
*/

namespace ZfcDatagrid\Renderer\TCPDF;

use TCPDF;
Expand Down
2 changes: 1 addition & 1 deletion src/ZfcDatagrid/Renderer/ZendTable/Renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
use Zend\Console\Request as ConsoleRequest;
use Zend\Text\Table;
use Zend\Text\Table\Table as TextTable;
use ZfcDataGrid\Column\Type;
use ZfcDatagrid\Column;
use ZfcDataGrid\Column\Type;
use ZfcDatagrid\Renderer\AbstractRenderer;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
namespace ZfcDatagridTest\Column\Formatter;

use PHPUnit_Framework_TestCase;
use ZfcDatagrid\Column\Formatter;

/**
* @group Column
Expand Down
4 changes: 0 additions & 4 deletions tests/ZfcDatagridTest/Column/Formatter/GenerateLinkTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?php


namespace ZfcDatagridTest\Column\Formatter;


use Zend\ServiceManager\ServiceManager;
use ZfcDatagrid\Column\Formatter\GenerateLink;

Expand Down Expand Up @@ -46,5 +43,4 @@ public function testGetFormattedValue()

$this->assertEquals('<a href="">bar</a>', $generateLink->getFormattedValue($col));
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

namespace ZfcDatagridTest\DataSource\Doctrine2\Assets\Entity;

use Doctrine\ORM\Mapping as ORM;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

namespace ZfcDatagridTest\DataSource\Doctrine2\Mocks;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

namespace ZfcDatagridTest\DataSource\Doctrine2\Mocks;

use Doctrine\ORM\Proxy\ProxyFactory;

/**
* Special EntityManager mock used for testing purposes.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
namespace ZfcDatagridTest\DataSource;

use Doctrine\Common\Collections\ArrayCollection;
use ZfcDatagridTest\DataSource\Doctrine2\Assets\Entity\Category;
use ZfcDatagrid\DataSource\Doctrine2Collection;
use ZfcDatagrid\Filter;
use ZfcDatagridTest\DataSource\Doctrine2\Assets\Entity\Category;

/**
* @group DataSource
Expand Down
2 changes: 1 addition & 1 deletion tests/ZfcDatagridTest/DataSource/Doctrine2Test.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
namespace ZfcDatagridTest\DataSource;

use ZfcDatagridTest\DataSource\Doctrine2\AbstractDoctrine2Test;
use ZfcDatagrid\DataSource\Doctrine2;
use ZfcDatagrid\Filter;
use ZfcDatagridTest\DataSource\Doctrine2\AbstractDoctrine2Test;

/**
* @group DataSource
Expand Down
2 changes: 0 additions & 2 deletions tests/ZfcDatagridTest/Renderer/AbstractRendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@

use PHPUnit_Framework_TestCase;
use ReflectionClass;
use Zend\Paginator;
use ZfcDatagrid\Column\Style;
use ZfcDatagrid\Filter;

/**
* @group Renderer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
namespace ZfcDatagridTest\Renderer\JqGrid\View\Helper;

use PHPUnit_Framework_TestCase;
use ZfcDatagrid\Column;
use ZfcDatagrid\Column\Style;
use ZfcDatagrid\Filter;
use ZfcDatagrid\Renderer\JqGrid\View\Helper;
Expand Down

0 comments on commit da614c2

Please sign in to comment.