Skip to content

Commit

Permalink
Feat: add internals (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
TemKaa1337 authored Apr 28, 2024
1 parent fa1d624 commit d20fd49
Show file tree
Hide file tree
Showing 22 changed files with 87 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/tests export-ignore
/.github export-ignore
CODEOWNERS export-ignore
CHANGELOG.md export-ignore
26 changes: 26 additions & 0 deletions .github/workflows/publish-new-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish new tag
on:
pull_request:
types:
- closed
branches:
- master

jobs:
generate-tag:
if: github.event.pull_request.merged == true
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'

- name: Bump version and push tag
uses: anothrNick/github-tag-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
3 changes: 3 additions & 0 deletions CHANGELOD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### v0.0.1
##### Features:
- Base implementation.
3 changes: 3 additions & 0 deletions src/Processor/Condition/CompareProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use Temkaa\SimpleCollections\Model\ConditionInterface;
use Temkaa\SimpleCollections\Trait\ValueRetrieverTrait;

/**
* @internal
*/
final class CompareProcessor implements ProcessorInterface
{
use ValueRetrieverTrait;
Expand Down
3 changes: 3 additions & 0 deletions src/Processor/Condition/ExactlyProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
use Temkaa\SimpleCollections\Model\ConditionInterface;
use Temkaa\SimpleCollections\Trait\ValueRetrieverTrait;

/**
* @internal
*/
final class ExactlyProcessor implements ProcessorInterface
{
use ValueRetrieverTrait;
Expand Down
3 changes: 3 additions & 0 deletions src/Processor/Condition/ProcessorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

use Temkaa\SimpleCollections\Model\ConditionInterface;

/**
* @internal
*/
interface ProcessorInterface
{
public function process(array $elements, ConditionInterface $condition): array;
Expand Down
3 changes: 3 additions & 0 deletions src/Processor/Sort/ByCallbackProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use Temkaa\SimpleCollections\Model\Sort\ByCallback;
use Temkaa\SimpleCollections\Model\SortCriteriaInterface;

/**
* @internal
*/
final class ByCallbackProcessor implements ProcessorInterface
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Processor/Sort/ByFieldProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
use Temkaa\SimpleCollections\Model\SortCriteriaInterface;
use Temkaa\SimpleCollections\Trait\ValueRetrieverTrait;

/**
* @internal
*/
final class ByFieldProcessor implements ProcessorInterface
{
use ValueRetrieverTrait;
Expand Down
3 changes: 3 additions & 0 deletions src/Processor/Sort/ByKeysProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
use Temkaa\SimpleCollections\Model\Sort\ByKeys;
use Temkaa\SimpleCollections\Model\SortCriteriaInterface;

/**
* @internal
*/
final class ByKeysProcessor implements ProcessorInterface
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Processor/Sort/ByValuesProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
use Temkaa\SimpleCollections\Model\Sort\ByValues;
use Temkaa\SimpleCollections\Model\SortCriteriaInterface;

/**
* @internal
*/
final class ByValuesProcessor implements ProcessorInterface
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Processor/Sort/ProcessorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

use Temkaa\SimpleCollections\Model\SortCriteriaInterface;

/**
* @internal
*/
interface ProcessorInterface
{
public function process(array $elements, SortCriteriaInterface $criteria): array;
Expand Down
3 changes: 3 additions & 0 deletions src/Processor/Sum/ByFieldProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use Temkaa\SimpleCollections\Model\SumCriteriaInterface;
use Temkaa\SimpleCollections\Trait\ValueRetrieverTrait;

/**
* @internal
*/
final class ByFieldProcessor implements ProcessorInterface
{
use ValueRetrieverTrait;
Expand Down
3 changes: 3 additions & 0 deletions src/Processor/Sum/DefaultProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

use Temkaa\SimpleCollections\Model\SumCriteriaInterface;

/**
* @internal
*/
final class DefaultProcessor implements ProcessorInterface
{
public function process(array $elements, ?SumCriteriaInterface $criteria): float|int
Expand Down
3 changes: 3 additions & 0 deletions src/Processor/Sum/ProcessorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

use Temkaa\SimpleCollections\Model\SumCriteriaInterface;

/**
* @internal
*/
interface ProcessorInterface
{
public function process(array $elements, ?SumCriteriaInterface $criteria): float|int;
Expand Down
3 changes: 3 additions & 0 deletions src/Processor/Unique/ByFieldProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use Temkaa\SimpleCollections\Model\UniqueCriteriaInterface;
use Temkaa\SimpleCollections\Trait\ValueRetrieverTrait;

/**
* @internal
*/
final class ByFieldProcessor implements ProcessorInterface
{
use ValueRetrieverTrait;
Expand Down
3 changes: 3 additions & 0 deletions src/Processor/Unique/DefaultProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

use Temkaa\SimpleCollections\Model\UniqueCriteriaInterface;

/**
* @internal
*/
final class DefaultProcessor implements ProcessorInterface
{
public function process(array $elements, ?UniqueCriteriaInterface $criteria): array
Expand Down
3 changes: 3 additions & 0 deletions src/Processor/Unique/ProcessorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

use Temkaa\SimpleCollections\Model\UniqueCriteriaInterface;

/**
* @internal
*/
interface ProcessorInterface
{
public function process(array $elements, ?UniqueCriteriaInterface $criteria): array;
Expand Down
3 changes: 3 additions & 0 deletions src/Provider/ConditionProcessorProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
use Temkaa\SimpleCollections\Processor\Condition\ExactlyProcessor;
use Temkaa\SimpleCollections\Processor\Condition\ProcessorInterface;

/**
* @internal
*/
final readonly class ConditionProcessorProvider
{
public function __construct(
Expand Down
3 changes: 3 additions & 0 deletions src/Provider/SortProcessorProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
use Temkaa\SimpleCollections\Processor\Sort\ByValuesProcessor;
use Temkaa\SimpleCollections\Processor\Sort\ProcessorInterface;

/**
* @internal
*/
final readonly class SortProcessorProvider
{
public function __construct(
Expand Down
3 changes: 3 additions & 0 deletions src/Provider/SumProcessorProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
use Temkaa\SimpleCollections\Processor\Sum\DefaultProcessor;
use Temkaa\SimpleCollections\Processor\Sum\ProcessorInterface;

/**
* @internal
*/
final readonly class SumProcessorProvider
{
public function __construct(
Expand Down
3 changes: 3 additions & 0 deletions src/Provider/UniqueProcessorProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
use Temkaa\SimpleCollections\Processor\Unique\DefaultProcessor;
use Temkaa\SimpleCollections\Processor\Unique\ProcessorInterface;

/**
* @internal
*/
final readonly class UniqueProcessorProvider
{
public function __construct(
Expand Down
3 changes: 3 additions & 0 deletions src/Trait/ValueRetrieverTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use ReflectionClass;
use ReflectionException;

/**
* @internal
*/
trait ValueRetrieverTrait
{
/**
Expand Down

0 comments on commit d20fd49

Please sign in to comment.