Skip to content

Commit d711599

Browse files
committed
Merge branch 'release/0.7.3'
2 parents 382b469 + 1f625e0 commit d711599

File tree

23 files changed

+148
-145
lines changed

23 files changed

+148
-145
lines changed

.version.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"strategy": "semver",
33
"major": 0,
44
"minor": 7,
5-
"patch": 2,
5+
"patch": 3,
66
"build": 0
7-
}
7+
}

VERSIONLOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.7.3 2025-11-11
2+
* Converted to camelcase.
3+
14
## 0.7.2 2025-11-06
25

36
## 0.7.1 2025-11-06

src/Patterns/Command/Cache.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,34 @@
1111

1212
class Cache extends Singleton
1313
{
14-
private static array $_Cache = [];
14+
private static array $_cache = [];
1515

1616
/**
17-
* @param string $Action
18-
* @param string $Command
17+
* @param string $action
18+
* @param string $command
1919
* @return Cache
2020
*/
2121

22-
public function set( string $Action, string $Command ): Cache
22+
public function set( string $action, string $command ): Cache
2323
{
24-
self::$_Cache[ $Action ] = $Command;
24+
self::$_cache[ $action ] = $command;
2525

2626
return self::instance();
2727
}
2828

2929
/**
30-
* @param string $Action
30+
* @param string $action
3131
* @return ICommand
3232
* @throws CommandNotFound
3333
*/
3434

35-
public function get( string $Action ): ICommand
35+
public function get( string $action ): ICommand
3636
{
37-
if( !isset( self::$_Cache[ $Action ] ) )
37+
if( !isset( self::$_cache[ $action ] ) )
3838
{
39-
throw new CommandNotFound( "No command found for action '{$Action}' in the cache." );
39+
throw new CommandNotFound( "No command found for action '{$action}' in the cache." );
4040
}
4141

42-
return new self::$_Cache[ $Action ];
42+
return new self::$_cache[ $action ];
4343
}
4444
}

src/Patterns/Command/Factory.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@
1010

1111
class Factory
1212
{
13-
private Cache $_Cache;
13+
private Cache $_cache;
1414

1515
/**
16-
* @param Cache $Cache
16+
* @param Cache $cache
1717
*/
1818

19-
public function __construct( Cache $Cache )
19+
public function __construct( Cache $cache )
2020
{
21-
$this->_Cache = $Cache;
21+
$this->_cache = $cache;
2222
}
2323

2424
/**
25-
* @param string $Action
25+
* @param string $action
2626
* @return ICommand
2727
* @throws CommandNotFound
2828
*/
2929

30-
public function get( string $Action ): ICommand
30+
public function get( string $action ): ICommand
3131
{
32-
return $this->_Cache->get( $Action );
32+
return $this->_cache->get( $action );
3333
}
3434
}

src/Patterns/Command/ICommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@
5858
interface ICommand
5959
{
6060
/**
61-
* @param array|null $Params
61+
* @param array|null $params
6262
* @return mixed
6363
*/
6464

65-
public function execute( ?array $Params = null ): mixed;
65+
public function execute( ?array $params = null ): mixed;
6666
}

src/Patterns/Command/Invoker.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,25 @@
5656
class Invoker
5757
{
5858
/**
59-
* @param string $Action
60-
* @param array|null $Params
59+
* @param string $action
60+
* @param array|null $params
6161
* @return mixed
6262
* @throws CommandNotFound
6363
* @throws EmptyActionParameter
6464
*/
6565

66-
public function process( string $Action, ?array $Params = null ): mixed
66+
public function process( string $action, ?array $params = null ): mixed
6767
{
68-
if( !$Action )
68+
if( !$action )
6969
{
7070
throw new EmptyActionParameter(
7171
"Please pass 'Action:' parameter as first argument to Invoker::process() method"
7272
);
7373
}
7474

75-
$Factory = new Factory( Cache::getInstance() );
76-
$Command = $Factory->get( $Action);
75+
$factory = new Factory( Cache::getInstance() );
76+
$command = $factory->get( $action);
7777

78-
return $Command->execute($Params);
78+
return $command->execute($params);
7979
}
8080
}

