Browse Source

PSR-12 compatibility

Maurits van der Schee 4 years ago
parent
commit
de08ff5a2a
77 changed files with 135 additions and 83 deletions
  1. 1
    1
      README.md
  2. 1
    1
      composer.json
  3. 1
    1
      src/Tqdev/PhpCrudApi/Api.php
  4. 1
    0
      src/Tqdev/PhpCrudApi/Cache/Cache.php
  5. 1
    0
      src/Tqdev/PhpCrudApi/Cache/CacheFactory.php
  6. 1
    0
      src/Tqdev/PhpCrudApi/Cache/MemcacheCache.php
  7. 1
    0
      src/Tqdev/PhpCrudApi/Cache/MemcachedCache.php
  8. 1
    0
      src/Tqdev/PhpCrudApi/Cache/NoCache.php
  9. 1
    0
      src/Tqdev/PhpCrudApi/Cache/RedisCache.php
  10. 2
    1
      src/Tqdev/PhpCrudApi/Cache/TempFileCache.php
  11. 2
    2
      src/Tqdev/PhpCrudApi/Column/DefinitionService.php
  12. 5
    4
      src/Tqdev/PhpCrudApi/Column/Reflection/ReflectedColumn.php
  13. 2
    1
      src/Tqdev/PhpCrudApi/Column/Reflection/ReflectedDatabase.php
  14. 2
    1
      src/Tqdev/PhpCrudApi/Column/Reflection/ReflectedTable.php
  15. 1
    0
      src/Tqdev/PhpCrudApi/Config.php
  16. 1
    1
      src/Tqdev/PhpCrudApi/Controller/CacheController.php
  17. 1
    0
      src/Tqdev/PhpCrudApi/Controller/ColumnController.php
  18. 1
    1
      src/Tqdev/PhpCrudApi/Controller/GeoJsonController.php
  19. 1
    1
      src/Tqdev/PhpCrudApi/Controller/JsonResponder.php
  20. 1
    1
      src/Tqdev/PhpCrudApi/Controller/OpenApiController.php
  21. 1
    1
      src/Tqdev/PhpCrudApi/Controller/RecordController.php
  22. 1
    1
      src/Tqdev/PhpCrudApi/Controller/Responder.php
  23. 1
    1
      src/Tqdev/PhpCrudApi/Database/ColumnConverter.php
  24. 1
    1
      src/Tqdev/PhpCrudApi/Database/ColumnsBuilder.php
  25. 1
    0
      src/Tqdev/PhpCrudApi/Database/ConditionsBuilder.php
  26. 1
    0
      src/Tqdev/PhpCrudApi/Database/DataConverter.php
  27. 3
    2
      src/Tqdev/PhpCrudApi/Database/GenericDefinition.php
  28. 1
    0
      src/Tqdev/PhpCrudApi/Database/GenericReflection.php
  29. 1
    0
      src/Tqdev/PhpCrudApi/Database/TypeConverter.php
  30. 1
    0
      src/Tqdev/PhpCrudApi/GeoJson/Feature.php
  31. 1
    0
      src/Tqdev/PhpCrudApi/GeoJson/FeatureCollection.php
  32. 2
    1
      src/Tqdev/PhpCrudApi/GeoJson/GeoJsonService.php
  33. 1
    0
      src/Tqdev/PhpCrudApi/GeoJson/Geometry.php
  34. 1
    0
      src/Tqdev/PhpCrudApi/Middleware/AjaxOnlyMiddleware.php
  35. 1
    0
      src/Tqdev/PhpCrudApi/Middleware/AuthorizationMiddleware.php
  36. 1
    0
      src/Tqdev/PhpCrudApi/Middleware/Base/Middleware.php
  37. 1
    0
      src/Tqdev/PhpCrudApi/Middleware/BasicAuthMiddleware.php
  38. 2
    1
      src/Tqdev/PhpCrudApi/Middleware/Communication/VariableStore.php
  39. 1
    0
      src/Tqdev/PhpCrudApi/Middleware/CorsMiddleware.php
  40. 1
    0
      src/Tqdev/PhpCrudApi/Middleware/CustomizationMiddleware.php
  41. 1
    0
      src/Tqdev/PhpCrudApi/Middleware/FirewallMiddleware.php
  42. 2
    1
      src/Tqdev/PhpCrudApi/Middleware/IpAddressMiddleware.php
  43. 1
    0
      src/Tqdev/PhpCrudApi/Middleware/JoinLimitsMiddleware.php
  44. 1
    0
      src/Tqdev/PhpCrudApi/Middleware/JwtAuthMiddleware.php
  45. 1
    0
      src/Tqdev/PhpCrudApi/Middleware/MultiTenancyMiddleware.php
  46. 1
    0
      src/Tqdev/PhpCrudApi/Middleware/PageLimitsMiddleware.php
  47. 1
    0
      src/Tqdev/PhpCrudApi/Middleware/Router/Router.php
  48. 1
    1
      src/Tqdev/PhpCrudApi/Middleware/Router/SimpleRouter.php
  49. 2
    1
      src/Tqdev/PhpCrudApi/Middleware/SanitationMiddleware.php
  50. 2
    1
      src/Tqdev/PhpCrudApi/Middleware/ValidationMiddleware.php
  51. 1
    0
      src/Tqdev/PhpCrudApi/Middleware/XsrfMiddleware.php
  52. 1
    0
      src/Tqdev/PhpCrudApi/OpenApi/OpenApiBuilder.php
  53. 1
    0
      src/Tqdev/PhpCrudApi/OpenApi/OpenApiDefinition.php
  54. 1
    1
      src/Tqdev/PhpCrudApi/OpenApi/OpenApiService.php
  55. 9
    4
      src/Tqdev/PhpCrudApi/Record/ColumnIncluder.php
  56. 1
    0
      src/Tqdev/PhpCrudApi/Record/Condition/AndCondition.php
  57. 1
    0
      src/Tqdev/PhpCrudApi/Record/Condition/ColumnCondition.php
  58. 1
    1
      src/Tqdev/PhpCrudApi/Record/Condition/Condition.php
  59. 1
    1
      src/Tqdev/PhpCrudApi/Record/Condition/NoCondition.php
  60. 1
    0
      src/Tqdev/PhpCrudApi/Record/Condition/NotCondition.php
  61. 1
    0
      src/Tqdev/PhpCrudApi/Record/Condition/OrCondition.php
  62. 1
    0
      src/Tqdev/PhpCrudApi/Record/Condition/SpatialCondition.php
  63. 1
    0
      src/Tqdev/PhpCrudApi/Record/Document/ErrorDocument.php
  64. 1
    1
      src/Tqdev/PhpCrudApi/Record/Document/ListDocument.php
  65. 22
    23
      src/Tqdev/PhpCrudApi/Record/ErrorCode.php
  66. 1
    2
      src/Tqdev/PhpCrudApi/Record/FilterInfo.php
  67. 1
    0
      src/Tqdev/PhpCrudApi/Record/HabtmValues.php
  68. 1
    1
      src/Tqdev/PhpCrudApi/Record/OrderingInfo.php
  69. 1
    2
      src/Tqdev/PhpCrudApi/Record/PaginationInfo.php
  70. 5
    4
      src/Tqdev/PhpCrudApi/Record/PathTree.php
  71. 1
    0
      src/Tqdev/PhpCrudApi/Record/RecordService.php
  72. 2
    4
      src/Tqdev/PhpCrudApi/Record/RelationJoiner.php
  73. 2
    1
      src/Tqdev/PhpCrudApi/RequestFactory.php
  74. 1
    1
      src/Tqdev/PhpCrudApi/RequestUtils.php
  75. 9
    9
      src/Tqdev/PhpCrudApi/ResponseFactory.php
  76. 1
    0
      src/Tqdev/PhpCrudApi/ResponseUtils.php
  77. 1
    0
      src/index.php

