Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
2bd95e0
Update README to reflect `architecture/foundation-support` branch and…
danijelgalic Jul 28, 2026
5740ed4
Add `Str` base value object type for immutable string semantics
danijelgalic Jul 28, 2026
1f4b519
Enhance `ValueObject` comparison semantics and extend `Str` class wit…
danijelgalic Jul 30, 2026
b22d9b0
Implement `Stringable` support in `Str` and add `__toString()` method
danijelgalic Aug 7, 2026
5af01f3
Refactor `Str` class by introducing `StringValue` as the new base, ad…
danijelgalic Aug 7, 2026
1196d70
Add `toChars` method to `Str` for converting strings to a list of `Ch…
danijelgalic Aug 7, 2026
2a049b4
Add `Boolean` base value object type for immutable boolean semantics
danijelgalic Aug 7, 2026
e448f64
Add base numeric Value Object classes for integer and decimal types
danijelgalic Aug 18, 2026
84a0808
Add base numeric Value Object classes for integer and decimal types
danijelgalic Aug 18, 2026
b73141b
Add Format and Real classes for numeric representation in FireHub Core
danijelgalic Aug 18, 2026
62f68b6
Remove `Decimal` abstract class from Core-Standard
danijelgalic Aug 20, 2026
9892d77
Add `isTrue` and `isFalse` methods to `Boolean` base class
danijelgalic Aug 20, 2026
5e53c87
Refactor Boolean class methods for improved clarity and consistency
danijelgalic Aug 20, 2026
f237eee
Add `codepoint` method to `Char` for Unicode code point retrieval
danijelgalic Aug 20, 2026
9bacc0c
Introduce `Codepoint` Value Object for Unicode support and update `Ch…
danijelgalic Aug 20, 2026
b9ab7ed
Add numeric state-checking methods to `Number` and `Real` classes
danijelgalic Aug 20, 2026
3588e1d
Add `Format` Enum for Standardized Temporal Formats in FireHub Core
danijelgalic Aug 21, 2026
f15663f
Add base Temporal Value Objects: `Time`, `Date`, and `DateTime`
danijelgalic Aug 21, 2026
5697899
Add `Date`, `Time`, and `DateTime` value objects with associated exce…
danijelgalic Aug 21, 2026
777f09e
Add `zone` and `withZone` methods to `DateTime` contract
danijelgalic Aug 21, 2026
cd12466
Remove `Date`, `Time`, and `DateTime` abstract value objects from Core
danijelgalic Aug 21, 2026
d47c915
Reintroduce abstract `DateTime` Value Object in Core
danijelgalic Aug 21, 2026
1b8c22d
Fix parameter name in `withZone` method of `DateTime` contract
danijelgalic Aug 21, 2026
2e32f3e
Extract `zone` and `withZone` methods from `DateTime` to new `Timezon…
danijelgalic Aug 24, 2026
5ee3d59
Update PHPDoc for `Timezone` to simplify `@template` annotation
danijelgalic Aug 25, 2026
cab6a3c
Add `timezone` and `withTimezone` methods to `DateTime` contract
danijelgalic Aug 25, 2026
24b824d
Update PHPDoc for `DateTime::timezone` and `DateTime::withTimezone` c…
danijelgalic Aug 25, 2026
99f2e04
Add `Country` enum to define recognized world countries in the Geo model
danijelgalic Aug 25, 2026
847bea6
Extend `Country` enum with ISO3166 support and additional helper methods
danijelgalic Aug 25, 2026
db177fd
Refine `Country` enum return types for clearer nullability
danijelgalic Aug 25, 2026
2c0b69d
Remove `withEncoding` method from `StringValue` Value Object
danijelgalic Aug 26, 2026
01047cf
Remove `withTimezone` method from `DateTime` contract
danijelgalic Aug 26, 2026
f3fe593
Add `Timestamp` and `Epoch` abstractions to support immutable tempora…
danijelgalic Aug 26, 2026
dd190a5
Add comprehensive date and time format abstractions
danijelgalic Aug 27, 2026
60b25fe
Add `Unit` enum to define basic temporal units
danijelgalic Aug 27, 2026
98e140a
Add `Ordinal`, `Relative`, `DateKeyword`, and `TimeKeyword` enums to …
danijelgalic Aug 27, 2026
641f55a
Split `TimeKeyword` into `Keyword` and removed unused `NOON` case.
danijelgalic Aug 27, 2026
146c451
Add `WEEKDAY` case and refine `base` and `factor` logic in `Unit` enum
danijelgalic Aug 27, 2026
7e2e438
Refactor temporal unit system and introduce `ExtendedUnit` enum
danijelgalic Aug 28, 2026
51eb94a
Introduce `Period` abstract Value Object as a base for temporal types
danijelgalic Aug 28, 2026
a1a47a2
Refine `base` method in `ExtendedUnit` enum
danijelgalic Aug 28, 2026
49cfd36
Introduce `Timespan` abstract Value Object for base temporal timespan…
danijelgalic Aug 31, 2026
eb157b8
Introduce `Components` abstract Value Object for Timespan elements
danijelgalic Aug 31, 2026
672bbaa
Add `duration` abstract method to `Period` Value Object
danijelgalic Sep 1, 2026
38883c1
Introduce `Interval` abstract Value Object for temporal types
danijelgalic Sep 1, 2026
62ef729
Introduce foundational contracts for core data structures
danijelgalic Sep 1, 2026
257ebbc
Refine `Vector` interface to generalize template parameter
danijelgalic Sep 1, 2026
e66e872
Add `getIterator()` method to `Enumerable` interface
danijelgalic Sep 2, 2026
4a9039c
Add `Cloneable` interface to define deep copy behavior
danijelgalic Sep 3, 2026
ab686eb
Introduce `Maybe` abstract type to represent optional values
danijelgalic Sep 3, 2026
0a4f736
Add `MutationOutcome` enum to represent mutation operation results
danijelgalic Sep 3, 2026
dcaa56c
Add `Iteration` and `Traversal` interfaces for iterable value contracts
danijelgalic Sep 4, 2026
a792f7a
Update badges in README to point to the `architecture/foundation-supp…
danijelgalic Sep 4, 2026
24edc88
Add `module_meta` component to Codecov configuration
danijelgalic Sep 4, 2026
fc03fb9
Add BidirectionalIteration and BidirectionalTraversal interfaces for …
danijelgalic Sep 9, 2026
93e0d5b
Add foundational capability interfaces for mutation, access, and meas…
danijelgalic Sep 10, 2026
17219e3
Update namespace references in mutation capability interfaces
danijelgalic Sep 10, 2026
dd68993
Enhance `Vector` and `Collection` interfaces with additional contract…
danijelgalic Sep 10, 2026
d4cee9b
Extend `Vector` interface with `BoundaryAccess` for enhanced access s…
danijelgalic Sep 10, 2026
5d341c2
Enhance `Maybe` type with `value()` method and introduce `NoValueExce…
danijelgalic Sep 10, 2026
f655189
Add foundational `Arrayable` and `Jsonable` capability interfaces for…
danijelgalic Sep 10, 2026
052dc09
Update PHPDoc in `IndexMutation` to include `NOT_FOUND` mutation outcome
danijelgalic Sep 10, 2026
ea686a6
Add foundational `Forkable` capability interface for cloning mutable …
danijelgalic Sep 15, 2026
3dfcfd0
Add `Linear` classification to `Vector` and introduce `Deque` interfa…
danijelgalic Sep 15, 2026
9e0b769
Update `Deque` PHPDoc to replace `IndexAccess` with `BoundaryAccess` …
danijelgalic Sep 15, 2026
a63cc39
Refactor `BoundaryAccess` to split front and back boundary capabilities
danijelgalic Sep 15, 2026
3a37c75
Add new `Stack` interface and adjust imports in `Vector` and `Deque`
danijelgalic Sep 15, 2026
7310563
Add `Queue` interface to represent first-in, first-out linear collect…
danijelgalic Sep 15, 2026
0e61204
Add `Unordered` and `Associative` interfaces for data structure class…
danijelgalic Sep 15, 2026
56f944e
Add `Map` interface to define key-value associative collections and r…
danijelgalic Sep 15, 2026
9f27294
Remove `BoundaryAccess` from `Map` interface to simplify key-value co…
danijelgalic Sep 16, 2026
4bfcc91
Remove redundant `BoundaryAccess` inheritance from `Map` interface
danijelgalic Sep 16, 2026
8b87737
Add `Set`, `ValueAccess`, and `ValueMutation` interfaces; enhance `Mu…
danijelgalic Sep 16, 2026
2e24417
Add `MultiplicityAccess`, `MultiplicityMutation`, `Bag`, and `Distinc…
danijelgalic Sep 17, 2026
671d376
Refactor `MultiplicityMutation` interface to return `MutationOutcome`
danijelgalic Sep 17, 2026
800c438
Clarify `MultiplicityMutation::add` outcome documentation
danijelgalic Sep 17, 2026
a78fa20
Add `Stream` interface for lazy, non-materialized sequences
danijelgalic Sep 17, 2026
29ed03c
Add `Record`, `Struct`, and `Tuple` interfaces for structured data re…
danijelgalic Sep 17, 2026
bc82a19
Align `Struct` interface semantics with `Unordered` classification
danijelgalic Sep 17, 2026
597f192
Remove redundant `BoundaryAccess` inheritance from `Tuple` interface
danijelgalic Sep 17, 2026
6321d9c
Add `Metrics` capability to `Record` interface
danijelgalic Sep 18, 2026
6fc2bec
Add `Freezable` and `Thawable` capabilities to support immutable and …
danijelgalic Sep 18, 2026
6661e2e
Add `Filterable` and `Mappable` capabilities for value transformation…
danijelgalic Sep 21, 2026
88c6818
Refine `Mappable` interface return type for consistent value transfor…
danijelgalic Sep 21, 2026
8bbc921
Add `Rejectable` capability for excluding elements based on predicates
danijelgalic Sep 21, 2026
3c089b4
Add `Sortable` and `KeySortable` capabilities for data structure orde…
danijelgalic Sep 25, 2026
16633d2
Extend `Sortable` and `KeySortable` interfaces with default ordering …
danijelgalic Sep 25, 2026
49549aa
Extend `Sortable` and `KeySortable` interfaces with custom sorting al…
danijelgalic Sep 25, 2026
99c7acc
Extend `SortAlgorithm` interface with element replacement capability
danijelgalic Sep 25, 2026
3a0e2f5
Add `DistributionSortable` and `DistributionSortAlgorithm` capabiliti…
danijelgalic Sep 28, 2026
7df6942
Refine `DistributionSortable` and `DistributionSortAlgorithm` for enh…
danijelgalic Sep 28, 2026
935aa9e
Mark `$algorithm` parameter as `[optional]` in `Sortable` and `KeySor…
danijelgalic Sep 28, 2026
623b3fb
Update `NativeRuntime` class to require PHP 8.2 and use `readonly`
danijelgalic Sep 29, 2026
a4f36c2
Add `start` and `end` methods to `Period` for temporal boundary access
danijelgalic Sep 29, 2026
aaa17cd
"Add InvalidIntervalTimespanException and update Interval with Enumer…
danijelgalic Sep 29, 2026
32cd0ea
Add `Concatenable` and `Mergeable` interfaces for transformation capa…
danijelgalic Sep 30, 2026
757755e
Add `KeyMappable` interface for key transformation capabilities
danijelgalic Oct 1, 2026
f5ade29
Add `IndexReplacement` and `KeyReplacement` interfaces for mutation c…
danijelgalic Oct 1, 2026
ab71354
Add `RandomSelectable` interface for random value selection capabilities
danijelgalic Oct 2, 2026
c593480
Expand return type in `RandomSelectable::random` for mixed value support
danijelgalic Oct 2, 2026
e3ed304
Add `Entry` value object for key-value pair representation
danijelgalic Oct 2, 2026
09a0985
Add `Hierarchical` and `Tree` interfaces for hierarchical data struct…
danijelgalic Oct 5, 2026
69ae54a
Add hierarchical capabilities and tree-related abstractions
danijelgalic Oct 5, 2026
314940e
No changes made; removed unnecessary whitespace in `Tree.php` imports.
danijelgalic Oct 5, 2026
ffa8a7b
"Refine `AncestorIteration` and `DescendantIteration` signatures to e…
danijelgalic Oct 5, 2026
1f2adea
"Add `Depth` and `Height` capabilities to `Tree` interface
danijelgalic Oct 5, 2026
bb13982
Add `SiblingIteration` interface and refine PHPDoc in `DescendantIter…
danijelgalic Oct 5, 2026
b699366
Add `SiblingIteration` to `Tree` interface
danijelgalic Oct 5, 2026
c99b926
Remove tree-related hierarchical abstractions from Core-Standard
danijelgalic Oct 5, 2026
343a453
Add `Searchable` interface for value lookup capability
danijelgalic Oct 7, 2026
33a50a7
Import `Linear` classification in `Stream` data structure
danijelgalic Oct 9, 2026
76f5b35
Reorder `use` statements for classification imports in `Stream.php`
danijelgalic Oct 9, 2026
1607b84
**Rename `InvalidUtf8Exception` to `InvalidEncodingException` and upd…
danijelgalic Oct 9, 2026
340b377
**Add `IndexInsertion` interface for value insertion capability**
danijelgalic Oct 9, 2026
46f3b9d
Add `Insertion` interface for general value insertion capability
danijelgalic Oct 12, 2026
fb0a9e2
Add `Heap` and `PriorityQueue` abstractions to the Core data structures
danijelgalic Oct 12, 2026
61f3500
Add `Entry` value object to `PriorityQueue` data structure
danijelgalic Oct 12, 2026
af0f64c
Update README badges and restructure branch documentation for develop
danijelgalic Oct 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ component_management:
- "src/Exception/**"
coverage:
target: 80%
- component_id: module_meta
name: meta
paths:
- "src/Meta/**"
coverage:
target: 80%
- component_id: module_type
name: type
paths:
Expand Down
55 changes: 55 additions & 0 deletions src/Boundary/Algorithm/Sorting/DistributionSortAlgorithm.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php declare(strict_types = 1);

/**
* This file is part of the FireHub Project ecosystem
*
* @author Danijel Galić <danijel.galic@outlook.com>
* @copyright 2026-present The FireHub Project - All rights reserved
* @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
*
* @php-version >=7.4
* @package Core
*/

namespace FireHub\Core\Boundary\Algorithm\Sorting;

/**
* ### Defines a distribution sorting algorithm
*
* Defines the contract for non-comparison sorting algorithms that distribute elements according to numeric keys
* extracted from their values.
*
* Unlike comparison-based sorting algorithms, distribution sorting algorithms do not determine ordering by repeatedly
* comparing pairs of elements. Instead, they use the structure or distribution of extracted numeric keys to place
* elements into their resulting order.
* @since 1.0.0
*
* @template TElement
* @template TKey of int|float
*/
interface DistributionSortAlgorithm {

/**
* ### Sorts elements
*
* Sorts elements addressed by sequential positions according to integer keys extracted from their values.
* @since 1.0.0
*
* @param non-negative-int $size <p>
* Number of elements to sort.
* </p>
* @param callable(non-negative-int):TElement $element <p>
* Callback used to retrieve an element by its sequential position.
* </p>
* @param callable(non-negative-int, TElement):void $set <p>
* Callback used to replace an element at its sequential position.
* </p>
* @param callable(TElement):TKey $key <p>
* Callback used to extract the integer distribution key from an element.
* </p>
*
* @return void
*/
public function sort (int $size, callable $element, callable $set, callable $key):void;

}
61 changes: 61 additions & 0 deletions src/Boundary/Algorithm/Sorting/SortAlgorithm.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php declare(strict_types = 1);

/**
* This file is part of the FireHub Project ecosystem
*
* @author Danijel Galić <danijel.galic@outlook.com>
* @copyright 2026-present The FireHub Project - All rights reserved
* @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
*
* @php-version >=7.4
* @package Core
*/

namespace FireHub\Core\Boundary\Algorithm\Sorting;

/**
* ### Sorting algorithm
*
* Defines a strategy for ordering elements within an indexed range.
*
* Elements are addressed internally by sequential positions, independently of the keys or indexes used by their
* underlying representation. This allows the algorithm to operate on sequential values, key-value entries, and other
* ordered representations without depending on their storage semantics.
*
* Sorting is performed in place through the supplied access and swap operations.
* @since 1.0.0
*
* @template TElement
*/
interface SortAlgorithm {

/**
* ### Sorts elements
*
* Rearranges the specified number of elements according to the supplied comparison callback.
*
* The callback must return a value less than zero when the first element should precede the second, zero when both
* elements compare equally, or a value greater than zero when the first element should follow the second.
* @since 1.0.0
*
* @param non-negative-int $size <p>
* Number of elements to sort.
* </p>
* @param callable(non-negative-int):TElement $element <p>
* Callback used to retrieve an element by its internal position.
* </p>
* @param callable(non-negative-int, TElement):void $set <p>
* Callback used to replace an element at its sequential position.
* </p>
* @param callable(non-negative-int, non-negative-int):void $swap <p>
* Callback used to exchange two elements by their internal positions.
* </p>
* @param callable(TElement, TElement):int $comparator <p>
* Callback used to compare two elements.
* </p>
*
* @return void
*/
public function sort (int $size, callable $element, callable $set, callable $swap, callable $comparator):void;

}
41 changes: 41 additions & 0 deletions src/Boundary/Capability/Access/BackAccess.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php declare(strict_types = 1);

/**
* This file is part of the FireHub Project ecosystem
*
* @author Danijel Galić <danijel.galic@outlook.com>
* @copyright 2026-present The FireHub Project - All rights reserved
* @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
*
* @php-version >=7.4
* @package Core
*/

namespace FireHub\Core\Boundary\Capability\Access;

use FireHub\Core\Type\Maybe;

/**
* ### Defines access to the back boundary value
*
* Back access provides read-only access to the last value of an ordered sequence.
*
* The capability defines the fundamental operation for retrieving the value at the back boundary without
* prescribing how values are stored, organized, or represented internally.
* @since 1.0.0
*
* @template TValue
*/
interface BackAccess {

/**
* ### Returns the last value
*
* Returns the value at the end of the sequence when it exists.
* @since 1.0.0
*
* @return \FireHub\Core\Type\Maybe<TValue|mixed> The last value, or an empty Maybe if no value exists.
*/
public function last ():Maybe;

}
30 changes: 30 additions & 0 deletions src/Boundary/Capability/Access/BoundaryAccess.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php declare(strict_types = 1);

/**
* This file is part of the FireHub Project ecosystem
*
* @author Danijel Galić <danijel.galic@outlook.com>
* @copyright 2026-present The FireHub Project - All rights reserved
* @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
*
* @php-version >=7.0
* @package Core
*/

namespace FireHub\Core\Boundary\Capability\Access;

/**
* ### Defines access to boundary values
*
* Boundary access provides read-only access to the first and last values of an ordered sequence.
*
* The capability defines the fundamental operations for retrieving values at the boundaries without prescribing
* how values are stored, organized, or represented internally.
* @since 1.0.0
*
* @template TValue
*
* @extends \FireHub\Core\Boundary\Capability\Access\FrontAccess<TValue>
* @extends \FireHub\Core\Boundary\Capability\Access\BackAccess<TValue>
*/
interface BoundaryAccess extends FrontAccess, BackAccess {}
41 changes: 41 additions & 0 deletions src/Boundary/Capability/Access/FrontAccess.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php declare(strict_types = 1);

/**
* This file is part of the FireHub Project ecosystem
*
* @author Danijel Galić <danijel.galic@outlook.com>
* @copyright 2026-present The FireHub Project - All rights reserved
* @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
*
* @php-version >=7.4
* @package Core
*/

namespace FireHub\Core\Boundary\Capability\Access;

use FireHub\Core\Type\Maybe;

/**
* ### Defines access to the front boundary value
*
* Front access provides read-only access to the first value of an ordered sequence.
*
* The capability defines the fundamental operation for retrieving the value at the front boundary without
* prescribing how values are stored, organized, or represented internally.
* @since 1.0.0
*
* @template TValue
*/
interface FrontAccess {

/**
* ### Returns the first value
*
* Returns the value at the beginning of the sequence when it exists.
* @since 1.0.0
*
* @return \FireHub\Core\Type\Maybe<TValue|mixed> The first value, or an empty Maybe if no value exists.
*/
public function first ():Maybe;

}
60 changes: 60 additions & 0 deletions src/Boundary/Capability/Access/IndexAccess.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php declare(strict_types = 1);

/**
* This file is part of the FireHub Project ecosystem
*
* @author Danijel Galić <danijel.galic@outlook.com>
* @copyright 2026-present The FireHub Project - All rights reserved
* @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
*
* @php-version >=7.4
* @package Core
*/

namespace FireHub\Core\Boundary\Capability\Access;

use FireHub\Core\Type\Maybe;

/**
* ### Defines indexed access to values
*
* Indexed access provides read-only access to values identified by an integer index.
*
* The capability defines the fundamental operations for determining whether an index exists and retrieving the
* value associated with it, without prescribing how values are stored, organized, or represented internally.
* @since 1.0.0
*
* @template TValue
*/
interface IndexAccess {

/**
* ### Determines whether an index exists
*
* Determines whether a value is available at the specified index.
* @since 1.0.0
*
* @param int $index <p>
* The index to check.
* </p>
*
* @return bool True if the index exists, false otherwise.
*/
public function has (int $index):bool;

/**
* ### Returns the value at the specified index
*
* Returns the value currently stored at the specified index.
* @since 1.0.0
*
* @param int $index <p>
* The zero-based index of the value to retrieve.
* </p>
*
* @return \FireHub\Core\Type\Maybe<TValue|mixed> The value at the specified index, or an empty Maybe if the index
* does not exist.
*/
public function get (int $index):Maybe;

}
56 changes: 56 additions & 0 deletions src/Boundary/Capability/Access/KeyAccess.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php declare(strict_types = 1);

/**
* This file is part of the FireHub Project ecosystem
*
* @author Danijel Galić <danijel.galic@outlook.com>
* @copyright 2026-present The FireHub Project - All rights reserved
* @license https://opensource.org/license/Apache-2-0 Apache License, Version 2.0
*
* @php-version >=7.4
* @package Core
*/

namespace FireHub\Core\Boundary\Capability\Access;

use FireHub\Core\Type\Maybe;

/**
* ### Defines key-based access to values
*
* Key access provides read-only access to values identified by their keys.
*
* The capability defines the fundamental operations for determining whether a key exists and retrieving the value
* associated with it, without prescribing how values are stored, organized, or represented internally.
* @since 1.0.0
*
* @template TKey
* @template TValue
*/
interface KeyAccess {

/**
* ### Determines whether a key exists
* @since 1.0.0
*
* @param TKey $key <p>
* The key to check.
* </p>
*
* @return bool True if a value exists for the specified key, false otherwise.
*/
public function has (mixed $key):bool;

/**
* ### Returns the value associated with the specified key
* @since 1.0.0
*
* @param TKey $key <p>
* The key whose value should be returned.
* </p>
*
* @return \FireHub\Core\Type\Maybe<TValue|mixed> The associated value, or an empty Maybe if the key does not exist.
*/
public function get (mixed $key):Maybe;

}
Loading
Loading