Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declare visibility on all constants #5104

Merged
merged 3 commits into from
Dec 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Database/Schema/Identifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
abstract class Identifier
{
// Warning: Do not modify this
const REGEX = '^[a-zA-Z_][a-zA-Z0-9_]*$';
public const REGEX = '^[a-zA-Z_][a-zA-Z0-9_]*$';

public static function validate($identifier, $asset = '')
{
Expand Down
6 changes: 3 additions & 3 deletions src/Database/Schema/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

abstract class Index
{
const PRIMARY = 'PRIMARY';
const UNIQUE = 'UNIQUE';
const INDEX = 'INDEX';
public const PRIMARY = 'PRIMARY';
public const UNIQUE = 'UNIQUE';
public const INDEX = 'INDEX';

public static function make(array $index)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Common/CharType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class CharType extends Type
{
const NAME = 'char';
public const NAME = 'char';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Common/DoubleType.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class DoubleType extends DoctrineFloatType
{
const NAME = 'double';
public const NAME = 'double';

public function getName()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Common/JsonType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class JsonType extends Type
{
const NAME = 'json';
public const NAME = 'json';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Common/NumericType.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class NumericType extends DoctrineDecimalType
{
const NAME = 'numeric';
public const NAME = 'numeric';

public function getName()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Common/TextType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class TextType extends Type
{
const NAME = 'text';
public const NAME = 'text';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Common/VarCharType.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class VarCharType extends DoctrineStringType
{
const NAME = 'varchar';
public const NAME = 'varchar';

public function getName()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/BinaryType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class BinaryType extends Type
{
const NAME = 'binary';
public const NAME = 'binary';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/BitType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class BitType extends Type
{
const NAME = 'bit';
public const NAME = 'bit';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/BlobType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class BlobType extends Type
{
const NAME = 'blob';
public const NAME = 'blob';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/EnumType.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class EnumType extends Type
{
const NAME = 'enum';
public const NAME = 'enum';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/FloatType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class FloatType extends Type
{
const NAME = 'float';
public const NAME = 'float';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/GeometryCollectionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class GeometryCollectionType extends Type
{
const NAME = 'geometrycollection';
public const NAME = 'geometrycollection';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/GeometryType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class GeometryType extends Type
{
const NAME = 'geometry';
public const NAME = 'geometry';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/LineStringType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class LineStringType extends Type
{
const NAME = 'linestring';
public const NAME = 'linestring';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/LongBlobType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class LongBlobType extends Type
{
const NAME = 'longblob';
public const NAME = 'longblob';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/LongTextType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class LongTextType extends Type
{
const NAME = 'longtext';
public const NAME = 'longtext';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/MediumBlobType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class MediumBlobType extends Type
{
const NAME = 'mediumblob';
public const NAME = 'mediumblob';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/MediumIntType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class MediumIntType extends Type
{
const NAME = 'mediumint';
public const NAME = 'mediumint';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/MediumTextType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class MediumTextType extends Type
{
const NAME = 'mediumtext';
public const NAME = 'mediumtext';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/MultiLineStringType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class MultiLineStringType extends Type
{
const NAME = 'multilinestring';
public const NAME = 'multilinestring';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/MultiPointType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class MultiPointType extends Type
{
const NAME = 'multipoint';
public const NAME = 'multipoint';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/MultiPolygonType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class MultiPolygonType extends Type
{
const NAME = 'multipolygon';
public const NAME = 'multipolygon';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/PointType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class PointType extends Type
{
const NAME = 'point';
public const NAME = 'point';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/PolygonType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class PolygonType extends Type
{
const NAME = 'polygon';
public const NAME = 'polygon';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/SetType.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class SetType extends Type
{
const NAME = 'set';
public const NAME = 'set';

public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/TimeStampType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class TimeStampType extends Type
{
const NAME = 'timestamp';
public const NAME = 'timestamp';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/TinyBlobType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class TinyBlobType extends Type
{
const NAME = 'tinyblob';
public const NAME = 'tinyblob';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/TinyIntType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class TinyIntType extends Type
{
const NAME = 'tinyint';
public const NAME = 'tinyint';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/TinyTextType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class TinyTextType extends Type
{
const NAME = 'tinytext';
public const NAME = 'tinytext';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/VarBinaryType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class VarBinaryType extends Type
{
const NAME = 'varbinary';
public const NAME = 'varbinary';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Mysql/YearType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class YearType extends Type
{
const NAME = 'year';
public const NAME = 'year';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Postgresql/BitType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class BitType extends Type
{
const NAME = 'bit';
public const NAME = 'bit';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Database/Types/Postgresql/BitVaryingType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

class BitVaryingType extends Type
{
const NAME = 'bit varying';
const DBTYPE = 'varbit';
public const NAME = 'bit varying';
public const DBTYPE = 'varbit';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Postgresql/ByteaType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class ByteaType extends Type
{
const NAME = 'bytea';
public const NAME = 'bytea';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Database/Types/Postgresql/CharacterType.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

class CharacterType extends CharType
{
const NAME = 'character';
const DBTYPE = 'bpchar';
public const NAME = 'character';
public const DBTYPE = 'bpchar';
}
4 changes: 2 additions & 2 deletions src/Database/Types/Postgresql/CharacterVaryingType.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

class CharacterVaryingType extends VarCharType
{
const NAME = 'character varying';
const DBTYPE = 'varchar';
public const NAME = 'character varying';
public const DBTYPE = 'varchar';
}
2 changes: 1 addition & 1 deletion src/Database/Types/Postgresql/CidrType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class CidrType extends Type
{
const NAME = 'cidr';
public const NAME = 'cidr';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Database/Types/Postgresql/DoublePrecisionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

class DoublePrecisionType extends DoubleType
{
const NAME = 'double precision';
const DBTYPE = 'float8';
public const NAME = 'double precision';
public const DBTYPE = 'float8';
}
2 changes: 1 addition & 1 deletion src/Database/Types/Postgresql/GeometryType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class GeometryType extends Type
{
const NAME = 'geometry';
public const NAME = 'geometry';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Postgresql/InetType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class InetType extends Type
{
const NAME = 'inet';
public const NAME = 'inet';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Types/Postgresql/IntervalType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class IntervalType extends Type
{
const NAME = 'interval';
public const NAME = 'interval';

public function getSQLDeclaration(array $field, AbstractPlatform $platform)
{
Expand Down
Loading