+ 1
- 1
README.md View File

@@ -114,7 +114,7 @@ The following features are supported:
114 114
   - Support for reading database structure in JSON
115 115
   - Support for modifying database structure using REST endpoint
116 116
   - Security enhancing middleware is included
117
-  - Standard compliant: PSR-2, PSR-4, PSR-7, PSR-15 and PSR-17
117
+  - Standard compliant: PSR-4, PSR-7, PSR-12, PSR-15 and PSR-17
118 118
 
119 119
 ## Compilation
120 120
 

+ 1
- 1
composer.json View File

@@ -50,5 +50,5 @@
50 50
     },
51 51
     "autoload": {
52 52
         "psr-4": { "Tqdev\\PhpCrudApi\\": "src/Tqdev/PhpCrudApi" }
53
-    }   
53
+    }
54 54
 }

+ 1
- 1
src/Tqdev/PhpCrudApi/Api.php View File

@@ -25,9 +25,9 @@ use Tqdev\PhpCrudApi\Middleware\FirewallMiddleware;
25 25
 use Tqdev\PhpCrudApi\Middleware\IpAddressMiddleware;
26 26
 use Tqdev\PhpCrudApi\Middleware\JoinLimitsMiddleware;
27 27
 use Tqdev\PhpCrudApi\Middleware\JwtAuthMiddleware;
28
-use Tqdev\PhpCrudApi\Middleware\ReconnectMiddleware;
29 28
 use Tqdev\PhpCrudApi\Middleware\MultiTenancyMiddleware;
30 29
 use Tqdev\PhpCrudApi\Middleware\PageLimitsMiddleware;
30
+use Tqdev\PhpCrudApi\Middleware\ReconnectMiddleware;
31 31
 use Tqdev\PhpCrudApi\Middleware\Router\SimpleRouter;
32 32
 use Tqdev\PhpCrudApi\Middleware\SanitationMiddleware;
