Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
contributing ...

Javier Spagnoletti phansys

:octocat:
contributing ...
View GitHub Profile
@phansys
phansys / PropertyAccessor.php
Created Aug 24, 2016
Don't use `else/elseif` after `throw` or `return`
View PropertyAccessor.php
private function writeProperty($zval, $property, $value)
{
if (!is_object($zval[self::VALUE])) {
throw new NoSuchPropertyException(sprintf('Cannot write property "%s" to an array. Maybe you should write the property path as "[%s]" instead?', $property, $property));
}
$object = $zval[self::VALUE];
$access = $this->getWriteAccessInfo(get_class($object), $property, $value);
if (self::ACCESS_TYPE_METHOD === $access[self::ACCESS_TYPE]) {
$object->{$access[self::ACCESS_NAME]}($value);
} elseif (self::ACCESS_TYPE_PROPERTY === $access[self::ACCESS_TYPE]) {
View NUBITY-FRONTEND-DEVELOPER.md

Frontend developer

HTML, ECMAScript, CSS

Nubity is searching for a awesome frontend developer with great communication skills, to develop himself as a software architect. You will be 100% focused on the product, understanding their needs and requirements, plus anticipating future trends that will serve their challenges. You will also be excellent at driving results, being able to coordinate large, multi-functional features on time, anticipate bottlenecks,

@phansys
phansys / NUBITY-BACKEND-DEVELOPER.md
Last active Oct 17, 2019
Nubity's Backend Developer opening
View NUBITY-BACKEND-DEVELOPER.md

Backend developer

Linux + Nginx + MySQL + PHP

Nubity is searching for a proactive backend developer with great communication skills, to develop himself as a software architect. You will be 100% focused on the product, understanding their needs and requirements, plus anticipating future trends that will serve their challenges. You will also be excellent at driving results, being able to coordinate large, multi-functional features on time, anticipate bottlenecks,

@phansys
phansys / MyVendor_MyBundle_Cache_CacheInvalidator.php
Created Mar 14, 2013
Added basic comprobation to check valid entity keys.
View MyVendor_MyBundle_Cache_CacheInvalidator.php
<?php
namespace MyVendor\MyBundle\Cache;
/**
* Better than using
* $this->getDoctrine()->getManager()->getConfiguration()->getResultCacheImpl()->delete(...);
* in your controllers
*/
use Doctrine\ORM\Event\OnFlushEventArgs;
use Symfony\Component\DependencyInjection\ContainerAware;