@@ -55,40 +55,34 @@ class Visualization
5555 /**
5656 * The default entity that will be used if the "from" part of a query is left out. Setting this to null
5757 * will make a "from" clause required.
58- *
59- * @var null|string
6058 */
61- protected $ defaultEntity ;
59+ protected ? string $ defaultEntity = null ;
6260
6361 /**
6462 * The entity schema that defines which tables are exposed to visualization clients, along with their fields, joins, and callbacks.
6563 *
6664 * @var array<string, Entity>
6765 */
68- protected $ entities = [];
66+ protected array $ entities = [];
6967
7068 /**
7169 * If pivots are being used or MC_Google_Visualization is handling the whole request, this must be a PDO
7270 * connection to your database.
73- *
74- * @var null|PDO
7571 */
76- protected $ db ;
72+ protected ? PDO $ db ;
7773
7874 /**
7975 * The SQL dialect to use when auto-generating SQL statements from the parsed query tokens
8076 * defaults to "mysql". Allowed values are "mysql", "postgres", or "sqlite". Patches are welcome for the rest.
81- *
82- * @var string
8377 */
84- protected $ sqlDialect = 'mysql ' ;
78+ protected string $ sqlDialect = 'mysql ' ;
8579
8680 /**
8781 * If a format string is not provided by the query, these will be used to format values by default.
8882 *
8983 * @var array<string, string>
9084 */
91- protected $ defaultFormat = [
85+ protected array $ defaultFormat = [
9286 'date ' => 'm/d/Y ' ,
9387 'datetime ' => 'm/d/Y h:ia ' ,
9488 'time ' => 'h:ia ' ,
@@ -98,10 +92,8 @@ class Visualization
9892
9993 /**
10094 * The current supported version of the Data Source protocol.
101- *
102- * @var float
10395 */
104- protected $ version = 0.5 ;
96+ protected float $ version = 0.5 ;
10597
10698 /**
10799 * Create a new instance. This must be done before the library can be used. Pass in a PDO connection and
@@ -1007,7 +999,6 @@ protected function generateSQL(array &$meta): string
1007999 $ stmt = $ this ->db ->query ($ pivotSql );
10081000 assert (false !== $ stmt );
10091001 $ rows = $ stmt ->fetchAll (PDO ::FETCH_ASSOC );
1010- assert (false !== $ rows );
10111002 foreach ($ rows as $ row ) {
10121003 // Create a version of all function-ed fields for each unique combination of pivot values
10131004 foreach ($ funcFields as $ field ) {
0 commit comments