33 33
 use Tqdev\PhpCrudApi\Middleware\ValidationMiddleware;

+ 1
- 0
src/Tqdev/PhpCrudApi/Cache/Cache.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Cache;
3 4
 
4 5
 interface Cache

+ 1
- 0
src/Tqdev/PhpCrudApi/Cache/CacheFactory.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Cache;
3 4
 
4 5
 class CacheFactory

+ 1
- 0
src/Tqdev/PhpCrudApi/Cache/MemcacheCache.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Cache;
3 4
 
4 5
 class MemcacheCache implements Cache

+ 1
- 0
src/Tqdev/PhpCrudApi/Cache/MemcachedCache.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Cache;
3 4
 
4 5
 class MemcachedCache extends MemcacheCache

+ 1
- 0
src/Tqdev/PhpCrudApi/Cache/NoCache.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Cache;
3 4
 
4 5
 class NoCache implements Cache

+ 1
- 0
src/Tqdev/PhpCrudApi/Cache/RedisCache.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Cache;
3 4
 
4 5
 class RedisCache implements Cache

+ 2
- 1
src/Tqdev/PhpCrudApi/Cache/TempFileCache.php View File

@@ -1,9 +1,10 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Cache;
3 4
 
4 5
 class TempFileCache implements Cache
5 6
 {
6
-    const SUFFIX = 'cache';
7
+    public const SUFFIX = 'cache';
7 8
 
8 9
     private $path;
9 10
     private $segments;

+ 2
- 2
src/Tqdev/PhpCrudApi/Column/DefinitionService.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Column;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Column\Reflection\ReflectedColumn;
@@ -97,7 +98,7 @@ class DefinitionService
97 98
         return true;
98 99
     }
99 100
 
100
-    public function addTable( /* object */$definition)
101
+    public function addTable(/* object */$definition)
101 102
     {
102 103
         $newTable = ReflectedTable::fromJson($definition);
103 104
         if (!$this->db->definition()->addTable($newTable)) {
@@ -154,5 +155,4 @@ class DefinitionService
154 155
         }
155 156
         return true;
156 157
     }
157
-
158 158
 }

+ 5
- 4
src/Tqdev/PhpCrudApi/Column/Reflection/ReflectedColumn.php View File

@@ -1,13 +1,14 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Column\Reflection;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Database\GenericReflection;
5 6
 
6 7
 class ReflectedColumn implements \JsonSerializable
7 8
 {
8
-    const DEFAULT_LENGTH = 255;
9
-    const DEFAULT_PRECISION = 19;
10
-    const DEFAULT_SCALE = 4;
9
+    public const DEFAULT_LENGTH = 255;
10
+    public const DEFAULT_PRECISION = 19;
11
+    public const DEFAULT_SCALE = 4;
11 12
 
12 13
     private $name;
13 14
     private $type;
@@ -44,7 +45,7 @@ class ReflectedColumn implements \JsonSerializable
44 45
         return new ReflectedColumn($name, $type, $length, $precision, $scale, $nullable, $pk, $fk);
45 46
     }
46 47
 
47
-    public static function fromJson( /* object */$json): ReflectedColumn
48
+    public static function fromJson(/* object */$json): ReflectedColumn
48 49
     {
49 50
         $name = $json->name;
50 51
         $type = $json->type;

+ 2
- 1
src/Tqdev/PhpCrudApi/Column/Reflection/ReflectedDatabase.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Column\Reflection;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Database\GenericReflection;
@@ -26,7 +27,7 @@ class ReflectedDatabase implements \JsonSerializable
26 27
         return new ReflectedDatabase($tableTypes);
27 28
     }
28 29
 
29
-    public static function fromJson( /* object */$json): ReflectedDatabase
30
+    public static function fromJson(/* object */$json): ReflectedDatabase
30 31
     {
31 32
         $tableTypes = (array) $json->tables;
32 33
         return new ReflectedDatabase($tableTypes);

+ 2
- 1
src/Tqdev/PhpCrudApi/Column/Reflection/ReflectedTable.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Column\Reflection;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Database\GenericReflection;
@@ -64,7 +65,7 @@ class ReflectedTable implements \JsonSerializable
64 65
         return new ReflectedTable($name, $type, array_values($columns));
65 66
     }
66 67
 
67
-    public static function fromJson( /* object */$json): ReflectedTable
68
+    public static function fromJson(/* object */$json): ReflectedTable
68 69
     {
69 70
         $name = $json->name;
70 71
         $type = $json->type;

+ 1
- 0
src/Tqdev/PhpCrudApi/Config.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi;
3 4
 
4 5
 class Config

+ 1
- 1
src/Tqdev/PhpCrudApi/Controller/CacheController.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Controller;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;
@@ -22,5 +23,4 @@ class CacheController
22 23
     {
23 24
         return $this->responder->success($this->cache->clear());
24 25
     }
25
-
26 26
 }

