Skip to content
This repository has been archived by the owner on Jan 16, 2018. It is now read-only.

Commit

Permalink
style #40 Applied fixes from StyleCI (sstok)
Browse files Browse the repository at this point in the history
This PR was merged into the master branch.

Discussion
----------

This pull request applies code style fixes from an analysis carried out by [StyleCI](https://styleci.io).

---

For more information, click [here](https://styleci.io/analyses/zOM54J).

Commits
-------

513f4b7 Applied fixes from StyleCI
  • Loading branch information
sstok committed Feb 1, 2016
2 parents b1c3f49 + 513f4b7 commit 8dfc788
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 22 deletions.
4 changes: 0 additions & 4 deletions src/Column/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@

namespace Rollerworks\Component\Datagrid\Column;

use Rollerworks\Component\Datagrid\DatagridEvents;
use Rollerworks\Component\Datagrid\DatagridInterface;
use Rollerworks\Component\Datagrid\DatagridViewInterface;
use Rollerworks\Component\Datagrid\DataTransformerInterface;
use Rollerworks\Component\Datagrid\Exception\BadMethodCallException;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

/**
* @author Sebastiaan Stok <s.stok@rollerscapes.net>
Expand Down
1 change: 0 additions & 1 deletion src/Column/ColumnInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Rollerworks\Component\Datagrid\Column;

use Rollerworks\Component\Datagrid\DatagridInterface;
use Rollerworks\Component\Datagrid\DatagridViewInterface;
use Rollerworks\Component\Datagrid\DataTransformerInterface;

Expand Down
6 changes: 2 additions & 4 deletions src/Column/ResolvedColumnType.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@

namespace Rollerworks\Component\Datagrid\Column;

use Rollerworks\Component\Datagrid\DatagridInterface;
use Rollerworks\Component\Datagrid\DatagridViewInterface;
use Rollerworks\Component\Datagrid\Exception\InvalidArgumentException;
use Rollerworks\Component\Datagrid\Exception\UnexpectedTypeException;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
Expand Down Expand Up @@ -129,8 +127,8 @@ public function buildType(ColumnInterface $config, array $options)
/**
* Returns a new ColumnInterface instance.
*
* @param string $name
* @param array $options
* @param string $name
* @param array $options
*
* @return ColumnInterface
*/
Expand Down
1 change: 0 additions & 1 deletion src/Column/ResolvedColumnTypeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Rollerworks\Component\Datagrid\Column;

use Rollerworks\Component\Datagrid\DatagridInterface;
use Rollerworks\Component\Datagrid\DatagridViewInterface;

/**
Expand Down
1 change: 0 additions & 1 deletion src/DatagridFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
*/
class DatagridFactory implements DatagridFactoryInterface
{

/**
* @var ColumnTypeRegistryInterface
*/
Expand Down
2 changes: 1 addition & 1 deletion src/DatagridFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function createDatagrid($name);
/**
* Create a new DatagridBuilderInterface instance.
*
* @param string $name
* @param string $name
*
* @return DatagridBuilderInterface
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Extension/Core/ColumnType/TextType.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
use Rollerworks\Component\Datagrid\Column\AbstractColumnType;
use Rollerworks\Component\Datagrid\Column\ColumnInterface;
use Rollerworks\Component\Datagrid\Extension\Core\DataTransformer\EmptyValueTransformer;
use Rollerworks\Component\Datagrid\Extension\Core\DataTransformer\TrimTransformer;
use Rollerworks\Component\Datagrid\Extension\Core\DataTransformer\ValueFormatTransformer;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class TextType extends AbstractColumnType
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public function transform($value)

$val = $emptyValue;
}

}

return $value;
Expand Down
2 changes: 0 additions & 2 deletions src/Extension/Core/DataTransformer/ValueFormatTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

use Rollerworks\Component\Datagrid\DataTransformerInterface;
use Rollerworks\Component\Datagrid\Exception\TransformationFailedException;
use Rollerworks\Component\Datagrid\Exception\UnexpectedTypeException;

/**
* @author Sebastiaan Stok <s.stok@rollerscapes.net>
Expand Down Expand Up @@ -60,7 +59,6 @@ public function transform($value)
return (string) $value;
}


if (!is_array($value)) {
$format = $this->format;

Expand Down
1 change: 0 additions & 1 deletion src/Test/DatagridIntegrationTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Rollerworks\Component\Datagrid\Column\ColumnTypeRegistry;
use Rollerworks\Component\Datagrid\Column\ResolvedColumnTypeFactory;
use Rollerworks\Component\Datagrid\DatagridFactory;
use Rollerworks\Component\Datagrid\DataMapper\PropertyAccessorMapper;
use Rollerworks\Component\Datagrid\Extension\Core\CoreExtension;

abstract class DatagridIntegrationTestCase extends \PHPUnit_Framework_TestCase
Expand Down
1 change: 0 additions & 1 deletion tests/DatagridBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Rollerworks\Component\Datagrid\Tests;

use Prophecy\Argument;
use Rollerworks\Component\Datagrid\Column\ColumnInterface;
use Rollerworks\Component\Datagrid\DatagridBuilder;
use Rollerworks\Component\Datagrid\DatagridFactoryInterface;
Expand Down
2 changes: 1 addition & 1 deletion tests/DatagridPerformanceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function testGenerateViewWith100RowsAnd10Columns()
]
)
);
$datagrid->addColumn($this->factory->createColumn('group', TextType::class, ['label' => 'group', ]));
$datagrid->addColumn($this->factory->createColumn('group', TextType::class, ['label' => 'group']));

$datagrid->addColumn(
$this->factory->createColumn(
Expand Down
4 changes: 2 additions & 2 deletions tests/Fixtures/EntityMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function hasPrivateCollection()

public function setReady($ready)
{
$this->ready = (boolean) $ready;
$this->ready = (bool) $ready;
}

public function isReady()
Expand All @@ -102,7 +102,7 @@ public function isReady()

public function setProtectedReady($ready)
{
$this->protected_ready = (boolean) $ready;
$this->protected_ready = (bool) $ready;
}

protected function isProtectedReady()
Expand Down

0 comments on commit 8dfc788

Please sign in to comment.