update inbox list

This commit is contained in:
manhlab
2021-04-07 19:25:18 -04:00
parent fda7245f7c
commit 436de2efd6
8576 changed files with 1013325 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
preset: laravel
disabled:
- single_class_element_per_statement
- self_accessor

View File

@@ -0,0 +1,7 @@
# Changelog
All notable changes to `ignition-contracts` will be documented in this file
## 1.0.0 - 2019-08-30
- initial release

View File

@@ -0,0 +1,55 @@
# Contributing
Contributions are **welcome** and will be fully **credited**.
Please read and understand the contribution guide before creating an issue or pull request.
## Etiquette
This project is open source, and as such, the maintainers give their free time to build and maintain the source code
held within. They make the code freely available in the hope that it will be of use to other developers. It would be
extremely unfair for them to suffer abuse or anger for their hard work.
Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
world that developers are civilized and selfless people.
It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.
## Viability
When requesting or submitting new features, first consider whether it might be useful to others. Open
source projects are used by many developers, who may have entirely different needs to your own. Think about
whether or not your feature is likely to be used by other users of the project.
## Procedure
Before filing an issue:
- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
- Check to make sure your feature suggestion isn't already present within the project.
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
- Check the pull requests tab to ensure that the feature isn't already in progress.
Before submitting a pull request:
- Check the codebase to ensure that your feature doesn't already exist.
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
## Requirements
If the project maintainer has any additional requirements, you will find them listed here.
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer).
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
**Happy coding**!

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) Facade <info@facade.company>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,36 @@
# Flare contracts
[![Latest Version on Packagist](https://img.shields.io/packagist/v/facade/ignition-contracts.svg?style=flat-square)](https://packagist.org/packages/facade/ignition-contracts)
[![Build Status](https://img.shields.io/circleci/build/gh/spatie/ignition-contracts/master.svg?token=d92a2ec635d3e408b1df80ba214a5e8d549dea09&style=flat-square)](https://travis-ci.org/facade/ignition-contracts)
[![Quality Score](https://img.shields.io/scrutinizer/g/facade/ignition-contracts.svg?style=flat-square)](https://scrutinizer-ci.com/g/facade/ignition-contracts)
[![Total Downloads](https://img.shields.io/packagist/dt/facade/ignition-contracts.svg?style=flat-square)](https://packagist.org/packages/facade/ignition-contracts)
This repository contains the interfaces used to display solution on [Ignition](https://flareapp.io/docs/ignition-for-laravel/introduction) and [Flare](https://flareapp.io.).
![Screenshot of solution](https://facade.github.io/ignition-contracts/screenshot.png)
## Documentation
You can find the documentation of this package at [the docs of Flare](https://flareapp.io/docs/solutions/introduction).
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Testing
``` bash
composer test
```
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Security
If you discover any security related issues, please email support@flareapp.io instead of using the issue tracker.
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

View File

@@ -0,0 +1,18 @@
<?php
namespace Facade\IgnitionContracts\Tests;
use Facade\IgnitionContracts\BaseSolution;
use PHPUnit\Framework\TestCase;
class SolutionTest extends TestCase
{
/** @test */
public function it_can_instanciate_a_base_solution()
{
$solution = BaseSolution::create('my title');
$this->assertInstanceOf(BaseSolution::class, $solution);
}
}

View File

@@ -0,0 +1,40 @@
{
"name": "facade/ignition-contracts",
"description": "Solution contracts for Ignition",
"keywords": [
"flare",
"contracts",
"ignition"
],
"homepage": "https://github.com/facade/ignition-contracts",
"license": "MIT",
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://flareapp.io",
"role": "Developer"
}
],
"require": {
"php": "^7.1"
},
"autoload": {
"psr-4": {
"Facade\\IgnitionContracts\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Facade\\IgnitionContracts\\Tests\\": "tests"
}
},
"scripts": {
"test": "vendor/bin/phpunit",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
},
"config": {
"sort-packages": true
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 KiB

View File

@@ -0,0 +1,56 @@
<?php
namespace Facade\IgnitionContracts;
class BaseSolution implements Solution
{
protected $title;
protected $description;
protected $links = [];
public static function create(string $title)
{
return new static($title);
}
public function __construct(string $title)
{
$this->title = $title;
}
public function getSolutionTitle(): string
{
return $this->title;
}
public function setSolutionTitle(string $title): self
{
$this->title = $title;
return $this;
}
public function getSolutionDescription(): string
{
return $this->description;
}
public function setSolutionDescription(string $description): self
{
$this->description = $description;
return $this;
}
public function getDocumentationLinks(): array
{
return $this->links;
}
public function setDocumentationLinks(array $links): self
{
$this->links = $links;
return $this;
}
}

View File

@@ -0,0 +1,14 @@
<?php
namespace Facade\IgnitionContracts;
use Throwable;
interface HasSolutionsForThrowable
{
public function canSolve(Throwable $throwable): bool;
/** \Facade\IgnitionContracts\Solution[] */
public function getSolutions(Throwable $throwable): array;
}

View File

@@ -0,0 +1,8 @@
<?php
namespace Facade\IgnitionContracts;
interface ProvidesSolution
{
public function getSolution(): Solution;
}

View File

@@ -0,0 +1,14 @@
<?php
namespace Facade\IgnitionContracts;
interface RunnableSolution extends Solution
{
public function getSolutionActionDescription(): string;
public function getRunButtonText(): string;
public function run(array $parameters = []);
public function getRunParameters(): array;
}

View File

@@ -0,0 +1,12 @@
<?php
namespace Facade\IgnitionContracts;
interface Solution
{
public function getSolutionTitle(): string;
public function getSolutionDescription(): string;
public function getDocumentationLinks(): array;
}

View File

@@ -0,0 +1,21 @@
<?php
namespace Facade\IgnitionContracts;
use Throwable;
interface SolutionProviderRepository
{
public function registerSolutionProvider(string $solutionProviderClass): self;
public function registerSolutionProviders(array $solutionProviderClasses): self;
/**
* @param Throwable $throwable
* @return HasSolutionsForThrowable[]
*/
public function getSolutionsForThrowable(Throwable $throwable): array;
public function getSolutionForClass(string $solutionClass): ?Solution;
}