+ 1
- 0
src/Tqdev/PhpCrudApi/Controller/ColumnController.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Controller;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;

+ 1
- 1
src/Tqdev/PhpCrudApi/Controller/GeoJsonController.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Controller;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;
@@ -58,5 +59,4 @@ class GeoJsonController
58 59
             return $this->responder->success($response);
59 60
         }
60 61
     }
61
-
62 62
 }

+ 1
- 1
src/Tqdev/PhpCrudApi/Controller/JsonResponder.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Controller;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;
@@ -20,5 +21,4 @@ class JsonResponder implements Responder
20 21
     {
21 22
         return ResponseFactory::fromObject(ResponseFactory::OK, $result);
22 23
     }
23
-
24 24
 }

+ 1
- 1
src/Tqdev/PhpCrudApi/Controller/OpenApiController.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Controller;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;
@@ -22,5 +23,4 @@ class OpenApiController
22 23
     {
23 24
         return $this->responder->success($this->openApi->get());
24 25
     }
25
-
26 26
 }

+ 1
- 1
src/Tqdev/PhpCrudApi/Controller/RecordController.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Controller;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;
@@ -175,5 +176,4 @@ class RecordController
175 176
             return $this->responder->success($this->service->increment($table, $id, $record, $params));
176 177
         }
177 178
     }
178
-
179 179
 }

+ 1
- 1
src/Tqdev/PhpCrudApi/Controller/Responder.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Controller;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;
@@ -8,5 +9,4 @@ interface Responder
8 9
     public function error(int $error, string $argument, $details = null): ResponseInterface;
9 10
 
10 11
     public function success($result): ResponseInterface;
11
-
12 12
 }

+ 1
- 1
src/Tqdev/PhpCrudApi/Database/ColumnConverter.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Database;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Column\Reflection\ReflectedColumn;
@@ -60,5 +61,4 @@ class ColumnConverter
60 61
         }
61 62
         return $value;
62 63
     }
63
-
64 64
 }

+ 1
- 1
src/Tqdev/PhpCrudApi/Database/ColumnsBuilder.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Database;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Column\Reflection\ReflectedColumn;
@@ -105,5 +106,4 @@ class ColumnsBuilder
105 106
         }
106 107
         return implode(',', $results);
107 108
     }
108
-
109 109
 }

+ 1
- 0
src/Tqdev/PhpCrudApi/Database/ConditionsBuilder.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Database;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Column\Reflection\ReflectedColumn;

+ 1
- 0
src/Tqdev/PhpCrudApi/Database/DataConverter.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Database;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Column\Reflection\ReflectedColumn;

+ 3
- 2
src/Tqdev/PhpCrudApi/Database/GenericDefinition.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Database;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Column\Reflection\ReflectedColumn;
@@ -35,9 +36,9 @@ class GenericDefinition
35 36
         $type = $this->typeConverter->fromJdbc($column->getType());
36 37
         if ($column->hasPrecision() && $column->hasScale()) {
37 38
             $size = '(' . $column->getPrecision() . ',' . $column->getScale() . ')';
38
-        } else if ($column->hasPrecision()) {
39
+        } elseif ($column->hasPrecision()) {
39 40
             $size = '(' . $column->getPrecision() . ')';
40
-        } else if ($column->hasLength()) {
41
+        } elseif ($column->hasLength()) {
41 42
             $size = '(' . $column->getLength() . ')';
42 43
         } else {
43 44
             $size = '';

+ 1
- 0
src/Tqdev/PhpCrudApi/Database/GenericReflection.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Database;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Database\LazyPdo;

+ 1
- 0
src/Tqdev/PhpCrudApi/Database/TypeConverter.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Database;
3 4
 
4 5
 class TypeConverter

+ 1
- 0
src/Tqdev/PhpCrudApi/GeoJson/Feature.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\GeoJson;
3 4
 
4 5
 class Feature implements \JsonSerializable

+ 1
- 0
src/Tqdev/PhpCrudApi/GeoJson/FeatureCollection.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\GeoJson;
3 4
 
4 5
 class FeatureCollection implements \JsonSerializable

+ 2
- 1
src/Tqdev/PhpCrudApi/GeoJson/GeoJsonService.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\GeoJson;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Column\ReflectionService;
@@ -78,7 +79,7 @@ class GeoJsonService
78 79
         return [$lon, $lat];
79 80
     }
80 81
 
