cleanup for 1.10 (#1906)
This commit is contained in:
@@ -103,7 +103,7 @@ return PhpCsFixer\Config::create()
|
||||
'phpdoc_inline_tag' => true,
|
||||
'phpdoc_no_access' => true,
|
||||
'phpdoc_no_alias_tag' => true,
|
||||
'phpdoc_no_empty_return' => true,
|
||||
'phpdoc_no_empty_return' => false,
|
||||
'phpdoc_no_package' => true,
|
||||
'phpdoc_no_useless_inheritdoc' => true,
|
||||
'phpdoc_return_self_reference' => true,
|
||||
|
||||
@@ -370,7 +370,7 @@ final class InvoiceController extends AbstractController
|
||||
* @Route(path="/template/{id}/delete", name="admin_invoice_template_delete", methods={"GET", "POST"})
|
||||
* @Security("is_granted('manage_invoice_template')")
|
||||
*/
|
||||
public function deleteTemplate(InvoiceTemplate $template, Request $request): Response
|
||||
public function deleteTemplate(InvoiceTemplate $template): Response
|
||||
{
|
||||
try {
|
||||
$this->templateRepository->removeTemplate($template);
|
||||
|
||||
@@ -237,7 +237,7 @@ class Configuration implements ConfigurationInterface
|
||||
->defaultValue([])
|
||||
->end()
|
||||
->booleanNode('simple_form')
|
||||
->defaultTrue()
|
||||
->defaultFalse()
|
||||
->end()
|
||||
->scalarNode('number_format')
|
||||
->defaultValue('{Y}/{cy,3}')
|
||||
|
||||
@@ -37,6 +37,7 @@ interface MetaDisplayEventInterface
|
||||
* Adds a field that should be displayed.
|
||||
*
|
||||
* @param MetaTableTypeInterface $meta
|
||||
* @return void
|
||||
*/
|
||||
public function addField(MetaTableTypeInterface $meta);
|
||||
public function addField(MetaTableTypeInterface $meta) /* : void */;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,12 @@ abstract class AbstractMergedCalculator extends AbstractCalculator
|
||||
$this->mergeInvoiceItems($invoiceItem, $entry);
|
||||
}
|
||||
|
||||
protected function mergeInvoiceItems(InvoiceItem $invoiceItem, InvoiceItemInterface $entry)
|
||||
/**
|
||||
* @param InvoiceItem $invoiceItem
|
||||
* @param InvoiceItemInterface $entry
|
||||
* @return void
|
||||
*/
|
||||
protected function mergeInvoiceItems(InvoiceItem $invoiceItem, InvoiceItemInterface $entry) /* : void */
|
||||
{
|
||||
$duration = $invoiceItem->getDuration();
|
||||
if (null !== $entry->getDuration()) {
|
||||
|
||||
@@ -53,7 +53,12 @@ abstract class AbstractSumInvoiceCalculator extends AbstractMergedCalculator imp
|
||||
return array_values($invoiceItems);
|
||||
}
|
||||
|
||||
protected function mergeSumInvoiceItem(InvoiceItem $invoiceItem, InvoiceItemInterface $entry)
|
||||
/**
|
||||
* @param InvoiceItem $invoiceItem
|
||||
* @param InvoiceItemInterface $entry
|
||||
* @return void
|
||||
*/
|
||||
protected function mergeSumInvoiceItem(InvoiceItem $invoiceItem, InvoiceItemInterface $entry) /* : void */
|
||||
{
|
||||
if (method_exists($this, 'mergeSumTimesheet')) {
|
||||
@trigger_error('mergeSumTimesheet() is deprecated and will be removed with 2.0 - use mergeSumInvoiceItem() instead', E_USER_DEPRECATED);
|
||||
|
||||
@@ -13,9 +13,6 @@ use App\Entity\Activity;
|
||||
use App\Entity\Project;
|
||||
use App\Entity\User;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class InvoiceItem
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -15,8 +15,9 @@ interface InvoiceItemRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* @param InvoiceItemInterface[] $invoiceItems
|
||||
* @return void
|
||||
*/
|
||||
public function setExported(array $invoiceItems);
|
||||
public function setExported(array $invoiceItems) /* : void */;
|
||||
|
||||
/**
|
||||
* @param InvoiceQuery $query
|
||||
|
||||
@@ -94,7 +94,8 @@ class PluginManager
|
||||
$json = json_decode(file_get_contents($composer), true);
|
||||
|
||||
$reqVersion = $json['extra']['kimai']['require'] ?? 'unknown';
|
||||
$version = $json['extra']['kimai']['version'] ?? 'unknown';
|
||||
// the version field is required if we use composer to install a plugin via var/packages/
|
||||
$version = $json['extra']['kimai']['version'] ?? ($json['version'] ?? 'unknown');
|
||||
$description = $json['description'] ?? '';
|
||||
|
||||
$homepage = $json['homepage'] ?? Constants::HOMEPAGE . '/store/';
|
||||
|
||||
@@ -14,6 +14,9 @@ use App\Entity\ActivityRate;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\ORM\ORMException;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<ActivityRate>
|
||||
*/
|
||||
class ActivityRateRepository extends EntityRepository
|
||||
{
|
||||
public function saveRate(ActivityRate $rate)
|
||||
|
||||
@@ -25,6 +25,9 @@ use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Pagerfanta\Pagerfanta;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<Activity>
|
||||
*/
|
||||
class ActivityRepository extends EntityRepository
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -15,6 +15,9 @@ use App\Form\Model\SystemConfiguration;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\ORM\ORMException;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<Configuration>
|
||||
*/
|
||||
class ConfigurationRepository extends EntityRepository implements ConfigLoaderInterface
|
||||
{
|
||||
private static $cacheByPrefix = null;
|
||||
|
||||
@@ -14,6 +14,9 @@ use App\Entity\CustomerRate;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\ORM\ORMException;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<CustomerRate>
|
||||
*/
|
||||
class CustomerRateRepository extends EntityRepository
|
||||
{
|
||||
public function saveRate(CustomerRate $rate)
|
||||
|
||||
@@ -27,6 +27,9 @@ use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Pagerfanta\Pagerfanta;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<Customer>
|
||||
*/
|
||||
class CustomerRepository extends EntityRepository
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -20,6 +20,9 @@ use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Pagerfanta\Pagerfanta;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<Invoice>
|
||||
*/
|
||||
class InvoiceRepository extends EntityRepository
|
||||
{
|
||||
public function saveInvoice(Invoice $invoice)
|
||||
|
||||
@@ -16,6 +16,9 @@ use Doctrine\ORM\QueryBuilder;
|
||||
use Pagerfanta\Adapter\DoctrineORMAdapter;
|
||||
use Pagerfanta\Pagerfanta;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<InvoiceTemplate>
|
||||
*/
|
||||
class InvoiceTemplateRepository extends EntityRepository
|
||||
{
|
||||
public function hasTemplate(): bool
|
||||
|
||||
@@ -14,6 +14,9 @@ use App\Entity\ProjectRate;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\ORM\ORMException;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<ProjectRate>
|
||||
*/
|
||||
class ProjectRateRepository extends EntityRepository
|
||||
{
|
||||
public function saveRate(ProjectRate $rate)
|
||||
|
||||
@@ -26,6 +26,9 @@ use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Pagerfanta\Pagerfanta;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<Project>
|
||||
*/
|
||||
class ProjectRepository extends EntityRepository
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -14,6 +14,9 @@ use App\Entity\RolePermission;
|
||||
use Doctrine\ORM\AbstractQuery;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<RolePermission>
|
||||
*/
|
||||
class RolePermissionRepository extends EntityRepository
|
||||
{
|
||||
public function saveRolePermission(RolePermission $permission)
|
||||
|
||||
@@ -14,6 +14,7 @@ use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\ORM\ORMException;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<Role>
|
||||
* @method Role[] findAll()
|
||||
*/
|
||||
class RoleRepository extends EntityRepository
|
||||
|
||||
@@ -18,6 +18,9 @@ use Doctrine\ORM\QueryBuilder;
|
||||
use Pagerfanta\Adapter\DoctrineORMAdapter;
|
||||
use Pagerfanta\Pagerfanta;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<Tag>
|
||||
*/
|
||||
class TagRepository extends EntityRepository
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -21,6 +21,9 @@ use Doctrine\ORM\ORMException;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Pagerfanta\Pagerfanta;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<Team>
|
||||
*/
|
||||
class TeamRepository extends EntityRepository
|
||||
{
|
||||
public function find($id, $lockMode = null, $lockVersion = null)
|
||||
|
||||
@@ -28,6 +28,9 @@ use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Pagerfanta\Pagerfanta;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<Timesheet>
|
||||
*/
|
||||
class TimesheetRepository extends EntityRepository
|
||||
{
|
||||
public const STATS_QUERY_DURATION = 'duration';
|
||||
|
||||
@@ -24,6 +24,9 @@ use Pagerfanta\Adapter\DoctrineORMAdapter;
|
||||
use Pagerfanta\Pagerfanta;
|
||||
use Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<User>
|
||||
*/
|
||||
class UserRepository extends EntityRepository implements UserLoaderInterface
|
||||
{
|
||||
public function getById($id): ?User
|
||||
|
||||
@@ -28,7 +28,7 @@ interface WidgetRendererInterface
|
||||
* The given $options array overwrites the widgets internal options for this call.
|
||||
*
|
||||
* @param WidgetInterface $widget
|
||||
* @param array $options
|
||||
* @param array<string, mixed> $options
|
||||
* @return string
|
||||
*/
|
||||
public function render(WidgetInterface $widget, array $options = []): string;
|
||||
|
||||
@@ -295,7 +295,7 @@ class ConfigurationTest extends TestCase
|
||||
0 => 'var/invoices/',
|
||||
1 => 'templates/invoice/renderer/',
|
||||
],
|
||||
'simple_form' => true,
|
||||
'simple_form' => false,
|
||||
'number_format' => '{Y}/{cy,3}',
|
||||
],
|
||||
'export' => [
|
||||
|
||||
Reference in New Issue
Block a user