Skip to content

Commit 4e1a99e

Browse files
committed
Use PHP7 class name style instead of strongly typed names
1 parent 6f1ebef commit 4e1a99e

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

src/LightQL/LightQL.php

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,18 @@
3333
namespace ElementaryFramework\LightQL;
3434

3535
use ElementaryFramework\Annotations\Annotations;
36+
use ElementaryFramework\LightQL\Annotations\AutoIncrementAnnotation;
37+
use ElementaryFramework\LightQL\Annotations\ColumnAnnotation;
38+
use ElementaryFramework\LightQL\Annotations\EntityAnnotation;
39+
use ElementaryFramework\LightQL\Annotations\IdAnnotation;
40+
use ElementaryFramework\LightQL\Annotations\ManyToManyAnnotation;
41+
use ElementaryFramework\LightQL\Annotations\ManyToOneAnnotation;
42+
use ElementaryFramework\LightQL\Annotations\NamedQueryAnnotation;
43+
use ElementaryFramework\LightQL\Annotations\NotNullAnnotation;
44+
use ElementaryFramework\LightQL\Annotations\OneToManyAnnotation;
45+
use ElementaryFramework\LightQL\Annotations\PersistenceUnitAnnotation;
46+
use ElementaryFramework\LightQL\Annotations\SizeAnnotation;
47+
use ElementaryFramework\LightQL\Annotations\UniqueAnnotation;
3648
use ElementaryFramework\LightQL\Exceptions\LightQLException;
3749

3850
/**
@@ -59,18 +71,18 @@ public static function registerAnnotations()
5971
{
6072
$manager = Annotations::getManager();
6173

62-
$manager->registerAnnotation("entity", "ElementaryFramework\\LightQL\\Annotations\\EntityAnnotation");
63-
$manager->registerAnnotation("column", "ElementaryFramework\\LightQL\\Annotations\\ColumnAnnotation");
64-
$manager->registerAnnotation("id", "ElementaryFramework\\LightQL\\Annotations\\IdAnnotation");
65-
$manager->registerAnnotation("unique", "ElementaryFramework\\LightQL\\Annotations\\UniqueAnnotation");
66-
$manager->registerAnnotation("autoIncrement", "ElementaryFramework\\LightQL\\Annotations\\AutoIncrementAnnotation");
67-
$manager->registerAnnotation("notNull", "ElementaryFramework\\LightQL\\Annotations\\NotNullAnnotation");
68-
$manager->registerAnnotation("size", "ElementaryFramework\\LightQL\\Annotations\\SizeAnnotation");
69-
$manager->registerAnnotation("manyToMany", "ElementaryFramework\\LightQL\\Annotations\\ManyToManyAnnotation");
70-
$manager->registerAnnotation("manyToOne", "ElementaryFramework\\LightQL\\Annotations\\ManyToOneAnnotation");
71-
$manager->registerAnnotation("oneToMany", "ElementaryFramework\\LightQL\\Annotations\\OneToManyAnnotation");
72-
$manager->registerAnnotation("persistenceUnit", "ElementaryFramework\\LightQL\\Annotations\\PersistenceUnitAnnotation");
73-
$manager->registerAnnotation("namedQuery", "ElementaryFramework\\LightQL\\Annotations\\NamedQueryAnnotation");
74+
$manager->registerAnnotation("entity", EntityAnnotation::class);
75+
$manager->registerAnnotation("column", ColumnAnnotation::class);
76+
$manager->registerAnnotation("id", IdAnnotation::class);
77+
$manager->registerAnnotation("unique", UniqueAnnotation::class);
78+
$manager->registerAnnotation("autoIncrement", AutoIncrementAnnotation::class);
79+
$manager->registerAnnotation("notNull", NotNullAnnotation::class);
80+
$manager->registerAnnotation("size", SizeAnnotation::class);
81+
$manager->registerAnnotation("manyToMany", ManyToManyAnnotation::class);
82+
$manager->registerAnnotation("manyToOne", ManyToOneAnnotation::class);
83+
$manager->registerAnnotation("oneToMany", OneToManyAnnotation::class);
84+
$manager->registerAnnotation("persistenceUnit", PersistenceUnitAnnotation::class);
85+
$manager->registerAnnotation("namedQuery", NamedQueryAnnotation::class);
7486
}
7587

7688
/**

0 commit comments

Comments
 (0)