81
-    private function convertRecordToFeature( /*object*/$record, string $primaryKeyColumnName, string $geometryColumnName)
82
+    private function convertRecordToFeature(/*object*/$record, string $primaryKeyColumnName, string $geometryColumnName)
82 83
     {
83 84
         $id = null;
84 85
         if ($primaryKeyColumnName) {

+ 1
- 0
src/Tqdev/PhpCrudApi/GeoJson/Geometry.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\GeoJson;
3 4
 
4 5
 class Geometry implements \JsonSerializable

+ 1
- 0
src/Tqdev/PhpCrudApi/Middleware/AjaxOnlyMiddleware.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;

+ 1
- 0
src/Tqdev/PhpCrudApi/Middleware/AuthorizationMiddleware.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;

+ 1
- 0
src/Tqdev/PhpCrudApi/Middleware/Base/Middleware.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware\Base;
3 4
 
4 5
 use Psr\Http\Server\MiddlewareInterface;

+ 1
- 0
src/Tqdev/PhpCrudApi/Middleware/BasicAuthMiddleware.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;

+ 2
- 1
src/Tqdev/PhpCrudApi/Middleware/Communication/VariableStore.php View File

@@ -1,9 +1,10 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware\Communication;
3 4
 
4 5
 class VariableStore
5 6
 {
6
-    static $values = array();
7
+    public static $values = array();
7 8
 
8 9
     public static function get(string $key)
9 10
     {

+ 1
- 0
src/Tqdev/PhpCrudApi/Middleware/CorsMiddleware.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;

+ 1
- 0
src/Tqdev/PhpCrudApi/Middleware/CustomizationMiddleware.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;

+ 1
- 0
src/Tqdev/PhpCrudApi/Middleware/FirewallMiddleware.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;

+ 2
- 1
src/Tqdev/PhpCrudApi/Middleware/IpAddressMiddleware.php View File

@@ -1,11 +1,12 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;
5 6
 use Psr\Http\Message\ServerRequestInterface;
6 7
 use Psr\Http\Server\RequestHandlerInterface;
7
-use Tqdev\PhpCrudApi\Column\ReflectionService;
8 8
 use Tqdev\PhpCrudApi\Column\Reflection\ReflectedTable;
9
+use Tqdev\PhpCrudApi\Column\ReflectionService;
9 10
 use Tqdev\PhpCrudApi\Controller\Responder;
10 11
 use Tqdev\PhpCrudApi\Middleware\Base\Middleware;
11 12
 use Tqdev\PhpCrudApi\Middleware\Router\Router;

+ 1
- 0
src/Tqdev/PhpCrudApi/Middleware/JoinLimitsMiddleware.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;

+ 1
- 0
src/Tqdev/PhpCrudApi/Middleware/JwtAuthMiddleware.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;

+ 1
- 0
src/Tqdev/PhpCrudApi/Middleware/MultiTenancyMiddleware.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;

+ 1
- 0
src/Tqdev/PhpCrudApi/Middleware/PageLimitsMiddleware.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;

+ 1
- 0
src/Tqdev/PhpCrudApi/Middleware/Router/Router.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware\Router;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;

+ 1
- 1
src/Tqdev/PhpCrudApi/Middleware/Router/SimpleRouter.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware\Router;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;
@@ -156,5 +157,4 @@ class SimpleRouter implements Router
156 157
         }
157 158
         return $response;
158 159
     }
159
-
160 160
 }

+ 2
- 1
src/Tqdev/PhpCrudApi/Middleware/SanitationMiddleware.php View File

@@ -1,11 +1,12 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;
5 6
 use Psr\Http\Message\ServerRequestInterface;
6 7
 use Psr\Http\Server\RequestHandlerInterface;
7
-use Tqdev\PhpCrudApi\Column\ReflectionService;
8 8
 use Tqdev\PhpCrudApi\Column\Reflection\ReflectedTable;
9
+use Tqdev\PhpCrudApi\Column\ReflectionService;
9 10
 use Tqdev\PhpCrudApi\Controller\Responder;
10 11
 use Tqdev\PhpCrudApi\Middleware\Base\Middleware;
11 12
 use Tqdev\PhpCrudApi\Middleware\Router\Router;

+ 2
- 1
src/Tqdev/PhpCrudApi/Middleware/ValidationMiddleware.php View File

@@ -1,11 +1,12 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;
5 6
 use Psr\Http\Message\ServerRequestInterface;
6 7
 use Psr\Http\Server\RequestHandlerInterface;
7
-use Tqdev\PhpCrudApi\Column\ReflectionService;
8 8
 use Tqdev\PhpCrudApi\Column\Reflection\ReflectedTable;
9
+use Tqdev\PhpCrudApi\Column\ReflectionService;
9 10
 use Tqdev\PhpCrudApi\Controller\Responder;
10 11
 use Tqdev\PhpCrudApi\Middleware\Base\Middleware;
11 12
 use Tqdev\PhpCrudApi\Middleware\Router\Router;

+ 1
- 0
src/Tqdev/PhpCrudApi/Middleware/XsrfMiddleware.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Middleware;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;

+ 1
- 0
src/Tqdev/PhpCrudApi/OpenApi/OpenApiBuilder.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\OpenApi;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Column\ReflectionService;

+ 1
- 0
src/Tqdev/PhpCrudApi/OpenApi/OpenApiDefinition.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\OpenApi;
3 4
 
4 5
 class OpenApiDefinition implements \JsonSerializable

+ 1
- 1
src/Tqdev/PhpCrudApi/OpenApi/OpenApiService.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\OpenApi;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Column\ReflectionService;
@@ -17,5 +18,4 @@ class OpenApiService
17 18
     {
18 19
         return $this->builder->build();
19 20
     }
20
-
21 21
 }

