2017 © Pedro Peláez
 

library errors

Collects and render errors

image

icanboogie/errors

Collects and render errors

  • Saturday, April 15, 2017
  • by olvlvl
  • Repository
  • 1 Watchers
  • 1 Stars
  • 4,495 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Errors

Release Code Quality Code Coverage Packagist, (*1)

Collects formatted errors., (*2)

Installation

composer require icanboogie/errors

Usage

<?php

use ICanBoogie\ErrorCollection;

$errors = new ErrorCollection;

var_dump($errors['password']);
// null

$errors->add('password');
var_dump($errors['password']);
// [ Error{ format: '', params: [] } ]

$errors->add('password', 'Invalid password: {value}', [ 'value' => "123" ]);
var_dump($errors['password']);
// 'Invalid password: 123'

$errors['password'] = 'Ugly password';
var_dump($errors['password']);
// array('Invalid password', 'Ugly password')

$errors->add_generic('General error');
count($errors);
// 3

$errors->each(function($name, $message) {

    echo "$name: $message\n";

});
// General error
// password: Invalid password
// password: Ugly password

Continuous Integration

The project is continuously tested by GitHub actions., (*3)

Tests Static Analysis Code Style, (*4)

Code of Conduct

This project adheres to a Contributor Code of Conduct. By participating in this project and its community, you are expected to uphold this code., (*5)

Contributing

Please see CONTRIBUTING for details., (*6)

License

icanboogie/errors is released under the BSD-3-Clause., (*7)

The Versions

15/04 2017

dev-master

9999999-dev https://icanboogie.org/

Collects and render errors

  Sources   Download

BSD-3-Clause

The Requires

 

errors

15/04 2017

2.0.1.x-dev

2.0.1.9999999-dev https://icanboogie.org/

Collects and render errors

  Sources   Download

BSD-3-Clause

The Requires

 

errors

15/04 2017

v2.0.1

2.0.1.0 https://icanboogie.org/

Collects and render errors

  Sources   Download

BSD-3-Clause

The Requires

 

errors

05/03 2017

v2.0.0

2.0.0.0 https://icanboogie.org/

Collects and render errors

  Sources   Download

BSD-3-Clause

The Requires

 

errors

29/08 2015

v1.0.1

1.0.1.0 http://icanboogie.org/

An error collector

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

errors

12/04 2014

v1.0.0

1.0.0.0 http://icanboogie.org/

An error collector

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

errors