public function decorateService($service)
    {
        try {
            foreach ($this->rules as $rule) {
                // if closure returns true
                if ($rule[0]($service)) {
                    // execute the decorate callable
                    $rule[1]($service);
                }
            }
        } catch (\Exception $e) {
            throw new LogicException($e->getMessage(), $e->getCode(), $e);
        }
    }
public function decorateService($service)
    {
        try {
            foreach ($this->rules as $rule) {
                // if closure returns true
                if ($rule[0]($service)) {
                    // execute the decorate callable
                    $rule[1]($service);
                }
            }
        } catch (\Exception $e) {
            throw new LogicException($e->getMessage(), $e->getCode(), $e);
        }
    }
public function decorateService ( $ service ) { try { foreach ( $ this -> rules as $ rule ) { // if closure returns true if ( $ rule [ 0 ] ( $ service ) ) { // execute the decorate callable $ rule [ 1 ] ( $ service ) ; } } } catch ( \ Exception $ e ) { throw new LogicException ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e ) ; } }
Apply decorating rules to a service object if matches

@param  object $service
@return void
@throws LogicException if something goes wrong
@access public
@internal
Apply decorating rules to a service object if matches