+ 9
- 4
src/Tqdev/PhpCrudApi/Record/ColumnIncluder.php View File

@@ -1,18 +1,24 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Column\Reflection\ReflectedTable;
5 6
 
6 7
 class ColumnIncluder
7 8
 {
8
-
9 9
     private function isMandatory(string $tableName, string $columnName, array $params): bool
10 10
     {
11 11
         return isset($params['mandatory']) && in_array($tableName . "." . $columnName, $params['mandatory']);
12 12
     }
13 13
 
14
-    private function select(string $tableName, bool $primaryTable, array $params, string $paramName,
15
-        array $columnNames, bool $include): array{
14
+    private function select(
15
+        string $tableName,
16
+        bool $primaryTable,
17
+        array $params,
18
+        string $paramName,
19
+        array $columnNames,
20
+        bool $include
21
+    ): array {
16 22
         if (!isset($params[$paramName])) {
17 23
             return $columnNames;
18 24
         }
@@ -62,5 +68,4 @@ class ColumnIncluder
62 68
         }
63 69
         return $results;
64 70
     }
65
-
66 71
 }

+ 1
- 0
src/Tqdev/PhpCrudApi/Record/Condition/AndCondition.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record\Condition;
3 4
 
4 5
 class AndCondition extends Condition

+ 1
- 0
src/Tqdev/PhpCrudApi/Record/Condition/ColumnCondition.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record\Condition;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Column\Reflection\ReflectedColumn;

+ 1
- 1
src/Tqdev/PhpCrudApi/Record/Condition/Condition.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record\Condition;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Column\Reflection\ReflectedTable;
@@ -64,5 +65,4 @@ abstract class Condition
64 65
         }
65 66
         return $condition;
66 67
     }
67
-
68 68
 }

+ 1
- 1
src/Tqdev/PhpCrudApi/Record/Condition/NoCondition.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record\Condition;
3 4
 
4 5
 class NoCondition extends Condition
@@ -17,5 +18,4 @@ class NoCondition extends Condition
17 18
     {
18 19
         return $this;
19 20
     }
20
-
21 21
 }

+ 1
- 0
src/Tqdev/PhpCrudApi/Record/Condition/NotCondition.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record\Condition;
3 4
 
4 5
 class NotCondition extends Condition

+ 1
- 0
src/Tqdev/PhpCrudApi/Record/Condition/OrCondition.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record\Condition;
3 4
 
4 5
 class OrCondition extends Condition

+ 1
- 0
src/Tqdev/PhpCrudApi/Record/Condition/SpatialCondition.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record\Condition;
3 4
 
4 5
 class SpatialCondition extends ColumnCondition

+ 1
- 0
src/Tqdev/PhpCrudApi/Record/Document/ErrorDocument.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record\Document;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Record\ErrorCode;

+ 1
- 1
src/Tqdev/PhpCrudApi/Record/Document/ListDocument.php View File

@@ -1,9 +1,9 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record\Document;
3 4
 
4 5
 class ListDocument implements \JsonSerializable
