From fc54ef6e2c15508da62df67ab811394d713ccc37 Mon Sep 17 00:00:00 2001 From: Nikolaos Dimopoulos Date: Wed, 30 Nov 2022 12:16:50 -0500 Subject: [PATCH] prep for 5.1.1 --- src/Db/Profiler.php | 28 +++++++++++--- src/Db/Profiler/Item.php | 18 +++++++++ src/Html/TagFactory.php | 82 ++++++++++++++++++++-------------------- src/Support/Debug.php | 12 ++++++ 4 files changed, 94 insertions(+), 46 deletions(-) diff --git a/src/Db/Profiler.php b/src/Db/Profiler.php index 2ee177fd..1f9fdf0a 100644 --- a/src/Db/Profiler.php +++ b/src/Db/Profiler.php @@ -78,11 +78,11 @@ class Profiler protected $allProfiles; /** - * Total time spent by all profiles to complete + * Total time spent by all profiles to complete in nanoseconds * * @var float */ - protected $totalSeconds = 0; + protected $totalNanoseconds = 0; /** * Returns the last profile executed in the profiler @@ -102,6 +102,24 @@ public function getNumberTotalStatements(): int { } + /** + * Returns the total time in nanoseconds spent by the profiles + * + * @return float + */ + public function getTotalElapsedNanoseconds(): float + { + } + + /** + * Returns the total time in milliseconds spent by the profiles + * + * @return float + */ + public function getTotalElapsedMilliseconds(): float + { + } + /** * Returns the total time in seconds spent by the profiles * @@ -133,11 +151,11 @@ public function reset(): Profiler * Starts the profile of a SQL sentence * * @param string $sqlStatement - * @param mixed $sqlVariables - * @param mixed $sqlBindTypes + * @param array $sqlVariables + * @param array $sqlBindTypes * @return Profiler */ - public function startProfile(string $sqlStatement, $sqlVariables = null, $sqlBindTypes = null): Profiler + public function startProfile(string $sqlStatement, array $sqlVariables = [], array $sqlBindTypes = []): Profiler { } diff --git a/src/Db/Profiler/Item.php b/src/Db/Profiler/Item.php index a19f00e2..fb1c929c 100644 --- a/src/Db/Profiler/Item.php +++ b/src/Db/Profiler/Item.php @@ -94,6 +94,24 @@ public function getSqlVariables(): array { } + /** + * Returns the total time in nanoseconds spent by the profile + * + * @return float + */ + public function getTotalElapsedNanoseconds(): float + { + } + + /** + * Returns the total time in milliseconds spent by the profile + * + * @return float + */ + public function getTotalElapsedMilliseconds(): float + { + } + /** * Returns the total time in seconds spent by the profile * diff --git a/src/Html/TagFactory.php b/src/Html/TagFactory.php index ab674f04..29170dd4 100644 --- a/src/Html/TagFactory.php +++ b/src/Html/TagFactory.php @@ -25,47 +25,47 @@ * @property EscaperInterface $escaper * @property array $services * - * @method string a(string $href, string $text, array $attributes = [], bool $raw = false) - * @method string base(string $href, array $attributes = []) - * @method string body(array $attributes = []) - * @method string button(string $text, array $attributes = [], bool $raw = false) - * @method string close(string $tag, bool $raw = false) - * @method string doctype(int $flag, string $delimiter) - * @method string element(string $tag, string $text, array $attributes = [], bool $raw = false) - * @method string form(array $attributes = []) - * @method string img(string $src, array $attributes = []) - * @method string inputCheckbox(string $name, string $value = null, array $attributes = []) - * @method string inputColor(string $name, string $value = null, array $attributes = []) - * @method string inputDate(string $name, string $value = null, array $attributes = []) - * @method string inputDateTime(string $name, string $value = null, array $attributes = []) - * @method string inputDateTimeLocal(string $name, string $value = null, array $attributes = []) - * @method string inputEmail(string $name, string $value = null, array $attributes = []) - * @method string inputFile(string $name, string $value = null, array $attributes = []) - * @method string inputHidden(string $name, string $value = null, array $attributes = []) - * @method string inputImage(string $name, string $value = null, array $attributes = []) - * @method string inputInput(string $name, string $value = null, array $attributes = []) - * @method string inputMonth(string $name, string $value = null, array $attributes = []) - * @method string inputNumeric(string $name, string $value = null, array $attributes = []) - * @method string inputPassword(string $name, string $value = null, array $attributes = []) - * @method string inputRadio(string $name, string $value = null, array $attributes = []) - * @method string inputRange(string $name, string $value = null, array $attributes = []) - * @method string inputSearch(string $name, string $value = null, array $attributes = []) - * @method string inputSelect(string $name, string $value = null, array $attributes = []) - * @method string inputSubmit(string $name, string $value = null, array $attributes = []) - * @method string inputTel(string $name, string $value = null, array $attributes = []) - * @method string inputText(string $name, string $value = null, array $attributes = []) - * @method string inputTextarea(string $name, string $value = null, array $attributes = []) - * @method string inputTime(string $name, string $value = null, array $attributes = []) - * @method string inputUrl(string $name, string $value = null, array $attributes = []) - * @method string inputWeek(string $name, string $value = null, array $attributes = []) - * @method string label(string $label, array $attributes = [], bool $raw = false) - * @method string link(string $indent = ' ', string $delimiter = PHP_EOL) - * @method string meta(string $indent = ' ', string $delimiter = PHP_EOL) - * @method string ol(string $text, array $attributes = [], bool $raw = false) - * @method string script(string $indent = ' ', string $delimiter = PHP_EOL) - * @method string style(string $indent = ' ', string $delimiter = PHP_EOL) - * @method string title(string $indent = ' ', string $delimiter = PHP_EOL) - * @method string ul(string $text, array $attributes = [], bool $raw = false) + * @method string a(string $href, string $text, array $attributes = [], bool $raw = false) + * @method string base(string $href, array $attributes = []) + * @method string body(array $attributes = []) + * @method string button(string $text, array $attributes = [], bool $raw = false) + * @method string close(string $tag, bool $raw = false) + * @method Doctype doctype(int $flag, string $delimiter) + * @method string element(string $tag, string $text, array $attributes = [], bool $raw = false) + * @method string form(array $attributes = []) + * @method string img(string $src, array $attributes = []) + * @method Checkbox inputCheckbox(string $name, string $value = null, array $attributes = []) + * @method Color inputColor(string $name, string $value = null, array $attributes = []) + * @method Date inputDate(string $name, string $value = null, array $attributes = []) + * @method DateTime inputDateTime(string $name, string $value = null, array $attributes = []) + * @method DateTimeLocal inputDateTimeLocal(string $name, string $value = null, array $attributes = []) + * @method Email inputEmail(string $name, string $value = null, array $attributes = []) + * @method File inputFile(string $name, string $value = null, array $attributes = []) + * @method Hidden inputHidden(string $name, string $value = null, array $attributes = []) + * @method Image inputImage(string $name, string $value = null, array $attributes = []) + * @method Input inputInput(string $name, string $value = null, array $attributes = []) + * @method Month inputMonth(string $name, string $value = null, array $attributes = []) + * @method Numeric inputNumeric(string $name, string $value = null, array $attributes = []) + * @method Password inputPassword(string $name, string $value = null, array $attributes = []) + * @method Radio inputRadio(string $name, string $value = null, array $attributes = []) + * @method Range inputRange(string $name, string $value = null, array $attributes = []) + * @method Search inputSearch(string $name, string $value = null, array $attributes = []) + * @method Select inputSelect(string $name, string $value = null, array $attributes = []) + * @method Submit inputSubmit(string $name, string $value = null, array $attributes = []) + * @method Tel inputTel(string $name, string $value = null, array $attributes = []) + * @method Text inputText(string $name, string $value = null, array $attributes = []) + * @method Textarea inputTextarea(string $name, string $value = null, array $attributes = []) + * @method Time inputTime(string $name, string $value = null, array $attributes = []) + * @method Url inputUrl(string $name, string $value = null, array $attributes = []) + * @method Week inputWeek(string $name, string $value = null, array $attributes = []) + * @method string label(string $label, array $attributes = [], bool $raw = false) + * @method Link link(string $indent = ' ', string $delimiter = PHP_EOL) + * @method Meta meta(string $indent = ' ', string $delimiter = PHP_EOL) + * @method Ol ol(string $text, array $attributes = [], bool $raw = false) + * @method Script script(string $indent = ' ', string $delimiter = PHP_EOL) + * @method Stype style(string $indent = ' ', string $delimiter = PHP_EOL) + * @method Title title(string $indent = ' ', string $delimiter = PHP_EOL) + * @method Ul ul(string $text, array $attributes = [], bool $raw = false) */ class TagFactory extends AbstractFactory { diff --git a/src/Support/Debug.php b/src/Support/Debug.php index bf0d6d54..f3aa47a7 100644 --- a/src/Support/Debug.php +++ b/src/Support/Debug.php @@ -61,6 +61,18 @@ class Debug */ protected $uri = 'https://assets.phalcon.io/debug/5.0.x/'; + /** + * @var Version + */ + private $version; + + /** + * Constructor setting a reusable version object + */ + public function __construct() + { + } + /** * Clears are variables added previously *