diff --git a/.php-cs-fixer.user-guide.php b/.php-cs-fixer.user-guide.php index 1312c8b1344c..e8203386e49b 100644 --- a/.php-cs-fixer.user-guide.php +++ b/.php-cs-fixer.user-guide.php @@ -17,15 +17,11 @@ $config = require __DIR__ . '/.php-cs-fixer.dist.php'; $overrides = [ - 'echo_tag_syntax' => false, - 'header_comment' => false, - 'php_unit_internal_class' => false, - 'no_unused_imports' => false, - 'class_attributes_separation' => false, - 'fully_qualified_strict_types' => [ - 'import_symbols' => false, - 'leading_backslash_in_global_namespace' => true, - ], + 'echo_tag_syntax' => false, + 'header_comment' => false, + 'php_unit_internal_class' => false, + 'no_unused_imports' => false, + 'class_attributes_separation' => false, ]; return $config diff --git a/docs/cli/cli_commands.md b/docs/cli/cli_commands.md index 1654b2832934..5e09fc19a348 100644 --- a/docs/cli/cli_commands.md +++ b/docs/cli/cli_commands.md @@ -82,6 +82,7 @@ namespace App\Commands; use CodeIgniter\CLI\BaseCommand; use CodeIgniter\CLI\CLI; +use CodeIgniter\CodeIgniter; class AppInfo extends BaseCommand { @@ -90,7 +91,7 @@ class AppInfo extends BaseCommand public function run(array $params) { CLI::write('PHP Version: ' . CLI::color(PHP_VERSION, 'yellow')); - CLI::write('CI Version: ' . CLI::color(\CodeIgniter\CodeIgniter::CI_VERSION, 'yellow')); + CLI::write('CI Version: ' . CLI::color(CodeIgniter::CI_VERSION, 'yellow')); CLI::write('APPPATH: ' . CLI::color(APPPATH, 'yellow')); CLI::write('SYSTEMPATH: ' . CLI::color(SYSTEMPATH, 'yellow')); CLI::write('ROOTPATH: ' . CLI::color(ROOTPATH, 'yellow')); @@ -146,7 +147,7 @@ A convenience method to maintain a consistent and clear error output to the CLI: try { // ... -} catch (\Exception $e) { +} catch (Exception $e) { $this->showError($e); } ``` diff --git a/docs/cli/cli_signals.md b/docs/cli/cli_signals.md index 8187bf3410bc..cde614d44306 100644 --- a/docs/cli/cli_signals.md +++ b/docs/cli/cli_signals.md @@ -201,9 +201,13 @@ Some operations should never be interrupted (database transactions, file operati ```php db->transRollback(); @@ -342,11 +346,11 @@ kill -CONT $PID # Resume - may lose terminal control When you manually send `kill -CONT` from a different terminal: -**Expected behavior:** +**Expected behavior:** - Process resumes and custom handlers execute -**Side effects:** +**Side effects:** - Process loses foreground terminal control - Ctrl+C and Ctrl+Z may stop working @@ -463,7 +467,7 @@ This returns comprehensive information including: #### registerSignals($signals = [SIGTERM, SIGINT, SIGHUP, SIGQUIT], $methodMap = []) -- **Parameters** +- **Parameters** - **$signals** `array` List of signals to handle - **$methodMap** `array` Optional signal-to-method mapping @@ -576,7 +580,7 @@ Reset all states - useful for testing or restart scenarios. #### withSignalsBlocked($operation) -- **Parameters** +- **Parameters** - **$operation** `callable` The critical operation to execute without interruption - **Returns**: The result of the operation @@ -597,7 +601,7 @@ Check if signals are currently blocked. #### mapSignal($signal, $method) -- **Parameters** +- **Parameters** - **$signal** `int` Signal constant - **$method** `string` Method name to call for this signal @@ -642,7 +646,7 @@ class SampleCommand extends BaseCommand #### getSignalName($signal) -- **Parameters** +- **Parameters** - **$signal** `int` Signal constant - **Returns**: Human-readable signal name diff --git a/docs/concepts/factories.md b/docs/concepts/factories.md index bbd97836522a..474eceba3ffd 100644 --- a/docs/concepts/factories.md +++ b/docs/concepts/factories.md @@ -113,10 +113,12 @@ The first is `config()`, which returns an instance of a Config class. The only r ```php table('users'); ``` diff --git a/docs/database/results.md b/docs/database/results.md index 147fff77ed05..16d58cd944b8 100644 --- a/docs/database/results.md +++ b/docs/database/results.md @@ -51,9 +51,11 @@ You can also pass a string to `getResult()` that represents a class to instantia ```php query('SELECT * FROM users;'); -foreach ($query->getResult(\App\Entities\User::class) as $user) { +foreach ($query->getResult(User::class) as $user) { echo $user->name; // access attributes echo $user->reverseName(); // or methods defined on the 'User' class } @@ -110,8 +112,10 @@ You can also add a second string parameter, which is the name of a class to inst ```php query('SELECT * FROM users LIMIT 1;'); -$row = $query->getRow(0, \App\Entities\User::class); +$row = $query->getRow(0, User::class); echo $row->name; // access attributes echo $row->reverse_name(); // or methods defined on the 'User' class @@ -181,11 +185,13 @@ For use with MySQLi, you may set MySQLi's result mode to `MYSQLI_USE_RESULT` for ```php resultMode = MYSQLI_USE_RESULT; // for unbuffered results $query = $db->query('YOUR QUERY'); -$file = new \CodeIgniter\Files\File(WRITEPATH . 'data.csv'); +$file = new File(WRITEPATH . 'data.csv'); $csv = $file->openFile('w'); @@ -260,9 +266,11 @@ Example: ```php query('YOUR QUERY'); -$rows = $query->getCustomResultObject(\App\Entities\User::class); +$rows = $query->getCustomResultObject(User::class); foreach ($rows as $row) { echo $row->id; @@ -280,9 +288,11 @@ Example: ```php query('YOUR QUERY'); -$row = $query->getCustomRowObject(0, \App\Entities\User::class); +$row = $query->getCustomRowObject(0, User::class); if (isset($row)) { echo $row->email; // access attributes @@ -297,7 +307,9 @@ Example: ```php getRow(0, \App\Entities\User::class); +use App\Entities\User; + +$row = $query->getRow(0, User::class); ``` ## Result Helper Methods diff --git a/docs/database/utilities.md b/docs/database/utilities.md index 0a6958597192..2ddcdaad89f9 100644 --- a/docs/database/utilities.md +++ b/docs/database/utilities.md @@ -119,8 +119,10 @@ Permits you to generate an XML file from a query result. The first parameter exp ```php query('SELECT * FROM mytable'); diff --git a/docs/dbmgmt/forge.md b/docs/dbmgmt/forge.md index 4e77ca19770f..e096c16815cc 100644 --- a/docs/dbmgmt/forge.md +++ b/docs/dbmgmt/forge.md @@ -12,7 +12,9 @@ Load the Forge Class as follows: ```php myforge = \Config\Database::forge('other_db'); +use Config\Database; + +$this->myforge = Database::forge('other_db'); ``` In the above example, we're passing the name of a different database group to connect to as the first parameter. diff --git a/docs/dbmgmt/seeds.md b/docs/dbmgmt/seeds.md index b3bc7d08dc80..c24af42763b3 100644 --- a/docs/dbmgmt/seeds.md +++ b/docs/dbmgmt/seeds.md @@ -79,7 +79,9 @@ You can grab a copy of the main seeder through the database config class: ```php call('TestSeeder'); ``` @@ -90,7 +92,9 @@ You can specify a different database group when obtaining a seeder instance by p ```php call('TestSeeder'); ``` diff --git a/docs/extending/core_classes.md b/docs/extending/core_classes.md index d82634e921f0..d04088253ad0 100644 --- a/docs/extending/core_classes.md +++ b/docs/extending/core_classes.md @@ -83,6 +83,7 @@ Then you would add the `routes` service in **app/Config/Services.php** to load y namespace Config; +use App\Libraries\RouteCollection; use CodeIgniter\Config\BaseService; class Services extends BaseService @@ -93,7 +94,7 @@ class Services extends BaseService return static::getSharedInstance('routes'); } - return new \App\Libraries\RouteCollection(static::locator(), config(Modules::class), config(Routing::class)); + return new RouteCollection(static::locator(), config(Modules::class), config(Routing::class)); } // ... diff --git a/docs/extending/events.md b/docs/extending/events.md index 4d134367df1a..055ea9550bd0 100644 --- a/docs/extending/events.md +++ b/docs/extending/events.md @@ -25,13 +25,14 @@ In this example, whenever the `pre_system` event is executed, an instance of `My ```php find($id); -} catch (\Exception $e) { +} catch (Exception $e) { exit($e->getMessage()); } ``` @@ -62,7 +62,7 @@ try { } catch (DataException $e) { // do something here... - throw new \RuntimeException($e->getMessage(), $e->getCode(), $e); + throw new RuntimeException($e->getMessage(), $e->getCode(), $e); } ``` @@ -241,7 +241,9 @@ This exception should be used when the values from the configuration class are i ```php redirect('https://example.com/path') ->setHeader('Some', 'header') ->setCookie('and', 'cookie'); -throw new \CodeIgniter\HTTP\Exceptions\RedirectException($response); +throw new RedirectException($response); ``` ## Specify HTTP Status Code in Your Exception @@ -400,7 +410,9 @@ You can use any logic your application needs to determine whether it should hand namespace Config; +use App\Libraries\MyExceptionHandler; use CodeIgniter\Config\BaseConfig; +use CodeIgniter\Debug\ExceptionHandler; use CodeIgniter\Debug\ExceptionHandlerInterface; use CodeIgniter\Exceptions\PageNotFoundException; use Throwable; @@ -412,14 +424,14 @@ class Exceptions extends BaseConfig public function handler(int $statusCode, Throwable $exception): ExceptionHandlerInterface { if (in_array($statusCode, [400, 404, 500], true)) { - return new \App\Libraries\MyExceptionHandler($this); + return new MyExceptionHandler($this); } if ($exception instanceof PageNotFoundException) { - return new \App\Libraries\MyExceptionHandler($this); + return new MyExceptionHandler($this); } - return new \CodeIgniter\Debug\ExceptionHandler($this); + return new ExceptionHandler($this); } } ``` diff --git a/docs/general/logging.md b/docs/general/logging.md index e1a2fd71519f..f7b152f89ce6 100644 --- a/docs/general/logging.md +++ b/docs/general/logging.md @@ -121,7 +121,7 @@ If you want to log an Exception or an Error, you can use the key 'exception', wi try { // Something throws error here -} catch (\Exception $e) { +} catch (Exception $e) { log_message('error', '[ERROR] {exception}', ['exception' => $e]); } ``` diff --git a/docs/general/modules.md b/docs/general/modules.md index 6befbab8b7ab..e692e10c9873 100644 --- a/docs/general/modules.md +++ b/docs/general/modules.md @@ -245,7 +245,9 @@ In the module's **Config/Filters.php** file, you need to define the aliases of t ```php aliases['menus'] = \App\Filters\MenusFilter::class; +use App\Filters\MenusFilter; + +$filters->aliases['menus'] = MenusFilter::class; ``` ### Controllers @@ -276,7 +278,9 @@ No special change is needed when working with configuration files. These are sti ```php {$method}(...$params); } - throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound(); + throw PageNotFoundException::forPageNotFound(); } } ``` diff --git a/docs/incoming/filters.md b/docs/incoming/filters.md index db6033208191..a96cd1638d4c 100644 --- a/docs/incoming/filters.md +++ b/docs/incoming/filters.md @@ -110,11 +110,12 @@ The `$aliases` array is used to associate a simple name with one or more fully-q namespace Config; use CodeIgniter\Config\BaseConfig; +use CodeIgniter\Filters\CSRF; class Filters extends BaseConfig { public array $aliases = [ - 'csrf' => \CodeIgniter\Filters\CSRF::class, + 'csrf' => CSRF::class, ]; // ... @@ -132,14 +133,16 @@ You can combine multiple filters into one alias, making complex sets of filters namespace Config; +use App\Filters\ApiAuth; +use App\Filters\Negotiate; use CodeIgniter\Config\BaseConfig; class Filters extends BaseConfig { public array $aliases = [ 'api-prep' => [ - \App\Filters\Negotiate::class, - \App\Filters\ApiAuth::class, + Negotiate::class, + ApiAuth::class, ], ]; @@ -481,13 +484,14 @@ If you want to customize the headers, extend `CodeIgniter\Filters\SecureHeaders` namespace Config; +use App\Filters\SecureHeaders; use CodeIgniter\Config\BaseConfig; class Filters extends BaseConfig { public array $aliases = [ // ... - 'secureheaders' => \App\Filters\SecureHeaders::class, + 'secureheaders' => SecureHeaders::class, ]; // ... diff --git a/docs/incoming/routing.md b/docs/incoming/routing.md index 970260a7564c..9c464ab704c0 100644 --- a/docs/incoming/routing.md +++ b/docs/incoming/routing.md @@ -519,7 +519,9 @@ You can specify a filter classname for the filter value: ```php get('admin', ' AdminController::index', ['filter' => \App\Filters\SomeFilter::class]); +use App\Filters\SomeFilter; + +$routes->get('admin', ' AdminController::index', ['filter' => SomeFilter::class]); ``` #### Multiple Filters @@ -534,7 +536,9 @@ You can specify an array for the filter value: ```php get('admin', ' AdminController::index', ['filter' => ['admin-auth', \App\Filters\SomeFilter::class]]); +use App\Filters\SomeFilter; + +$routes->get('admin', ' AdminController::index', ['filter' => ['admin-auth', SomeFilter::class]]); ``` ##### Filter Arguments @@ -1237,8 +1241,10 @@ CodeIgniter 4 provides a simple way to access the current route's controller and ```php getFilters(); @@ -1280,8 +1288,10 @@ When we're defining routes, they may have optional parameters: `filter`, `namesp ```php getMatchedRouteOptions(); diff --git a/docs/installation/upgrade_html_tables.md b/docs/installation/upgrade_html_tables.md index 78ae8895f6a9..a722e035d35a 100644 --- a/docs/installation/upgrade_html_tables.md +++ b/docs/installation/upgrade_html_tables.md @@ -38,7 +38,9 @@ echo $this->table->generate(); ```php setHeading('Name', 'Color', 'Size'); diff --git a/docs/installation/upgrade_images.md b/docs/installation/upgrade_images.md index 45ae7214c94e..20227fb4d987 100644 --- a/docs/installation/upgrade_images.md +++ b/docs/installation/upgrade_images.md @@ -43,7 +43,9 @@ $this->image_lib->resize(); ```php withFile('/path/to/image/mypic.jpg') diff --git a/docs/installation/upgrade_pagination.md b/docs/installation/upgrade_pagination.md index 09b0230cb892..fd27e296135a 100644 --- a/docs/installation/upgrade_pagination.md +++ b/docs/installation/upgrade_pagination.md @@ -45,7 +45,9 @@ $this->load->view('posts/index', $data); ```php $model->paginate(10), diff --git a/docs/libraries/curlrequest.md b/docs/libraries/curlrequest.md index c3cbefcd0fa1..4931559e5a6b 100644 --- a/docs/libraries/curlrequest.md +++ b/docs/libraries/curlrequest.md @@ -112,10 +112,12 @@ To load it with the Services class, call the `curlrequest()` method or the globa ```php request('POST', '/post', [ 'multipart' => [ 'foo' => 'bar', - 'userfile' => new \CURLFile('/path/to/file.txt'), + 'userfile' => new CURLFile('/path/to/file.txt'), ], ]); ``` diff --git a/docs/libraries/encryption.md b/docs/libraries/encryption.md index bcd624f70fe8..f1e65b558c0b 100644 --- a/docs/libraries/encryption.md +++ b/docs/libraries/encryption.md @@ -124,12 +124,14 @@ The key should be as random as possible, and it **must not** be a regular text s ```php initialize($config); diff --git a/docs/libraries/images.md b/docs/libraries/images.md index 32b6e4609eb7..6fd8df13a957 100644 --- a/docs/libraries/images.md +++ b/docs/libraries/images.md @@ -127,13 +127,15 @@ These methods return the class instance so they can be chained together, as show ```php withFile('/path/to/image/mypic.jpg') ->fit(100, 100, 'center') ->save('/path/to/image/mypic_thumb.jpg'); -} catch (\CodeIgniter\Images\Exceptions\ImageException $e) { +} catch (ImageException $e) { echo $e->getMessage(); } ``` diff --git a/docs/libraries/publisher.md b/docs/libraries/publisher.md index ac74687cf574..6529f05f9224 100644 --- a/docs/libraries/publisher.md +++ b/docs/libraries/publisher.md @@ -9,7 +9,9 @@ Because Publisher instances are specific to their source and destination, this l ```php \App\Filters\Throttle::class, + 'throttle' => Throttle::class, ]; // ... diff --git a/docs/libraries/time.md b/docs/libraries/time.md index e0a7f7a3c964..84e074f9d108 100644 --- a/docs/libraries/time.md +++ b/docs/libraries/time.md @@ -176,7 +176,7 @@ When working with other libraries that provide a DateTime instance, you can use use CodeIgniter\I18n\Time; -$dt = new \DateTime('now'); +$dt = new DateTime('now'); $time = Time::createFromInstance($dt, 'en_US'); ``` @@ -666,7 +666,7 @@ use CodeIgniter\I18n\Time; $time = Time::parse('March 10, 2017', 'America/Chicago'); $diff = $time->difference(Time::now()); -$diff = $time->difference(new \DateTime('July 4, 1975', 'America/Chicago')); +$diff = $time->difference(new DateTime('July 4, 1975', 'America/Chicago')); $diff = $time->difference('July 4, 1975 13:32:05', 'America/Chicago'); ``` diff --git a/docs/libraries/uploaded_files.md b/docs/libraries/uploaded_files.md index 8504c0215903..92270a53141b 100644 --- a/docs/libraries/uploaded_files.md +++ b/docs/libraries/uploaded_files.md @@ -356,7 +356,7 @@ You can check that a file was actually uploaded via HTTP with no errors by calli isValid()) { - throw new \RuntimeException($file->getErrorString() . '(' . $file->getError() . ')'); + throw new RuntimeException($file->getErrorString() . '(' . $file->getError() . ')'); } ``` diff --git a/docs/libraries/uri.md b/docs/libraries/uri.md index bbbd258365d2..e4162b6e8c59 100644 --- a/docs/libraries/uri.md +++ b/docs/libraries/uri.md @@ -83,7 +83,9 @@ The scheme is frequently 'http' or 'https', but any scheme is supported, includi ```php getScheme(); // 'http' $uri->setScheme('https'); @@ -96,7 +98,9 @@ Many URIs contain several elements that are collectively known as the 'authority ```php getAuthority(); // user@example.com:21 ``` @@ -150,7 +154,9 @@ The host portion of the URI is typically the domain name of the URL. This can be ```php getHost(); // www.example.com echo $uri->setHost('anotherexample.com')->getHost(); // anotherexample.com @@ -163,7 +169,9 @@ The port is an integer between 0 and 65535. Each scheme has a default value asso ```php getPort(); // 21 echo $uri->setPort(2201)->getPort(); // 2201 @@ -178,7 +186,9 @@ The path is all of the segments within the site itself. As expected, the `getPat ```php getPath(); // '/some/path' echo $uri->setPath('/another/path')->getPath(); // '/another/path' @@ -201,7 +211,9 @@ Query values can only be set as a string currently. ```php getQuery(); // 'foo=bar' $uri->setQuery('foo=bar&bar=baz'); @@ -241,7 +253,9 @@ You can filter the query values returned by passing an options array to the `get ```php getQuery(['only' => ['foo']]); @@ -259,7 +273,9 @@ If you need to modify the URI's query values more permanently, you can use the ` ```php stripQuery('foo', 'bar'); @@ -278,7 +294,9 @@ Fragments are the portion at the end of the URL, preceded by the pound sign (`#` ```php getFragment(); // 'first-heading' echo $uri->setFragment('second-heading')->getFragment(); // 'second-heading' diff --git a/docs/libraries/validation.md b/docs/libraries/validation.md index c8d686143501..c9028245c8d0 100644 --- a/docs/libraries/validation.md +++ b/docs/libraries/validation.md @@ -245,6 +245,11 @@ If you want to use traditional rules, you need to change the rule classes in **a namespace Config; +use CodeIgniter\Validation\CreditCardRules; +use CodeIgniter\Validation\FileRules; +use CodeIgniter\Validation\FormatRules; +use CodeIgniter\Validation\Rules; + // ... class Validation extends BaseConfig @@ -252,10 +257,10 @@ class Validation extends BaseConfig // ... public array $ruleSets = [ - \CodeIgniter\Validation\CreditCardRules::class, - \CodeIgniter\Validation\FileRules::class, - \CodeIgniter\Validation\FormatRules::class, - \CodeIgniter\Validation\Rules::class, + CreditCardRules::class, + FileRules::class, + FormatRules::class, + Rules::class, ]; // ... diff --git a/docs/models/entities.md b/docs/models/entities.md index 3c9218f309a0..b32ae75d2250 100644 --- a/docs/models/entities.md +++ b/docs/models/entities.md @@ -53,6 +53,7 @@ Create the model first at **app/Models/UserModel.php** so that we can interact w namespace App\Models; +use App\Entities\User; use CodeIgniter\Model; class UserModel extends Model @@ -61,7 +62,7 @@ class UserModel extends Model protected $allowedFields = [ 'username', 'email', 'password', ]; - protected $returnType = \App\Entities\User::class; + protected $returnType = User::class; protected $useTimestamps = true; } ``` @@ -82,6 +83,8 @@ Now that all of the pieces are in place, you would work with the Entity class as ```php find($id); // Display @@ -98,7 +101,7 @@ if (! isset($user->username)) { $userModel->save($user); // Create -$user = new \App\Entities\User(); +$user = new User(); $user->username = 'foo'; $user->email = 'foo@example.com'; $userModel->save($user); @@ -121,9 +124,11 @@ The Entity class also provides a method, `fill()`, that allows you to shove an a ```php request->getPost(); -$user = new \App\Entities\User(); +$user = new User(); $user->fill($data); $userModel->save($user); ``` @@ -133,9 +138,11 @@ You can also pass the data in the constructor and the data will be passed throug ```php request->getPost(); -$user = new \App\Entities\User($data); +$user = new User($data); $userModel->save($user); ``` @@ -356,7 +363,9 @@ Now, when any of those properties are set, they will be converted to a Time inst ```php created_at = 'April 15, 2017 10:30:00'; @@ -693,7 +702,9 @@ You can check if an Entity attribute has changed since it was created. The only ```php hasChanged('name'); // false $user->name = 'Fred'; diff --git a/docs/models/model.md b/docs/models/model.md index 0c6117397743..a1586191ca0e 100644 --- a/docs/models/model.md +++ b/docs/models/model.md @@ -15,15 +15,17 @@ You can access models within your classes by creating a new instance or using th ```php \CodeIgniter\Format\JSONFormatter::class, - 'application/xml' => \CodeIgniter\Format\XMLFormatter::class, + 'application/json' => JSONFormatter::class, + 'application/xml' => XMLFormatter::class, ]; // ... diff --git a/docs/outgoing/api_transformers.md b/docs/outgoing/api_transformers.md index 59dcf75717df..08c69430d682 100644 --- a/docs/outgoing/api_transformers.md +++ b/docs/outgoing/api_transformers.md @@ -474,7 +474,7 @@ Any object can be cast to an array and transformed: use App\Transformers\UserTransformer; -$user = new \stdClass(); +$user = new stdClass(); $user->id = 1; $user->name = 'John Doe'; $user->email = 'john@example.com'; diff --git a/docs/outgoing/response.md b/docs/outgoing/response.md index 48e43396a39b..f1ef68d0e944 100644 --- a/docs/outgoing/response.md +++ b/docs/outgoing/response.md @@ -432,7 +432,7 @@ Sets the `Last-Modified` header. The `$date` argument can be either a string or setLastModified(date('D, d M Y H:i:s')); -$response->setLastModified(\DateTime::createFromFormat('!U', $timestamp)); +$response->setLastModified(DateTime::createFromFormat('!U', $timestamp)); ``` #### send(): Response diff --git a/docs/outgoing/table.md b/docs/outgoing/table.md index 5dd6c505d41a..bc06ae594d18 100644 --- a/docs/outgoing/table.md +++ b/docs/outgoing/table.md @@ -11,7 +11,9 @@ The Table class is not provided as a service, and should be instantiated "normal ```php query('SELECT * FROM my_table'); @@ -50,7 +56,9 @@ Here is an example showing how you might create a table using discrete parameter ```php setHeading('Name', 'Color', 'Size'); @@ -66,7 +74,9 @@ Here is the same example, except instead of individual parameters, arrays are us ```php setHeading(['Name', 'Color', 'Size']); @@ -142,11 +152,13 @@ You can also set defaults for these by passing an array of template settings to ```php '