5 6
 {
6
-
7 7
     private $records;
8 8
 
9 9
     private $results;

+ 22
- 23
src/Tqdev/PhpCrudApi/Record/ErrorCode.php View File

@@ -1,36 +1,36 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record;
3 4
 
4 5
 use Tqdev\PhpCrudApi\ResponseFactory;
5 6
 
6 7
 class ErrorCode
7 8
 {
8
-
9 9
     private $code;
10 10
     private $message;
11 11
     private $status;
12 12
 
13
-    const ERROR_NOT_FOUND = 9999;
14
-    const ROUTE_NOT_FOUND = 1000;
15
-    const TABLE_NOT_FOUND = 1001;
16
-    const ARGUMENT_COUNT_MISMATCH = 1002;
17
-    const RECORD_NOT_FOUND = 1003;
18
-    const ORIGIN_FORBIDDEN = 1004;
19
-    const COLUMN_NOT_FOUND = 1005;
20
-    const TABLE_ALREADY_EXISTS = 1006;
21
-    const COLUMN_ALREADY_EXISTS = 1007;
22
-    const HTTP_MESSAGE_NOT_READABLE = 1008;
23
-    const DUPLICATE_KEY_EXCEPTION = 1009;
24
-    const DATA_INTEGRITY_VIOLATION = 1010;
25
-    const AUTHENTICATION_REQUIRED = 1011;
26
-    const AUTHENTICATION_FAILED = 1012;
27
-    const INPUT_VALIDATION_FAILED = 1013;
28
-    const OPERATION_FORBIDDEN = 1014;
29
-    const OPERATION_NOT_SUPPORTED = 1015;
30
-    const TEMPORARY_OR_PERMANENTLY_BLOCKED = 1016;
31
-    const BAD_OR_MISSING_XSRF_TOKEN = 1017;
32
-    const ONLY_AJAX_REQUESTS_ALLOWED = 1018;
33
-    const PAGINATION_FORBIDDEN = 1019;
13
+    public const ERROR_NOT_FOUND = 9999;
14
+    public const ROUTE_NOT_FOUND = 1000;
15
+    public const TABLE_NOT_FOUND = 1001;
16
+    public const ARGUMENT_COUNT_MISMATCH = 1002;
17
+    public const RECORD_NOT_FOUND = 1003;
18
+    public const ORIGIN_FORBIDDEN = 1004;
19
+    public const COLUMN_NOT_FOUND = 1005;
20
+    public const TABLE_ALREADY_EXISTS = 1006;
21
+    public const COLUMN_ALREADY_EXISTS = 1007;
22
+    public const HTTP_MESSAGE_NOT_READABLE = 1008;
23
+    public const DUPLICATE_KEY_EXCEPTION = 1009;
24
+    public const DATA_INTEGRITY_VIOLATION = 1010;
25
+    public const AUTHENTICATION_REQUIRED = 1011;
26
+    public const AUTHENTICATION_FAILED = 1012;
27
+    public const INPUT_VALIDATION_FAILED = 1013;
28
+    public const OPERATION_FORBIDDEN = 1014;
29
+    public const OPERATION_NOT_SUPPORTED = 1015;
30
+    public const TEMPORARY_OR_PERMANENTLY_BLOCKED = 1016;
31
+    public const BAD_OR_MISSING_XSRF_TOKEN = 1017;
32
+    public const ONLY_AJAX_REQUESTS_ALLOWED = 1018;
33
+    public const PAGINATION_FORBIDDEN = 1019;
34 34
 
35 35
     private $values = [
36 36
         9999 => ["%s", ResponseFactory::INTERNAL_SERVER_ERROR],
@@ -80,5 +80,4 @@ class ErrorCode
80 80
     {
81 81
         return $this->status;
82 82
     }
83
-
84 83
 }

+ 1
- 2
src/Tqdev/PhpCrudApi/Record/FilterInfo.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Column\Reflection\ReflectedTable;
@@ -9,7 +10,6 @@ use Tqdev\PhpCrudApi\Record\Condition\OrCondition;
9 10
 
10 11
 class FilterInfo
11 12
 {
12
-
13 13
     private function addConditionFromFilterPath(PathTree $conditions, array $path, ReflectedTable $table, array $params)
14 14
     {
15 15
         $key = 'filter' . implode('', $path);
@@ -52,5 +52,4 @@ class FilterInfo
52 52
     {
53 53
         return $this->combinePathTreeOfConditions($this->getConditionsAsPathTree($table, $params));
54 54
     }
55
-
56 55
 }

+ 1
- 0
src/Tqdev/PhpCrudApi/Record/HabtmValues.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record;
3 4
 
4 5
 class HabtmValues

+ 1
- 1
src/Tqdev/PhpCrudApi/Record/OrderingInfo.php View File

@@ -1,11 +1,11 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Column\Reflection\ReflectedTable;
5 6
 
6 7
 class OrderingInfo
7 8
 {
8
-
9 9
     public function getColumnOrdering(ReflectedTable $table, array $params): array
10 10
     {
11 11
         $fields = array();

+ 1
- 2
src/Tqdev/PhpCrudApi/Record/PaginationInfo.php View File

@@ -1,9 +1,9 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record;
3 4
 
4 5
 class PaginationInfo
5 6
 {
6
-
7 7
     public $DEFAULT_PAGE_SIZE = 20;
8 8
 
9 9
     public function hasPage(array $params): bool
@@ -66,5 +66,4 @@ class PaginationInfo
66 66
         }
67 67
         return $pageLimit;
68 68
     }
69
-
70 69
 }

+ 5
- 4
src/Tqdev/PhpCrudApi/Record/PathTree.php View File

@@ -1,13 +1,14 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record;
3 4
 
4 5
 class PathTree implements \JsonSerializable
5 6
 {
6
-    const WILDCARD = '*';
7
+    public const WILDCARD = '*';
7 8
 
8 9
     private $tree;
9 10
 
10
-    public function __construct( /* object */&$tree = null)
11
+    public function __construct(/* object */&$tree = null)
11 12
     {
12 13
         if (!$tree) {
13 14
             $tree = $this->newTree();
@@ -58,7 +59,7 @@ class PathTree implements \JsonSerializable
58 59
         foreach ($path as $key) {
59 60
             if (isset($tree->branches->$key)) {
60 61
                 $tree = &$tree->branches->$key;
61
-            } else if (isset($tree->branches->$star)) {
62
+            } elseif (isset($tree->branches->$star)) {
62 63
                 $tree = &$tree->branches->$star;
63 64
             } else {
64 65
                 return [];
@@ -67,7 +68,7 @@ class PathTree implements \JsonSerializable
67 68
         return $tree->values;
68 69
     }
69 70
 
70
-    public static function fromJson( /* object */$tree): PathTree
71
+    public static function fromJson(/* object */$tree): PathTree
71 72
     {
72 73
         return new PathTree($tree);
73 74
     }

+ 1
- 0
src/Tqdev/PhpCrudApi/Record/RecordService.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Column\ReflectionService;

+ 2
- 4
src/Tqdev/PhpCrudApi/Record/RelationJoiner.php View File

@@ -1,8 +1,9 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi\Record;
3 4
 
4
-use Tqdev\PhpCrudApi\Column\ReflectionService;
5 5
 use Tqdev\PhpCrudApi\Column\Reflection\ReflectedTable;
6
+use Tqdev\PhpCrudApi\Column\ReflectionService;
6 7
 use Tqdev\PhpCrudApi\Database\GenericDB;
7 8
 use Tqdev\PhpCrudApi\Middleware\Communication\VariableStore;
8 9
 use Tqdev\PhpCrudApi\Record\Condition\ColumnCondition;
@@ -10,7 +11,6 @@ use Tqdev\PhpCrudApi\Record\Condition\OrCondition;
10 11
 
11 12
 class RelationJoiner
12 13
 {
13
-
14 14
     private $reflection;
15 15
     private $ordering;
16 16
     private $columns;
@@ -92,9 +92,7 @@ class RelationJoiner
92 92
 
93 93
     private function addJoinsForTables(ReflectedTable $t1, PathTree $joins, array &$records, array $params, GenericDB $db)
94 94
     {
95
-
96 95
         foreach ($joins->getKeys() as $t2Name) {
97
-
98 96
             $t2 = $this->reflection->getTable($t2Name);
99 97
 
100 98
             $belongsTo = count($t1->getFksTo($t2->getName())) > 0;

+ 2
- 1
src/Tqdev/PhpCrudApi/RequestFactory.php View File

@@ -1,8 +1,9 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi;
3 4
 
4
-use Nyholm\Psr7Server\ServerRequestCreator;
5 5
 use Nyholm\Psr7\Factory\Psr17Factory;
6
+use Nyholm\Psr7Server\ServerRequestCreator;
6 7
 use Psr\Http\Message\ServerRequestInterface;
7 8
 
8 9
 class RequestFactory

+ 1
- 1
src/Tqdev/PhpCrudApi/RequestUtils.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi;
3 4
 
4 5
 use Psr\Http\Message\ServerRequestInterface;
@@ -94,5 +95,4 @@ class RequestUtils
94 95
         }
95 96
         return $allTableNames;
96 97
     }
97
-
98 98
 }

+ 9
- 9
src/Tqdev/PhpCrudApi/ResponseFactory.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi;
3 4
 
4 5
 use Nyholm\Psr7\Factory\Psr17Factory;
@@ -6,14 +7,14 @@ use Psr\Http\Message\ResponseInterface;
6 7
 
7 8
 class ResponseFactory
8 9
 {
9
-    const OK = 200;
10
-    const UNAUTHORIZED = 401;
11
-    const FORBIDDEN = 403;
12
-    const NOT_FOUND = 404;
13
-    const METHOD_NOT_ALLOWED = 405;
14
-    const CONFLICT = 409;
15
-    const UNPROCESSABLE_ENTITY = 422;
16
-    const INTERNAL_SERVER_ERROR = 500;
10
+    public const OK = 200;
11
+    public const UNAUTHORIZED = 401;
12
+    public const FORBIDDEN = 403;
13
+    public const NOT_FOUND = 404;
14
+    public const METHOD_NOT_ALLOWED = 405;
15
+    public const CONFLICT = 409;
16
+    public const UNPROCESSABLE_ENTITY = 422;
17
+    public const INTERNAL_SERVER_ERROR = 500;
17 18
 
18 19
     public static function fromHtml(int $status, string $html): ResponseInterface
19 20
     {
@@ -43,5 +44,4 @@ class ResponseFactory
43 44
         $psr17Factory = new Psr17Factory();
44 45
         return $psr17Factory->createResponse($status);
45 46
     }
46
-
47 47
 }

+ 1
- 0
src/Tqdev/PhpCrudApi/ResponseUtils.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi;
3 4
 
4 5
 use Psr\Http\Message\ResponseInterface;

+ 1
- 0
src/index.php View File

@@ -1,4 +1,5 @@
1 1
 <?php
2
+
2 3
 namespace Tqdev\PhpCrudApi;
3 4
 
4 5
 use Tqdev\PhpCrudApi\Api;

Loading…
Cancel
Save