Skip to content

Commit 359eb69

Browse files
committed
Added php-doc comments and todos
1 parent 726ca96 commit 359eb69

File tree

7 files changed

+35
-10
lines changed

7 files changed

+35
-10
lines changed

src/Core/Cache/CacheState/EmptyResultCacheState.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@
55
use Okapi\CodeTransformer\Core\Cache\CacheState;
66

77
/**
8-
* TODO: docs
8+
* # Empty Result Cache State
9+
*
10+
* This class is used to represent an empty result cache state, which means that
11+
* the class was not matched by any transformer.
12+
*
13+
* @todo: I think when a transformer is changed, the cache state should be
14+
* invalidated. This is not currently the case. Maybe clear the whole cache
15+
* when a transformer is changed?
916
*/
1017
class EmptyResultCacheState extends CacheState
1118
{

src/Core/Cache/CacheState/NoTransformationsCacheState.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44

55
use Okapi\CodeTransformer\Core\Cache\CacheState;
66

7-
// TODO: docs
7+
/**
8+
* # No Transformations Cache State
9+
*
10+
* This class is used to represent a no transformations cache state, which
11+
* means that the file was matched by the transformers, but no transformations
12+
* were applied.
13+
*/
814
class NoTransformationsCacheState extends CacheState
915
{
1016
/**

src/Core/Cache/CacheState/TransformedCacheState.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
namespace Okapi\CodeTransformer\Core\Cache\CacheState;
44

5-
65
use Okapi\CodeTransformer\Core\Cache\CacheState;
76

8-
// TODO: docs
7+
/**
8+
* # Transformed Cache State
9+
*
10+
* This class is used to store the cache state for transformed files.
11+
*/
912
class TransformedCacheState extends CacheState
1013
{
1114

src/Core/Cache/CacheStateFactory.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33
namespace Okapi\CodeTransformer\Core\Cache;
44

5-
65
use Okapi\CodeTransformer\Core\Cache\CacheState\EmptyResultCacheState;
76
use Okapi\CodeTransformer\Core\Cache\CacheState\NoTransformationsCacheState;
87
use Okapi\CodeTransformer\Core\Cache\CacheState\TransformedCacheState;
98
use Okapi\CodeTransformer\Core\DI;
109
use TypeError;
1110

12-
// TODO: docs
11+
/**
12+
* # Cache State Factory
13+
*
14+
* This class is used to create cache states from the cache state file.
15+
*/
1316
class CacheStateFactory
1417
{
1518
/**

src/Core/Container/TransformerContainer.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44

55
use Okapi\CodeTransformer\Transformer;
66

7-
// TODO: docs
7+
/**
8+
* # Transformer Container
9+
*
10+
* This class is used to store the transformer instances.
11+
*/
812
class TransformerContainer
913
{
1014
/**

src/Core/Container/TransformerManager.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@
1414
* # Transformer Manager
1515
*
1616
* This class is used to register and manage the transformers.
17-
* @todo Don't repeat class name in docs
1817
*/
1918
class TransformerManager implements ServiceInterface
2019
{
2120
/**
2221
* The list of transformer class strings.
2322
*
2423
* @var class-string<Transformer>[]
25-
* @todo CHECK if all class-string have a type
2624
*/
2725
private array $transformers = [];
2826

src/Core/Matcher/TransformerMatcher.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
use Okapi\CodeTransformer\Transformer;
1212
use Okapi\Wildcards\Regex;
1313

14-
// TODO: docs
14+
/**
15+
* # Transformer Matcher
16+
*
17+
* This class is used to match the transformers to the classes.
18+
*/
1519
class TransformerMatcher
1620
{
1721
// region DI

0 commit comments

Comments
 (0)