Skip to content

Commit

Permalink
Merge pull request #971 from ousamabenyounes/master
Browse files Browse the repository at this point in the history
[Insight] Files should not be executable & Files should be encoded in UTF-8
  • Loading branch information
DonCallisto authored Aug 21, 2017
2 parents 5fe7470 + f9d33a5 commit 1684a94
Show file tree
Hide file tree
Showing 31 changed files with 26 additions and 26 deletions.
Empty file modified DependencyInjection/Compiler/GridPass.php
100755 → 100644
Empty file.
Empty file modified Grid/AbstractType.php
100755 → 100644
Empty file.
Empty file modified Grid/Column/BooleanColumn.php
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion Grid/Column/Column.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public function isVisible($isExported = false)
{
$visible = $isExported && $this->export !== null ? $this->export : $this->visible;

if ($visible && $this->authorizationChecker !== null && $this->getRole() != null) {
if ($visible && $this->authorizationChecker !== null && $this->getRole() !== null) {
return $this->authorizationChecker->isGranted($this->getRole());
}

Expand Down
Empty file modified Grid/Exception/ColumnAlreadyExistsException.php
100755 → 100644
Empty file.
Empty file modified Grid/Exception/ColumnNotFoundException.php
100755 → 100644
Empty file.
Empty file modified Grid/Exception/InvalidArgumentException.php
100755 → 100644
Empty file.
Empty file modified Grid/Exception/TypeAlreadyExistsException.php
100755 → 100644
Empty file.
Empty file modified Grid/Exception/TypeNotFoundException.php
100755 → 100644
Empty file.
Empty file modified Grid/Exception/UnexpectedTypeException.php
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion Grid/Export/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ protected function getTemplatesFromString($theme)
$templates = [];

$template = $this->twig->loadTemplate($theme);
while ($template != null) {
while ($template !== null) {
$templates[] = $template;
$template = $template->getParent([]);
}
Expand Down
34 changes: 17 additions & 17 deletions Grid/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,12 @@ public function initialize()
}

// Route
if (null != $config->getRoute()) {
if (null !== $config->getRoute()) {
$this->setRouteUrl($this->router->generate($config->getRoute(), $routeParameters));
}

// Route
if (null != $config->getRoute()) {
if (null !== $config->getRoute()) {
$this->setRouteUrl($this->router->generate($config->getRoute(), $routeParameters));
}

Expand All @@ -371,14 +371,14 @@ public function initialize()
// Source
$source = $config->getSource();

if (null != $source) {
if (null !== $source) {
$this->source = $source;

$source->initialise($this->container);

if ($source instanceof Entity) {
$groupBy = $config->getGroupBy();
if (null != $groupBy) {
if (null !== $groupBy) {
if (!is_array($groupBy)) {
$groupBy = [$groupBy];
}
Expand All @@ -390,11 +390,11 @@ public function initialize()
}

// Order
if (null != $config->getSortBy()) {
if (null !== $config->getSortBy()) {
$this->setDefaultOrder($config->getSortBy(), $config->getOrder());
}

if (null != $config->getMaxPerPage()) {
if (null !== $config->getMaxPerPage()) {
$this->setLimits($config->getMaxPerPage());
}

Expand Down Expand Up @@ -609,7 +609,7 @@ protected function processMassActions($actionId)
if (array_key_exists($actionId, $this->massActions)) {
$action = $this->massActions[$actionId];
$actionAllKeys = (boolean) $this->getFromRequest(self::REQUEST_QUERY_MASS_ACTION_ALL_KEYS_SELECTED);
$actionKeys = $actionAllKeys == false ? array_keys((array) $this->getFromRequest(MassActionColumn::ID)) : [];
$actionKeys = $actionAllKeys === false ? array_keys((array) $this->getFromRequest(MassActionColumn::ID)) : [];

$this->processSessionData();
if ($actionAllKeys) {
Expand All @@ -619,7 +619,7 @@ protected function processMassActions($actionId)

$this->prepare();

if ($actionAllKeys == true) {
if ($actionAllKeys === true) {
foreach ($this->rows as $row) {
$actionKeys[] = $row->getPrimaryFieldValue();
}
Expand Down Expand Up @@ -697,7 +697,7 @@ protected function processExports($exportId)
*/
protected function processTweaks($tweakId)
{
if ($tweakId != null) {
if ($tweakId !== null) {
if (array_key_exists($tweakId, $this->tweaks)) {
$tweak = $this->tweaks[$tweakId];
$saveAsActive = false;
Expand Down Expand Up @@ -804,12 +804,12 @@ protected function processRequestFilters()

//if no item is selectd in multi select filter : simulate empty first choice
if ($column->getFilterType() == 'select'
&& $column->getSelectMulti() == true
&& $data == null
&& $this->getFromRequest(self::REQUEST_QUERY_PAGE) == null
&& $this->getFromRequest(self::REQUEST_QUERY_ORDER) == null
&& $this->getFromRequest(self::REQUEST_QUERY_LIMIT) == null
&& ($this->getFromRequest(self::REQUEST_QUERY_MASS_ACTION) == null || $this->getFromRequest(self::REQUEST_QUERY_MASS_ACTION) == '-1')) {
&& $column->getSelectMulti() === true
&& $data === null
&& $this->getFromRequest(self::REQUEST_QUERY_PAGE) === null
&& $this->getFromRequest(self::REQUEST_QUERY_ORDER) === null
&& $this->getFromRequest(self::REQUEST_QUERY_LIMIT) === null
&& ($this->getFromRequest(self::REQUEST_QUERY_MASS_ACTION) === null || $this->getFromRequest(self::REQUEST_QUERY_MASS_ACTION) == '-1')) {
$data = ['from' => ''];
}

Expand Down Expand Up @@ -1836,7 +1836,7 @@ public function isFiltered()
*/
public function isTitleSectionVisible()
{
if ($this->showTitles == true) {
if ($this->showTitles === true) {
foreach ($this->columns as $column) {
if ($column->getTitle() != '') {
return true;
Expand All @@ -1852,7 +1852,7 @@ public function isTitleSectionVisible()
*/
public function isFilterSectionVisible()
{
if ($this->showFilters == true) {
if ($this->showFilters === true) {
foreach ($this->columns as $column) {
if ($column->isFilterable() && $column->getType() != 'massaction' && $column->getType() != 'actions') {
return true;
Expand Down
Empty file modified Grid/GridBuilder.php
100755 → 100644
Empty file.
Empty file modified Grid/GridBuilderInterface.php
100755 → 100644
Empty file.
Empty file modified Grid/GridConfigBuilder.php
100755 → 100644
Empty file.
Empty file modified Grid/GridConfigBuilderInterface.php
100755 → 100644
Empty file.
Empty file modified Grid/GridConfigInterface.php
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion Grid/GridFactory.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private function resolveOptions(GridTypeInterface $type, Source $source = null,

$type->configureOptions($resolver);

if (null != $source && !isset($options['source'])) {
if (null !== $source && !isset($options['source'])) {
$options['source'] = $source;
}

Expand Down
Empty file modified Grid/GridFactoryInterface.php
100755 → 100644
Empty file.
Empty file modified Grid/GridRegistry.php
100755 → 100644
Empty file.
Empty file modified Grid/GridRegistryInterface.php
100755 → 100644
Empty file.
Empty file modified Grid/GridTypeInterface.php
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion Grid/Helper/ORMCountWalker.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function walkSelectStatement(SelectStatement $AST)

// Remove the variables which are not used by other clauses
foreach ($AST->selectClause->selectExpressions as $key => $selectExpression) {
if ($selectExpression->fieldIdentificationVariable == null) {
if ($selectExpression->fieldIdentificationVariable === null) {
unset($AST->selectClause->selectExpressions[$key]);
} elseif ($selectExpression->expression instanceof PathExpression) {
$groupByClause[] = $selectExpression->expression;
Expand Down
2 changes: 1 addition & 1 deletion Grid/Source/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public function execute($columns, $page = 0, $limit = 0, $maxResults = null, $gr
$this->addReferencedFields($row, $resource);

//call overridden prepareRow or associated closure
if (($modifiedRow = $this->prepareRow($row)) != null) {
if (($modifiedRow = $this->prepareRow($row)) !== null) {
$result->addRow($modifiedRow);
}
}
Expand Down
4 changes: 2 additions & 2 deletions Grid/Source/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ public function execute($columns, $page = 0, $limit = 0, $maxResults = null, $gr
$row->setRepository($repository);

//call overridden prepareRow or associated closure
if (($modifiedRow = $this->prepareRow($row)) != null) {
if (($modifiedRow = $this->prepareRow($row)) !== null) {
$result->addRow($modifiedRow);
}
}
Expand Down Expand Up @@ -582,7 +582,7 @@ public function getTotalCount($maxResults = null)
$countQuery->setHint(CountWalker::HINT_DISTINCT, true);
}

if ($countQuery->getHint(Query::HINT_CUSTOM_OUTPUT_WALKER) == false) {
if ($countQuery->getHint(Query::HINT_CUSTOM_OUTPUT_WALKER) === false) {
$platform = $countQuery->getEntityManager()->getConnection()->getDatabasePlatform(); // law of demeter win

$rsm = new ResultSetMapping();
Expand Down
Empty file modified Grid/Source/Source.php
100755 → 100644
Empty file.
Empty file modified Grid/Type/GridType.php
100755 → 100644
Empty file.
Empty file modified Resources/config/grid.yml
100755 → 100644
Empty file.
Empty file modified Resources/doc/columns_configuration/filters/select_filter.md
100755 → 100644
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ See [Select filter - additionnal attributes](../filters/select_filter.md#additio
## Filter
### Valid values

1 and 0 ####### A vérifier pour les entier
1 and 0 ####### A vérifier pour les entier

### Default Operator: `eq`

Expand Down
2 changes: 1 addition & 1 deletion Twig/DataGridExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ protected function getTemplatesFromString(Twig_Environment $environment, $theme)
$this->templates = [];

$template = $environment->loadTemplate($theme);
while ($template != null) {
while ($template !== null) {
$this->templates[] = $template;
$template = $template->getParent([]);
}
Expand Down

0 comments on commit 1684a94

Please sign in to comment.