GithubHelp home page GithubHelp logo

remicollet / collection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ramsey/collection

0.0 2.0 0.0 284 KB

A PHP library for representing and manipulating collections.

License: MIT License

PHP 100.00%

collection's Introduction

ramsey/collection

A PHP library for representing and manipulating collections.

Source Code Download Package PHP Programming Language Build Status Codecov Code Coverage Psalm Type Coverage Read License Package downloads on Packagist Chat with the maintainers

About

ramsey/collection is a PHP library for representing and manipulating collections. Much inspiration for this library comes from the Java Collections Framework.

This project adheres to a code of conduct. By participating in this project and its community, you are expected to uphold this code.

Installation

Install this package as a dependency using Composer.

composer require ramsey/collection

Usage

The latest class API documentation is available online.

Examples of how to use this framework can be found in the Wiki pages.

Contributing

Contributions are welcome! Before contributing to this project, familiarize yourself with CONTRIBUTING.md.

To develop this project, you will need PHP 7.2 or greater and Composer.

After cloning this repository locally, execute the following commands:

cd /path/to/repository
composer install

Now, you are ready to develop!

Tooling

This project uses CaptainHook to validate all staged changes prior to commit.

Composer Commands

To see all the commands available in the project dev namespace for Composer, type:

composer list dev

Coding Standards

This project follows a superset of PSR-12 coding standards, enforced by PHP_CodeSniffer. The project PHP_CodeSniffer configuration may be found in phpcs.xml.dist.

CaptainHook will run PHP_CodeSniffer before committing. It will attempt to fix any errors it can, and it will reject the commit if there are any un-fixable issues. Many issues can be fixed automatically and will be done so pre-commit.

You may lint the entire codebase using PHP_CodeSniffer with the following commands:

# Lint
composer dev:lint

# Lint and autofix
composer dev:lint:fix

Static Analysis

This project uses a combination of PHPStan and Psalm to provide static analysis of PHP code. Configurations for these are in phpstan.neon.dist and psalm.xml, respectively.

CaptainHook will run PHPStan and Psalm before committing. The pre-commit hook does not attempt to fix any static analysis errors. Instead, the commit will fail, and you must fix the errors manually.

You may run static analysis manually across the whole codebase with the following command:

# Static analysis
composer dev:analyze

Project Structure

This project uses pds/skeleton as its base folder structure and layout.

Copyright and License

The ramsey/collection library is copyright © Ben Ramsey and licensed for use under the terms of the MIT License (MIT). Please see LICENSE for more information.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.