Skip to content

Instantly share code, notes, and snippets.

View hersan's full-sized avatar

Herminio Heredia Santos hersan

View GitHub Profile
<?php
class RandomUserRequest
{
private array $options = [];
public function __construct(array $options)
{
if (!empty($options)) {
foreach ($options as $key => $value) {
@hersan
hersan / ReportFactory
Last active March 27, 2021 02:09
Ejemplo de implementación del Patrón Factory
<?php
namespace App\Services;
use Illuminate\Foundation\Application;
class ReportFactory
{
private $app;
<?php
for($i = 0; $i <= 100; $i++) {
if ( $i % 2 == 0 ) {
echo "$i buzz \n";
}
if ( $i % 3 == 0) {
echo "$i fizz \n";
}
@hersan
hersan / technical_test.php
Created December 5, 2017 23:20
evaluación técnica para reclutamiento 11
<?hp
/*****************************
*
* Prueba para reclutamiento 11
*
******************************/
//P1
function weight_word($string) {