Skip to content

Commit 1a68909

Browse files
ground-creativeCarlo
authored andcommitted
Update composer.json
1 parent 605ff88 commit 1a68909

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/Model.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,12 @@ public static function getColumns( )
139139
{
140140
return static::$_storage[ $class ][ 'columns' ];
141141
}
142-
$cols = array( );
142+
$cols = [ ];
143143
$qb = static::_getQB( );
144144
$qb->setFetchMode( \PDO::FETCH_ASSOC );
145145
$columns = $qb->run( 'SHOW COLUMNS FROM ' .
146146
$qb->addBackTicks( static::$_storage[ $class ][ 'table' ] ) );
147-
foreach ( $columns as $name ){ $cols[ $name[ 'Field' ] ] = $name[ 'Field' ]; }
147+
foreach ( $columns as $name ){ $cols[ $name[ 'Field' ] ] = $name[ 'Field' ]; }
148148
return static::$_storage[ $class ][ 'columns' ] = $cols;
149149
}
150150
/**
@@ -158,7 +158,7 @@ public static function getTable( )
158158
}
159159
/**
160160
* Adds observers to the class to use event listeners with the queries. See @ref using_observers
161-
* @param string $class the name of the class that will be used as observer
161+
* @param string $class the name of the class that will be used as observer
162162
*/
163163
public static function observe( $class = null )
164164
{
@@ -312,8 +312,8 @@ protected static function _checkColumn( $column )
312312
}
313313
/**
314314
* Fires events if methods are present in observers classes. See @ref using_observers
315-
* @param string $event the event name stored in the $_observers property
316-
* @param array $data in array with the data to pass to the listeners
315+
* @param string $event the event name stored in the $_observers property
316+
* @param array $data an array with the data to pass to the listeners
317317
*/
318318
protected static function _fireEvent( $event , $data )
319319
{
@@ -348,18 +348,18 @@ protected static function _initialize( )
348348
$qb = static::_getQB( );
349349
if ( !array_key_exists( $class = get_called_class( ) , static::$_storage ) )
350350
{
351-
static::$_storage[ $class ] = array( );
351+
static::$_storage[ $class ] = [ ];
352352
if ( static::$_table ){ static::$_storage[ $class ][ 'table' ] = static::$_table; }
353353
else
354354
{
355355
static::$_storage[ $class ][ 'table' ] = strpos( $class , '\\' ) ?
356356
@strtolower( end( explode( '\\' , $class ) ) ) : strtolower( $class );
357357
}
358-
$qb->run( 'SHOW TABLES LIKE ?' , array( static::$_storage[ $class ][ 'table' ] ) );
358+
$qb->run( 'SHOW TABLES LIKE ?' , [ static::$_storage[ $class ][ 'table' ] ] );
359359
if ( !$qb->countRows( ) )
360360
{
361361
trigger_error( 'Table ' . static::$_storage[ $class ][ 'table' ] .
362-
' does not exists, quitting now!' , E_USER_ERROR );
362+
' does not exist, quitting now!' , E_USER_ERROR );
363363
return false;
364364
}
365365
static::$_storage[ $class ][ 'columns' ] = static::getColumns( );

0 commit comments

Comments
 (0)