Skip to content

Commit

Permalink
refactor: configure visibility on constants (#1096)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Potier <[email protected]>
  • Loading branch information
deguif and npotier authored Dec 14, 2023
1 parent e81c18e commit 31dca55
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
52 changes: 26 additions & 26 deletions Grid/Column/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,33 @@

abstract class Column
{
const DEFAULT_VALUE = null;
public const DEFAULT_VALUE = null;

/**
* Filter.
*/
const DATA_CONJUNCTION = 0;
const DATA_DISJUNCTION = 1;

const OPERATOR_EQ = 'eq';
const OPERATOR_NEQ = 'neq';
const OPERATOR_LT = 'lt';
const OPERATOR_LTE = 'lte';
const OPERATOR_GT = 'gt';
const OPERATOR_GTE = 'gte';
const OPERATOR_BTW = 'btw';
const OPERATOR_BTWE = 'btwe';
const OPERATOR_LIKE = 'like';
const OPERATOR_NLIKE = 'nlike';
const OPERATOR_RLIKE = 'rlike';
const OPERATOR_LLIKE = 'llike';
const OPERATOR_SLIKE = 'slike'; //simple/strict LIKE
const OPERATOR_NSLIKE = 'nslike';
const OPERATOR_RSLIKE = 'rslike';
const OPERATOR_LSLIKE = 'lslike';

const OPERATOR_ISNULL = 'isNull';
const OPERATOR_ISNOTNULL = 'isNotNull';
public const DATA_CONJUNCTION = 0;
public const DATA_DISJUNCTION = 1;

public const OPERATOR_EQ = 'eq';
public const OPERATOR_NEQ = 'neq';
public const OPERATOR_LT = 'lt';
public const OPERATOR_LTE = 'lte';
public const OPERATOR_GT = 'gt';
public const OPERATOR_GTE = 'gte';
public const OPERATOR_BTW = 'btw';
public const OPERATOR_BTWE = 'btwe';
public const OPERATOR_LIKE = 'like';
public const OPERATOR_NLIKE = 'nlike';
public const OPERATOR_RLIKE = 'rlike';
public const OPERATOR_LLIKE = 'llike';
public const OPERATOR_SLIKE = 'slike'; //simple/strict LIKE
public const OPERATOR_NSLIKE = 'nslike';
public const OPERATOR_RSLIKE = 'rslike';
public const OPERATOR_LSLIKE = 'lslike';

public const OPERATOR_ISNULL = 'isNull';
public const OPERATOR_ISNOTNULL = 'isNotNull';

protected static $availableOperators = [
self::OPERATOR_EQ,
Expand All @@ -71,9 +71,9 @@ abstract class Column
/**
* Align.
*/
const ALIGN_LEFT = 'left';
const ALIGN_RIGHT = 'right';
const ALIGN_CENTER = 'center';
public const ALIGN_LEFT = 'left';
public const ALIGN_RIGHT = 'right';
public const ALIGN_CENTER = 'center';

protected static $aligns = [
self::ALIGN_LEFT,
Expand Down
2 changes: 1 addition & 1 deletion Grid/Column/MassActionColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class MassActionColumn extends Column
{
const ID = '__action';
public const ID = '__action';

public function __construct()
{
Expand Down
2 changes: 1 addition & 1 deletion Grid/Columns.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Columns implements \IteratorAggregate, \Countable
protected $columns = [];
protected $extensions = [];

private const MISSING_COLUMN_EX_MSG = 'Column with id "%s" doesn\'t exists';
public const MISSING_COLUMN_EX_MSG = 'Column with id "%s" doesn\'t exists';

/**
* @var AuthorizationCheckerInterface
Expand Down
4 changes: 2 additions & 2 deletions Grid/GridManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ class GridManager implements IteratorAggregate, Countable

protected $massActionGrid = null;

const NO_GRID_EX_MSG = 'No grid has been added to the manager.';
public const NO_GRID_EX_MSG = 'No grid has been added to the manager.';

const SAME_GRID_HASH_EX_MSG = 'Some grids seem similar. Please set an Indentifier for your grids.';
public const SAME_GRID_HASH_EX_MSG = 'Some grids seem similar. Please set an Indentifier for your grids.';

public function __construct($container, Environment $twig)
{
Expand Down

0 comments on commit 31dca55

Please sign in to comment.