Skip to content

Commit

Permalink
fix type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyraul committed Jul 31, 2024
1 parent 7bc72d8 commit 8bc1078
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 28 deletions.
11 changes: 7 additions & 4 deletions src/Jeeves/Generators/Crud/Ui/Actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,17 @@ public function getActions(
->setVisibility('protected');

$namespace->addUse('\Mygento\Base\Ui\Component\Listing\Actions');
$router->setType('string');
$cont->setType('string');
$router->addComment('@var string');
$cont->addComment('@var string');
// not supported by Mygento/Base
// $router->setType('string');
// $cont->setType('string');

if ($primaryKey !== 'id') {
$key = $class->addProperty('key', $primaryKey)
->setVisibility('protected');

$key->setType('string');
$key->addComment('@var string');
// $key->setType('string'); not supported by Mygento/Base
}

return $namespace;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

class CardActions extends Actions
{
protected string $route = 'sample_module';
protected string $controller = 'card';
protected string $key = 'card_id';
/** @var string */
protected $route = 'sample_module';

/** @var string */
protected $controller = 'card';

/** @var string */
protected $key = 'card_id';
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

class CartItemActions extends Actions
{
protected string $route = 'sample_module';
protected string $controller = 'cartitem';
protected string $key = 'cart_id';
/** @var string */
protected $route = 'sample_module';

/** @var string */
protected $controller = 'cartitem';

/** @var string */
protected $key = 'cart_id';
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

class ColumnsActions extends Actions
{
protected string $route = 'sample_module';
protected string $controller = 'columns';
/** @var string */
protected $route = 'sample_module';

/** @var string */
protected $controller = 'columns';
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

class CardActions extends Actions
{
protected string $route = 'sample_module';
protected string $controller = 'card';
protected string $key = 'card_id';
/** @var string */
protected $route = 'sample_module';

/** @var string */
protected $controller = 'card';

/** @var string */
protected $key = 'card_id';
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

class CartItemActions extends Actions
{
protected string $route = 'sample_module';
protected string $controller = 'cartitem';
protected string $key = 'cart_id';
/** @var string */
protected $route = 'sample_module';

/** @var string */
protected $controller = 'cartitem';

/** @var string */
protected $key = 'cart_id';
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

class ColumnsActions extends Actions
{
protected string $route = 'sample_module';
protected string $controller = 'columns';
/** @var string */
protected $route = 'sample_module';

/** @var string */
protected $controller = 'columns';
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

class CardActions extends Actions
{
protected string $route = 'sample_module';
protected string $controller = 'card';
protected string $key = 'card_id';
/** @var string */
protected $route = 'sample_module';

/** @var string */
protected $controller = 'card';

/** @var string */
protected $key = 'card_id';
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

class CartItemActions extends Actions
{
protected string $route = 'sample_module';
protected string $controller = 'cartitem';
protected string $key = 'cart_id';
/** @var string */
protected $route = 'sample_module';

/** @var string */
protected $controller = 'cartitem';

/** @var string */
protected $key = 'cart_id';
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

class ColumnsActions extends Actions
{
protected string $route = 'sample_module';
protected string $controller = 'columns';
/** @var string */
protected $route = 'sample_module';

/** @var string */
protected $controller = 'columns';
}

0 comments on commit 8bc1078

Please sign in to comment.