2017 © Pedro Peláez
 

project brackets

A small project for working with brackets

image

koind/brackets

A small project for working with brackets

  • Thursday, June 14, 2018
  • by koind
  • Repository
  • 0 Watchers
  • 1 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Brackets

A small project for working with brackets., (*1)

Installation

Run the following command from you terminal:, (*2)

bash composer require "koind/brackets: ^1.0", (*3)

or add this to require section in your composer.json file:, (*4)

"koind/brackets": "^1.0", (*5)

then run composer update, (*6)

Usage

The library accepts a string of the form:, (*7)

(()()()()))((((()()()))(()()()(((())))))), (*8)

And return true if the string is correct - all open parentheses are correctly opened and closed, or false otherwise., (*9)

<?php 

require __DIR__ . '/vendor/autoload.php';

$bracket = new \Koind\Brackets();
$result = $bracket->checkString('(()()()()()()(((()()()()()()((()((((()))))))()()))))');
var_dump($result);

Allowable characters

" , (), \t, \r, \n"

Attention! All other characters are not allowed., (*10)

If you try to send an invalid character, an exception of the type will be thrown: InvalidArgumentException, (*11)

Tests

Run the following command from you terminal:, (*12)

phpunit

The Versions

14/06 2018

dev-master

9999999-dev

A small project for working with brackets

  Sources   Download

MIT

The Requires

  • php ^7.2

 

The Development Requires

by Damir Assilhan

14/06 2018

1.0.0

1.0.0.0

A small project for working with brackets

  Sources   Download

MIT

The Requires

  • php ^7.2

 

The Development Requires

by Damir Assilhan