Improved organisation of Services

This commit is contained in:
Jan Böhmer 2022-12-18 17:28:42 +01:00
parent c3308aaf24
commit a4eae19a1f
56 changed files with 100 additions and 97 deletions

View file

@ -20,9 +20,10 @@
declare(strict_types=1);
namespace App\Services;
namespace App\Services\Formatters;
use App\Entity\Parts\MeasurementUnit;
use App\Services\Formatters\SIFormatter;
use InvalidArgumentException;
use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;

View file

@ -20,7 +20,7 @@
declare(strict_types=1);
namespace App\Services;
namespace App\Services\Formatters;
use Symfony\Contracts\Translation\TranslatorInterface;

View file

@ -20,7 +20,7 @@
declare(strict_types=1);
namespace App\Services;
namespace App\Services\Formatters;
use App\Entity\PriceInformations\Currency;
use Locale;

View file

@ -20,7 +20,7 @@
declare(strict_types=1);
namespace App\Services;
namespace App\Services\Formatters;
/**
* A service that helps you to format values using the SI prefixes.

View file

@ -20,7 +20,7 @@
declare(strict_types=1);
namespace App\Services;
namespace App\Services\ImportExportSystem;
use App\Entity\Base\AbstractNamedDBElement;
use function in_array;

View file

@ -20,7 +20,7 @@
declare(strict_types=1);
namespace App\Services;
namespace App\Services\ImportExportSystem;
use App\Entity\Base\AbstractStructuralDBElement;
use function count;

View file

@ -43,7 +43,7 @@ namespace App\Services\LabelSystem;
use App\Entity\LabelSystem\LabelProfile;
use App\Repository\LabelProfileRepository;
use App\Services\UserCacheKeyGenerator;
use App\Services\UserSystem\UserCacheKeyGenerator;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Contracts\Cache\ItemInterface;
use Symfony\Contracts\Cache\TagAwareCacheInterface;

View file

@ -42,7 +42,7 @@ declare(strict_types=1);
namespace App\Services\LabelSystem\PlaceholderProviders;
use App\Entity\Parts\PartLot;
use App\Services\AmountFormatter;
use App\Services\Formatters\AmountFormatter;
use App\Services\LabelSystem\LabelTextReplacer;
use IntlDateFormatter;
use Locale;

View file

@ -42,7 +42,7 @@ declare(strict_types=1);
namespace App\Services\LabelSystem\PlaceholderProviders;
use App\Entity\Parts\Part;
use App\Services\SIFormatter;
use App\Services\Formatters\SIFormatter;
use Parsedown;
use Symfony\Contracts\Translation\TranslatorInterface;

View file

@ -20,7 +20,7 @@
declare(strict_types=1);
namespace App\Services;
namespace App\Services\Misc;
use App\Entity\Attachments\Attachment;
use function in_array;

View file

@ -20,7 +20,7 @@
declare(strict_types=1);
namespace App\Services;
namespace App\Services\Misc;
use Symfony\Component\HttpKernel\KernelInterface;

View file

@ -20,7 +20,7 @@
declare(strict_types=1);
namespace App\Services;
namespace App\Services\Parts;
use App\Entity\Parts\Part;
use App\Entity\PriceInformations\Currency;

View file

@ -18,7 +18,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace App\Services;
namespace App\Services\Tools;
use App\Entity\PriceInformations\Currency;
use Brick\Math\BigDecimal;

View file

@ -39,7 +39,7 @@ declare(strict_types=1);
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
namespace App\Services;
namespace App\Services\Tools;
use App\Entity\Attachments\Attachment;
use App\Entity\Attachments\AttachmentType;

View file

@ -20,12 +20,13 @@
declare(strict_types=1);
namespace App\Services;
namespace App\Services\Tools;
use App\Entity\Parts\Part;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use function \mb_strlen;
use function array_slice;
/**

View file

@ -24,7 +24,7 @@ namespace App\Services\Trees;
use App\Entity\Base\AbstractStructuralDBElement;
use App\Repository\StructuralDBElementRepository;
use App\Services\UserCacheKeyGenerator;
use App\Services\UserSystem\UserCacheKeyGenerator;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Contracts\Cache\ItemInterface;
use Symfony\Contracts\Cache\TagAwareCacheInterface;

View file

@ -20,7 +20,7 @@
declare(strict_types=1);
namespace App\Services;
namespace App\Services\Trees;
use App\Entity\Base\AbstractStructuralDBElement;
use Doctrine\ORM\EntityManagerInterface;

View file

@ -37,7 +37,7 @@ use App\Entity\PriceInformations\Currency;
use App\Entity\UserSystem\Group;
use App\Entity\UserSystem\User;
use App\Helpers\Trees\TreeViewNode;
use App\Services\UserCacheKeyGenerator;
use App\Services\UserSystem\UserCacheKeyGenerator;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Security\Core\Security;
use Symfony\Contracts\Cache\ItemInterface;

View file

@ -36,8 +36,8 @@ use App\Helpers\Trees\TreeViewNodeIterator;
use App\Helpers\Trees\TreeViewNodeState;
use App\Repository\StructuralDBElementRepository;
use App\Services\EntityURLGenerator;
use App\Services\MarkdownParser;
use App\Services\UserCacheKeyGenerator;
use App\Services\Formatters\MarkdownParser;
use App\Services\UserSystem\UserCacheKeyGenerator;
use Doctrine\ORM\EntityManagerInterface;
use InvalidArgumentException;
use RecursiveIteratorIterator;

View file

@ -20,7 +20,7 @@
declare(strict_types=1);
namespace App\Services;
namespace App\Services\UserSystem;
use App\Entity\UserSystem\User;
use Locale;