Download the PHP package phpshots/common-type-alias without Composer
On this page you can find all versions of the php package phpshots/common-type-alias. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phpshots/common-type-alias
More information about phpshots/common-type-alias
Files in phpshots/common-type-alias
Package common-type-alias
Short Description A common library for PHPShots applications providing type alias management functionality.
License MIT
Homepage https://github.com/PHPShots/common
Informations about the package common-type-alias
PHPShots/Common [Type Alias Manager]
A common library for managing type aliases in PHP.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
-
About The Project
- Built With
-
Getting Started
- Prerequisites
- Installation
- Roadmap
- Contributing
- License
- Contact
- Acknowledgments
About The Project
This project is a PHP library designed to create and manage type aliases, making code more readable and maintainable. Type aliases can simplify complex type definitions and enhance the developer experience.
Why Use Type Alias?
- Improves code clarity and reduces redundancy.
- Makes collaboration easier by standardizing types.
- Enhances type safety in your applications.
Feel free to explore and contribute!
Built With
Getting Started
Follow these steps to set up and start using the Type Alias library in your PHP project.
Prerequisites
Before you begin, ensure you have the following installed:
-
PHP (version 8.2 or higher)
- Composer (for dependency management)
Installation
-
Clone the Repository: Start by cloning the repository to your local machine:
-
Navigate to the Project Directory
- Install Dependencies: Use Composer to install the required dependencies:
Basic Setup
-
Include the Library: In your PHP script, include the Composer autoload file to access the Type Alias library:
-
Using the Type Alias Library: Start using the library by creating type aliases. Here’s a basic example:
-
isAlias: Checks if a name is already an alias.
-
removeAbstractAlias: Removes a specific alias from the abstract and aliases list.
-
getAlias: Gets the ultimate alias for an abstract type, following any alias chain.
-
alias: Adds an alias for an abstract type, with checks to prevent self-aliasing.
-
aliasReverse: Provides an alternative alias method with reversed parameter order.
-
getAllAliases: Returns all aliases for a given abstract.
-
clearAliases: Clears all aliases at once.
-
getAliasMap: Returns the entire alias map for quick inspection.
- hasAbstract: Checks if an abstract type has any associated aliases.
-
Roadmap
- [x] Add Changelog
- [x] Add additional features and methods
- [ ] Improve documentation
- [ ] Implement unit tests
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE.txt
for more information.
Contact
Shamavu Rasheed - @hakeem-shamavu - [email protected]
Project Link: https://github.com/hakrichTech/type-alias
Acknowledgments
Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!
- Choose an Open Source License
- GitHub Emoji Cheat Sheet
- Malven's Flexbox Cheatsheet
- Malven's Grid Cheatsheet
- Img Shields
- GitHub Pages
- Font Awesome
- React Icons
(back to top)