src/Patterns/Criteria/AndCriteria.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111
class AndCriteria extends LogicBase implements ICriteria
1212
{
1313
/**
14-
* @param array $Entities
14+
* @param array $entities
1515
* @return array
1616
*/
1717

18-
public function meetCriteria( array $Entities )
18+
public function meetCriteria( array $entities )
1919
{
20-
$Result = $this->_Criteria->meetCriteria( $Entities );
20+
$result = $this->_criteria->meetCriteria( $entities );
2121

22-
if( count( $Result ) == 0 )
22+
if( count( $result ) == 0 )
2323
{
24-
return $Result;
24+
return $result;
2525
}
2626

27-
return $this->_OtherCriteria->meetCriteria( $Result );
27+
return $this->_otherCriteria->meetCriteria( $result );
2828
}
2929
}

src/Patterns/Criteria/Base.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,33 +46,33 @@
4646
*/
4747
abstract class Base implements ICriteria
4848
{
49-
protected $_Criteria;
49+
protected $_criteria;
5050

5151
/**
5252
* Creates an AND combination of this criteria with another criteria.
53-
*
54-
* @param ICriteria $OtherCriteria The criteria to combine with using AND logic
53+
*
54+
* @param ICriteria $otherCriteria The criteria to combine with using AND logic
5555
* @return AndCriteria A new criteria that represents this AND other
5656
*/
57-
public function _and( ICriteria $OtherCriteria )
57+
public function _and( ICriteria $otherCriteria )
5858
{
59-
return new AndCriteria( $this, $OtherCriteria );
59+
return new AndCriteria( $this, $otherCriteria );
6060
}
6161

6262
/**
6363
* Creates an OR combination of this criteria with another criteria.
64-
*
65-
* @param ICriteria $OtherCriteria The criteria to combine with using OR logic
64+
*
65+
* @param ICriteria $otherCriteria The criteria to combine with using OR logic
6666
* @return OrCriteria A new criteria that represents this OR other
6767
*/
68-
public function _or( ICriteria $OtherCriteria )
68+
public function _or( ICriteria $otherCriteria )
6969
{
70-
return new OrCriteria( $this, $OtherCriteria );
70+
return new OrCriteria( $this, $otherCriteria );
7171
}
7272

7373
/**
7474
* Creates a NOT (negation) of this criteria.
75-
*
75+
*
7676
* @return NotCriteria A new criteria that represents the negation of this criteria
7777
*/
7878
public function _not()

src/Patterns/Criteria/ICriteria.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
interface ICriteria
5353
{
5454
/**
55-
* @param array $Entities
55+
* @param array $entities
5656
* @return array
5757
*/
5858

59-
public function meetCriteria( array $Entities );
59+
public function meetCriteria( array $entities );
6060
}

src/Patterns/Criteria/KeyValue.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@
44

55
class KeyValue extends Base implements ICriteria
66
{
7-
private $_Key;
8-
private $_Value;
7+
private $_key;
8+
private $_value;
99

10-
public function __construct( $Key, $Value )
10+
public function __construct( $key, $value )
1111
{
12-
$this->_Key = $Key;
13-
$this->_Value = $Value;
12+
$this->_key = $key;
13+
$this->_value = $value;
1414
}
1515

16-
public function meetCriteria( array $Entities )
16+
public function meetCriteria( array $entities )
1717
{
18-
$Results = [];
18+
$results = [];
1919

20-
foreach( $Entities as $Item )
20+
foreach( $entities as $item )
2121
{
22-
if( $Item[ $this->_Key ] == $this->_Value )
22+
if( $item[ $this->_key ] == $this->_value )
2323
{
24-
$Results[] = $Item;
24+
$results[] = $item;
2525
}
2626
}
2727

28-
return $Results;
28+
return $results;
2929
}
3030
}

0 commit comments

Comments
 (0)