Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

append code / refactor #37

Merged
merged 9 commits into from
Dec 3, 2016
Merged

append code / refactor #37

merged 9 commits into from
Dec 3, 2016

Conversation

ytake
Copy link
Owner

@ytake ytake commented Dec 3, 2016

new aspect / annotations

@PostConstruct

use Ytake\LaravelAspect\Annotation\PostConstruct;

class Something
{
    protected $abstract;
    
    protected $counter = 0;
    
    public function __construct(ExampleInterface $abstract)
    {
        $this->abstract = $abstract;
    }
    
    /**
     * @PostConstruct
     */
    public function init()
    {
        $this->counter += 1;
    }
    
    /**
     * @return int
     */
    public function returning()
    {
        return $this->counter;
    }
}

@RetryOnFailure

use Ytake\LaravelAspect\Annotation\RetryOnFailure;

class ExampleRetryOnFailure
{
    /** @var int */
    public $counter = 0;

    /**
     * @RetryOnFailure(
     *     types={
     *         LogicException::class,
     *     },
     *     attempts=3,
     *     ignore=Exception::class
     * )
     */
    public function ignoreException()
    {
        $this->counter += 1;
        throw new \Exception;
    }
}

@coveralls
Copy link

Coverage Status

Coverage increased (+3.1%) to 98.758% when pulling 8ce0b20 on feature/version-1.5.0 into a2c36c6 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+3.1%) to 98.758% when pulling 8ce0b20 on feature/version-1.5.0 into a2c36c6 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+3.1%) to 98.758% when pulling 7da9b1e on feature/version-1.5.0 into a2c36c6 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+3.1%) to 98.758% when pulling 9080615 on feature/version-1.5.0 into a2c36c6 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+3.1%) to 98.762% when pulling 4734ce7 on feature/version-1.5.0 into a2c36c6 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 96.119% when pulling 54605d7 on feature/version-1.5.0 into a2c36c6 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 96.119% when pulling de4dddb on feature/version-1.5.0 into a2c36c6 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 96.119% when pulling de4dddb on feature/version-1.5.0 into a2c36c6 on master.

@scrutinizer-notifier
Copy link

The inspection completed: 7 new issues, 24 updated code elements

@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 96.119% when pulling ae37492 on feature/version-1.5.0 into a2c36c6 on master.

@ytake ytake merged commit 3340942 into master Dec 3, 2016
@ytake ytake deleted the feature/version-1.5.0 branch December 3, 2016 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants