Skip to content

Commit

Permalink
Compliance with PSR1.
Browse files Browse the repository at this point in the history
All documentation was added to the code through comments.
Improved naming of some methods.
Improvement of the scope of some methods.
Improvements in the analysis of variables.
  • Loading branch information
arcanisgk committed Feb 26, 2021
1 parent 1268600 commit 5bfacf5
Show file tree
Hide file tree
Showing 2 changed files with 318 additions and 87 deletions.
40 changes: 31 additions & 9 deletions example/index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* This example shows how the BOHBasicOutputHandler class and its methods are declared.
*/

//Import the PHPMailer class into the global namespace
use \IcarosNet\BOHBasicOutputHandler as Output;

require __DIR__ . '\..\vendor\autoload.php';
Expand All @@ -15,11 +20,20 @@ function foo_function()
}
}

/**
* $var_class is a variable storage of instance class FooBar.
*/
$var_class = new FooBar;

/**
* $example_single is a short variable to use as an example.
*/
$example_single = 'Hello World';

$example_array = [//1
/**
* $example_array is a large array variable to use as an example.
*/
$example_array = [
'null' => null,
'null_text' => 'null',
'integer' => 10,
Expand All @@ -37,19 +51,19 @@ function foo_function()
'datetime_4' => '2021-Jan-17 17:31:00',
'currency_1' => '1.45$',
'currency_2' => 'db£ 1.45 ₹',
'array' => [//2
'array' => [
'boolean_true' => true,
'boolean_false' => false,
'boolean_true_text' => 'true',
'boolean_false_text' => 'false',
'object' => (object) [//3
'object' => (object) [
'key_index_most' => 'Hello Wolrd',
'joder' => [//4
'joder' => [
'prueba' => 'prueba',
]
],
'nested' => [ // deep = 3 no cuenta ya existe
'other_obj' => (object) [ // deep = 4 no cuenta ya existe
'nested' => [
'other_obj' => (object) [
'apple',
'banana',
'coconut',
Expand All @@ -63,8 +77,16 @@ function foo_function()
],
];

//Instance Class BOHBasicOutputHandler
$output = new Output\OutputHandler();
$output->Theme('monokai');
$output->Output($example_array);

// Other Examples:
//Theme Selection
$output->theme('monokai');

//example 1:
$output->output($example_array);

$output->theme('natural-flow');
//example 2:
$output->output($example_array);

Loading

0 comments on commit 5bfacf5

Please sign in to comment.