2017 © Pedro Peláez
 

symfony-bundle commons-ensure-bundle

Symfony bundle with static helper functions for checking coding pre-/post-conditions

image

campanda/commons-ensure-bundle

Symfony bundle with static helper functions for checking coding pre-/post-conditions

  • Tuesday, May 8, 2018
  • by helmuthva
  • Repository
  • 4 Watchers
  • 0 Stars
  • 646 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 7 Versions
  • 151 % Grown

The README.md

Campanda/commons-ensure-bundle (campandaCommonsEnsureBundle)

About

The Campanda Commons Ensure Bundle contains static helper functions for checking coding pre-/post-conditions. The check helps to fail early with a EnsureException in the case of missmatched assertions with a meaningful sprintf format message. In comparison to PHP's assert() command, the ensure checks are always enabled., (*1)

The Campanda Commons Ensure Bundle is licensed under the LGPL license version 3.0 (http://www.gnu.org/licenses/lgpl-3.0.html)., (*2)

Installation

  1. Add the bundle to your composer.json and download a matching version by calling
composer require campanda/common-ensure-bundle

Prerequisite: Install Composer, the dependency manager used by modern PHP applications., (*3)

Usage

The following code shows some simple method call using the Ensure Bundle., (*4)

<?php

use campanda\Commons\EnsureBundle\Ensure;

class Foo {

    private $name;

    public function bar($entityName, $num) {
        $this->name = Ensure::isNotEmpty($entityName, 'entityName must not be empty');
        Ensure::isGreaterThan(0, $num, 'num must be positive for entityName [%s]', $entityName);
        // do some stuff...
    }
}

Authors

Campanda GmbHe, (*5)

The Versions

08/05 2018

v1.0.5

1.0.5.0 https://github.com/campanda/commons-ensure-bundle

Symfony bundle with static helper functions for checking coding pre-/post-conditions

  Sources   Download

LGPL-3.0+

The Requires

 

symfony2 sf2 sf3 symfony3 symfony assert ensure defensive coding symfony4 sf4 campanda

07/05 2018

dev-master

9999999-dev https://github.com/campanda/commons-ensure-bundle

Symfony bundle with static helper functions for checking coding pre-/post-conditions

  Sources   Download

LGPL-3.0+

The Requires

 

symfony2 sf2 sf3 symfony3 symfony assert ensure defensive coding symfony4 sf4 campanda

07/05 2018

v1.0.2

1.0.2.0 https://github.com/campanda/commons-ensure-bundle

Symfony bundle with static helper functions for checking coding pre-/post-conditions

  Sources   Download

LGPL-3.0+

The Requires

 

symfony2 sf2 sf3 symfony3 symfony assert ensure defensive coding symfony4 sf4 campanda

07/05 2018

v1.0.3

1.0.3.0 https://github.com/campanda/commons-ensure-bundle

Symfony bundle with static helper functions for checking coding pre-/post-conditions

  Sources   Download

LGPL-3.0+

The Requires

 

symfony2 sf2 sf3 symfony3 symfony assert ensure defensive coding symfony4 sf4 campanda

07/05 2018

v1.0.4

1.0.4.0 https://github.com/campanda/commons-ensure-bundle

Symfony bundle with static helper functions for checking coding pre-/post-conditions

  Sources   Download

LGPL-3.0+

The Requires

 

symfony2 sf2 sf3 symfony3 symfony assert ensure defensive coding symfony4 sf4 campanda

16/12 2016

v1.0.1

1.0.1.0 https://github.com/20steps/commons-ensure-bundle

Symfony bundle with static helper functions for checking coding pre-/post-conditions

  Sources   Download

LGPL-3.0+

The Requires

 

symfony2 sf2 sf3 symfony3 20steps symfony assert ensure defensive coding

14/12 2016

v1.0.0

1.0.0.0 https://github.com/20steps/commons-ensure-bundle

Symfony bundle with static helper functions for checking coding pre-/post-conditions

  Sources   Download

LGPL-3.0+

The Requires

 

symfony2 sf2 sf3 symfony3 20steps symfony assert ensure defensive coding