Skip to content

Commit

Permalink
PHPDoc update
Browse files Browse the repository at this point in the history
  • Loading branch information
rawsrc committed Dec 2, 2021
1 parent 2b08e7d commit 4535b53
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions PhpEcho.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@
/**
* PhpEcho : PHP Template engine : One class to rule them all ;-)
*
* @link https://www.developpez.net/forums/blogs/32058-rawsrc/b9154/phpecho-version-2-0-0/
* @author rawsrc - https://www.developpez.net/forums/u32058/rawsrc/
* @author rawsrc
* @copyright MIT License
*
* Copyright (c) 2020-2021 rawsrc
Expand Down Expand Up @@ -95,7 +94,7 @@
class PhpEcho
implements ArrayAccess
{
private static string $ALPHANUM = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
private static string $ALPHA_NUM = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';

private string $id = '';
private array $vars = [];
Expand Down Expand Up @@ -478,7 +477,7 @@ public static function getToken(int $length = 12): string
{
$length = ($length < 12) ? 12 : $length;
do {
$token = substr(str_shuffle(self::$ALPHANUM.mt_rand(100000000, 999999999)), 0, $length);
$token = substr(str_shuffle(self::$ALPHA_NUM.mt_rand(100000000, 999999999)), 0, $length);
} while (isset(self::$tokens[$token]));

self::$tokens[$token] = true;
Expand Down Expand Up @@ -605,6 +604,10 @@ private function bindHelpersTo(object $p): array
}
//endregion

/**
* @param mixed $p
* @return bool
*/
private function isArrayOfPhpEchoBlocks(mixed $p): bool
{
if (is_array($p)) {
Expand Down Expand Up @@ -738,7 +741,7 @@ public function hasParent(): bool
* If more or equal 2 args => first=helper + the rest=helper's params
* @param mixed ...$args
*/
public function addHead(...$args): void
public function addHead(mixed ...$args): void
{
// the head is only stored in the root of the tree
$root = $this->root();
Expand Down

0 comments on commit 4535b53

Please sign in to comment.