diff --git a/.jeeves.phpunit_v1.yaml b/.jeeves.phpunit_v1.yaml index aa2f713..f411432 100644 --- a/.jeeves.phpunit_v1.yaml +++ b/.jeeves.phpunit_v1.yaml @@ -153,7 +153,7 @@ Mygento: type: varchar family: type: varchar - is_active: + active: type: boolean product_id: type: int diff --git a/src/Jeeves/Generators/Crud/Common.php b/src/Jeeves/Generators/Crud/Common.php index 4abc843..f03a1de 100644 --- a/src/Jeeves/Generators/Crud/Common.php +++ b/src/Jeeves/Generators/Crud/Common.php @@ -129,4 +129,49 @@ protected function isNullable(array $value): bool return isset($value['nullable']) && $value['nullable'] === false; } + + protected function createGetterName(string $name, array $params): array + { + $method = $this->snakeCaseToUpperCamelCase($name); + if ($params['type'] === 'boolean') { + if (str_starts_with($name, 'is_') || + str_starts_with($name, 'has_') || + str_starts_with($name, 'can_') || + str_starts_with($name, 'should_') + ) { + return [ + $this->snakeCaseToCamelCase($name), + ucfirst(str_replace('_', ' ', $name)), + ]; + } + + return [ + 'is' . $method, + 'Is ' . str_replace('_', ' ', $name), + ]; + } + + return [ + 'get' . $method, + 'Get ' . str_replace('_', ' ', $name), + ]; + } + + protected function createSetterName(string $name, array $params): array + { + $method = $this->snakeCaseToUpperCamelCase($name); + if ($params['type'] === 'boolean') { + if (str_starts_with($name, 'is_')) { + return [ + 'set' . substr($method, 2), + 'Set ' . str_replace('_', ' ', substr($name, 3)), + ]; + } + } + + return [ + 'set' . $method, + 'Set ' . str_replace('_', ' ', $name), + ]; + } } diff --git a/src/Jeeves/Generators/Crud/Interfaces/Model.php b/src/Jeeves/Generators/Crud/Interfaces/Model.php index 77d6513..eef220e 100644 --- a/src/Jeeves/Generators/Crud/Interfaces/Model.php +++ b/src/Jeeves/Generators/Crud/Interfaces/Model.php @@ -52,17 +52,20 @@ public function genModelInterface( if (isset($value['identity']) && $value['identity'] === true) { $generated = true; } - $c = $interface->addConstant(strtoupper($name), strtolower($name))->setPublic(); + $c = $interface->addConstant(strtoupper($name), strtolower($name)) + ->setPublic(); if ($hasTypedConst) { $c->setType('string'); } - $method = $this->snakeCaseToUpperCamelCase($name); - $get = $interface->addMethod('get' . $method) + + $getter = $this->createGetterName($name, $value); + $get = $interface->addMethod($getter[0]) ->setVisibility('public'); - $get->addComment('Get ' . str_replace('_', ' ', $name)); + $get->addComment($getter[1]); - $set = $interface->addMethod('set' . $method); - $set->addComment('Set ' . str_replace('_', ' ', $name)) + $setter = $this->createSetterName($name, $value); + $set = $interface->addMethod($setter[0]); + $set->addComment($setter[1]) ->setVisibility('public'); $param = $set->addParameter($this->snakeCaseToCamelCase($name)); @@ -73,7 +76,9 @@ public function genModelInterface( $set->setReturnType('self'); if ($hasApi) { - $get->addComment('@return ' . $this->convertType($value['type']) . ($notNullable ? '' : '|null')); + $get->addComment( + '@return ' . $this->convertType($value['type']) . ($notNullable ? '' : '|null') + ); $set->addComment('@return $this'); } @@ -81,7 +86,9 @@ public function genModelInterface( $param->setNullable(false); $param->setType(null); - $set->addComment('@param ' . $this->convertType($value['type']) . ' $' . $this->snakeCaseToCamelCase($name)); + $set->addComment( + '@param ' . $this->convertType($value['type']) . ' $' . $this->snakeCaseToCamelCase($name) + ); } } @@ -99,7 +106,9 @@ public function genModelInterface( ->setVisibility('public'); if ($hasApi) { - $getId->addComment('@return ' . $this->convertType($item['type']) . ($item['nullable'] ? '|null' : '')); + $getId->addComment( + '@return ' . $this->convertType($item['type']) . ($item['nullable'] ? '|null' : '') + ); } $getId->setReturnType($this->convertType($item['type'])); @@ -111,7 +120,9 @@ public function genModelInterface( ->setVisibility('public'); $setId->addParameter(self::DEFAULT_KEY); - $setId->addComment('@param ' . $this->convertType($item['type']) . ' $id'); + $setId->addComment( + '@param ' . $this->convertType($item['type']) . ' $id' + ); if ($hasApi) { $setId->addComment('@return $this'); diff --git a/src/Jeeves/Generators/Crud/Models/Model.php b/src/Jeeves/Generators/Crud/Models/Model.php index 1ba7337..33e1819 100644 --- a/src/Jeeves/Generators/Crud/Models/Model.php +++ b/src/Jeeves/Generators/Crud/Models/Model.php @@ -62,14 +62,16 @@ public function genModel( if (isset($value['identity']) && $value['identity'] === true) { $generated = true; } - $method = $this->snakeCaseToUpperCamelCase($name); - $getter = $class->addMethod('get' . $method) - ->addComment('Get ' . str_replace('_', ' ', $name)) + + $getterName = $this->createGetterName($name, $value); + $getter = $class->addMethod($getterName[0]) + ->addComment($getterName[1]) ->setVisibility('public') ->setBody('return $this->getData(self::' . strtoupper($name) . ');'); - $setter = $class->addMethod('set' . $method) - ->addComment('Set ' . str_replace('_', ' ', $name)) + $setterName = $this->createSetterName($name, $value); + $setter = $class->addMethod($setterName[0]) + ->addComment($setterName[1]) ->setVisibility('public'); $setParam = $setter->addParameter($this->snakeCaseToCamelCase($name)); $setter->setBody('return $this->setData(self::' . strtoupper($name) . ', $' . $this->snakeCaseToCamelCase($name) . ');'); diff --git a/test/Expectations/Crud/81/v1/Api/Data/CardInterface.php b/test/Expectations/Crud/81/v1/Api/Data/CardInterface.php index 111e604..08c0fae 100644 --- a/test/Expectations/Crud/81/v1/Api/Data/CardInterface.php +++ b/test/Expectations/Crud/81/v1/Api/Data/CardInterface.php @@ -66,16 +66,16 @@ public function getCategoryId(): int; public function setCategoryId(int $categoryId): self; /** - * Get is active + * Is active * @return bool */ - public function getIsActive(): bool; + public function isActive(): bool; /** - * Set is active + * Set active * @return $this */ - public function setIsActive(bool $isActive): self; + public function setActive(bool $isActive): self; /** * Get store id diff --git a/test/Expectations/Crud/81/v1/Api/Data/CartItemInterface.php b/test/Expectations/Crud/81/v1/Api/Data/CartItemInterface.php index ca9f252..46696f1 100644 --- a/test/Expectations/Crud/81/v1/Api/Data/CartItemInterface.php +++ b/test/Expectations/Crud/81/v1/Api/Data/CartItemInterface.php @@ -26,14 +26,14 @@ public function getCartId(): ?int; public function setCartId(?int $cartId): self; /** - * Get is active + * Is active */ - public function getIsActive(): bool; + public function isActive(): bool; /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self; + public function setActive(bool $isActive): self; /** * Get delivery date diff --git a/test/Expectations/Crud/81/v1/Api/Data/ColumnsInterface.php b/test/Expectations/Crud/81/v1/Api/Data/ColumnsInterface.php index c405527..6257361 100644 --- a/test/Expectations/Crud/81/v1/Api/Data/ColumnsInterface.php +++ b/test/Expectations/Crud/81/v1/Api/Data/ColumnsInterface.php @@ -28,19 +28,19 @@ public function getId(): ?int; public function setId($id): self; /** - * Get is active + * Is active */ - public function getIsActive(): bool; + public function isActive(): bool; /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self; + public function setActive(bool $isActive): self; /** - * Get has flag + * Has flag */ - public function getHasFlag(): ?bool; + public function hasFlag(): ?bool; /** * Set has flag diff --git a/test/Expectations/Crud/81/v1/Api/Data/PosterInterface.php b/test/Expectations/Crud/81/v1/Api/Data/PosterInterface.php index f2cc4fb..b2c22ba 100644 --- a/test/Expectations/Crud/81/v1/Api/Data/PosterInterface.php +++ b/test/Expectations/Crud/81/v1/Api/Data/PosterInterface.php @@ -14,7 +14,7 @@ interface PosterInterface extends IdentityInterface public const NAME = 'name'; public const SUBNAME = 'subname'; public const FAMILY = 'family'; - public const IS_ACTIVE = 'is_active'; + public const ACTIVE = 'active'; public const PRODUCT_ID = 'product_id'; /** @@ -67,16 +67,16 @@ public function getFamily(): ?string; public function setFamily(?string $family): self; /** - * Get is active + * Is active * @return bool */ - public function getIsActive(): bool; + public function isActive(): bool; /** - * Set is active + * Set active * @return $this */ - public function setIsActive(bool $isActive): self; + public function setActive(bool $active): self; /** * Get product id diff --git a/test/Expectations/Crud/81/v1/Api/Data/TicketInterface.php b/test/Expectations/Crud/81/v1/Api/Data/TicketInterface.php index 1326fa3..bc60e06 100644 --- a/test/Expectations/Crud/81/v1/Api/Data/TicketInterface.php +++ b/test/Expectations/Crud/81/v1/Api/Data/TicketInterface.php @@ -29,14 +29,14 @@ public function getName(): ?string; public function setName(?string $name): self; /** - * Get is active + * Is active */ - public function getIsActive(): bool; + public function isActive(): bool; /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self; + public function setActive(bool $isActive): self; /** * Get ID diff --git a/test/Expectations/Crud/81/v1/Model/Card.php b/test/Expectations/Crud/81/v1/Model/Card.php index 5fcffbc..084d790 100644 --- a/test/Expectations/Crud/81/v1/Model/Card.php +++ b/test/Expectations/Crud/81/v1/Model/Card.php @@ -80,17 +80,17 @@ public function setCategoryId(int $categoryId): self } /** - * Get is active + * Is active */ - public function getIsActive(): bool + public function isActive(): bool { return $this->getData(self::IS_ACTIVE); } /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self + public function setActive(bool $isActive): self { return $this->setData(self::IS_ACTIVE, $isActive); } diff --git a/test/Expectations/Crud/81/v1/Model/CartItem.php b/test/Expectations/Crud/81/v1/Model/CartItem.php index 36417dd..9f44d89 100644 --- a/test/Expectations/Crud/81/v1/Model/CartItem.php +++ b/test/Expectations/Crud/81/v1/Model/CartItem.php @@ -27,17 +27,17 @@ public function setCartId(?int $cartId): self } /** - * Get is active + * Is active */ - public function getIsActive(): bool + public function isActive(): bool { return $this->getData(self::IS_ACTIVE); } /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self + public function setActive(bool $isActive): self { return $this->setData(self::IS_ACTIVE, $isActive); } diff --git a/test/Expectations/Crud/81/v1/Model/Columns.php b/test/Expectations/Crud/81/v1/Model/Columns.php index 003e13d..fc99b3f 100644 --- a/test/Expectations/Crud/81/v1/Model/Columns.php +++ b/test/Expectations/Crud/81/v1/Model/Columns.php @@ -28,25 +28,25 @@ public function setId($id): self } /** - * Get is active + * Is active */ - public function getIsActive(): bool + public function isActive(): bool { return $this->getData(self::IS_ACTIVE); } /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self + public function setActive(bool $isActive): self { return $this->setData(self::IS_ACTIVE, $isActive); } /** - * Get has flag + * Has flag */ - public function getHasFlag(): ?bool + public function hasFlag(): ?bool { return $this->getData(self::HAS_FLAG); } diff --git a/test/Expectations/Crud/81/v1/Model/Poster.php b/test/Expectations/Crud/81/v1/Model/Poster.php index cdfada8..a1280ae 100644 --- a/test/Expectations/Crud/81/v1/Model/Poster.php +++ b/test/Expectations/Crud/81/v1/Model/Poster.php @@ -81,19 +81,19 @@ public function setFamily(?string $family): self } /** - * Get is active + * Is active */ - public function getIsActive(): bool + public function isActive(): bool { - return $this->getData(self::IS_ACTIVE); + return $this->getData(self::ACTIVE); } /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self + public function setActive(bool $active): self { - return $this->setData(self::IS_ACTIVE, $isActive); + return $this->setData(self::ACTIVE, $active); } /** diff --git a/test/Expectations/Crud/81/v1/Model/Ticket.php b/test/Expectations/Crud/81/v1/Model/Ticket.php index 0c6851c..eb409e4 100644 --- a/test/Expectations/Crud/81/v1/Model/Ticket.php +++ b/test/Expectations/Crud/81/v1/Model/Ticket.php @@ -43,17 +43,17 @@ public function setName(?string $name): self } /** - * Get is active + * Is active */ - public function getIsActive(): bool + public function isActive(): bool { return $this->getData(self::IS_ACTIVE); } /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self + public function setActive(bool $isActive): self { return $this->setData(self::IS_ACTIVE, $isActive); } diff --git a/test/Expectations/Crud/81/v1/etc/db_schema.xml b/test/Expectations/Crud/81/v1/etc/db_schema.xml index 2292dab..225db6a 100644 --- a/test/Expectations/Crud/81/v1/etc/db_schema.xml +++ b/test/Expectations/Crud/81/v1/etc/db_schema.xml @@ -76,7 +76,7 @@ - + diff --git a/test/Expectations/Crud/81/v1/view/adminhtml/ui_component/sample_module_poster_listing.xml b/test/Expectations/Crud/81/v1/view/adminhtml/ui_component/sample_module_poster_listing.xml index 37c8a22..236e071 100644 --- a/test/Expectations/Crud/81/v1/view/adminhtml/ui_component/sample_module_poster_listing.xml +++ b/test/Expectations/Crud/81/v1/view/adminhtml/ui_component/sample_module_poster_listing.xml @@ -87,14 +87,14 @@ - + select select select - + diff --git a/test/Expectations/Crud/82/v1/Api/Data/CardInterface.php b/test/Expectations/Crud/82/v1/Api/Data/CardInterface.php index 111e604..08c0fae 100644 --- a/test/Expectations/Crud/82/v1/Api/Data/CardInterface.php +++ b/test/Expectations/Crud/82/v1/Api/Data/CardInterface.php @@ -66,16 +66,16 @@ public function getCategoryId(): int; public function setCategoryId(int $categoryId): self; /** - * Get is active + * Is active * @return bool */ - public function getIsActive(): bool; + public function isActive(): bool; /** - * Set is active + * Set active * @return $this */ - public function setIsActive(bool $isActive): self; + public function setActive(bool $isActive): self; /** * Get store id diff --git a/test/Expectations/Crud/82/v1/Api/Data/CartItemInterface.php b/test/Expectations/Crud/82/v1/Api/Data/CartItemInterface.php index ca9f252..46696f1 100644 --- a/test/Expectations/Crud/82/v1/Api/Data/CartItemInterface.php +++ b/test/Expectations/Crud/82/v1/Api/Data/CartItemInterface.php @@ -26,14 +26,14 @@ public function getCartId(): ?int; public function setCartId(?int $cartId): self; /** - * Get is active + * Is active */ - public function getIsActive(): bool; + public function isActive(): bool; /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self; + public function setActive(bool $isActive): self; /** * Get delivery date diff --git a/test/Expectations/Crud/82/v1/Api/Data/ColumnsInterface.php b/test/Expectations/Crud/82/v1/Api/Data/ColumnsInterface.php index c405527..6257361 100644 --- a/test/Expectations/Crud/82/v1/Api/Data/ColumnsInterface.php +++ b/test/Expectations/Crud/82/v1/Api/Data/ColumnsInterface.php @@ -28,19 +28,19 @@ public function getId(): ?int; public function setId($id): self; /** - * Get is active + * Is active */ - public function getIsActive(): bool; + public function isActive(): bool; /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self; + public function setActive(bool $isActive): self; /** - * Get has flag + * Has flag */ - public function getHasFlag(): ?bool; + public function hasFlag(): ?bool; /** * Set has flag diff --git a/test/Expectations/Crud/82/v1/Api/Data/PosterInterface.php b/test/Expectations/Crud/82/v1/Api/Data/PosterInterface.php index f2cc4fb..b2c22ba 100644 --- a/test/Expectations/Crud/82/v1/Api/Data/PosterInterface.php +++ b/test/Expectations/Crud/82/v1/Api/Data/PosterInterface.php @@ -14,7 +14,7 @@ interface PosterInterface extends IdentityInterface public const NAME = 'name'; public const SUBNAME = 'subname'; public const FAMILY = 'family'; - public const IS_ACTIVE = 'is_active'; + public const ACTIVE = 'active'; public const PRODUCT_ID = 'product_id'; /** @@ -67,16 +67,16 @@ public function getFamily(): ?string; public function setFamily(?string $family): self; /** - * Get is active + * Is active * @return bool */ - public function getIsActive(): bool; + public function isActive(): bool; /** - * Set is active + * Set active * @return $this */ - public function setIsActive(bool $isActive): self; + public function setActive(bool $active): self; /** * Get product id diff --git a/test/Expectations/Crud/82/v1/Api/Data/TicketInterface.php b/test/Expectations/Crud/82/v1/Api/Data/TicketInterface.php index 1326fa3..bc60e06 100644 --- a/test/Expectations/Crud/82/v1/Api/Data/TicketInterface.php +++ b/test/Expectations/Crud/82/v1/Api/Data/TicketInterface.php @@ -29,14 +29,14 @@ public function getName(): ?string; public function setName(?string $name): self; /** - * Get is active + * Is active */ - public function getIsActive(): bool; + public function isActive(): bool; /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self; + public function setActive(bool $isActive): self; /** * Get ID diff --git a/test/Expectations/Crud/82/v1/Model/Card.php b/test/Expectations/Crud/82/v1/Model/Card.php index 5fcffbc..084d790 100644 --- a/test/Expectations/Crud/82/v1/Model/Card.php +++ b/test/Expectations/Crud/82/v1/Model/Card.php @@ -80,17 +80,17 @@ public function setCategoryId(int $categoryId): self } /** - * Get is active + * Is active */ - public function getIsActive(): bool + public function isActive(): bool { return $this->getData(self::IS_ACTIVE); } /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self + public function setActive(bool $isActive): self { return $this->setData(self::IS_ACTIVE, $isActive); } diff --git a/test/Expectations/Crud/82/v1/Model/CartItem.php b/test/Expectations/Crud/82/v1/Model/CartItem.php index 36417dd..9f44d89 100644 --- a/test/Expectations/Crud/82/v1/Model/CartItem.php +++ b/test/Expectations/Crud/82/v1/Model/CartItem.php @@ -27,17 +27,17 @@ public function setCartId(?int $cartId): self } /** - * Get is active + * Is active */ - public function getIsActive(): bool + public function isActive(): bool { return $this->getData(self::IS_ACTIVE); } /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self + public function setActive(bool $isActive): self { return $this->setData(self::IS_ACTIVE, $isActive); } diff --git a/test/Expectations/Crud/82/v1/Model/Columns.php b/test/Expectations/Crud/82/v1/Model/Columns.php index 003e13d..fc99b3f 100644 --- a/test/Expectations/Crud/82/v1/Model/Columns.php +++ b/test/Expectations/Crud/82/v1/Model/Columns.php @@ -28,25 +28,25 @@ public function setId($id): self } /** - * Get is active + * Is active */ - public function getIsActive(): bool + public function isActive(): bool { return $this->getData(self::IS_ACTIVE); } /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self + public function setActive(bool $isActive): self { return $this->setData(self::IS_ACTIVE, $isActive); } /** - * Get has flag + * Has flag */ - public function getHasFlag(): ?bool + public function hasFlag(): ?bool { return $this->getData(self::HAS_FLAG); } diff --git a/test/Expectations/Crud/82/v1/Model/Poster.php b/test/Expectations/Crud/82/v1/Model/Poster.php index cdfada8..a1280ae 100644 --- a/test/Expectations/Crud/82/v1/Model/Poster.php +++ b/test/Expectations/Crud/82/v1/Model/Poster.php @@ -81,19 +81,19 @@ public function setFamily(?string $family): self } /** - * Get is active + * Is active */ - public function getIsActive(): bool + public function isActive(): bool { - return $this->getData(self::IS_ACTIVE); + return $this->getData(self::ACTIVE); } /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self + public function setActive(bool $active): self { - return $this->setData(self::IS_ACTIVE, $isActive); + return $this->setData(self::ACTIVE, $active); } /** diff --git a/test/Expectations/Crud/82/v1/Model/Ticket.php b/test/Expectations/Crud/82/v1/Model/Ticket.php index 0c6851c..eb409e4 100644 --- a/test/Expectations/Crud/82/v1/Model/Ticket.php +++ b/test/Expectations/Crud/82/v1/Model/Ticket.php @@ -43,17 +43,17 @@ public function setName(?string $name): self } /** - * Get is active + * Is active */ - public function getIsActive(): bool + public function isActive(): bool { return $this->getData(self::IS_ACTIVE); } /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self + public function setActive(bool $isActive): self { return $this->setData(self::IS_ACTIVE, $isActive); } diff --git a/test/Expectations/Crud/82/v1/etc/db_schema.xml b/test/Expectations/Crud/82/v1/etc/db_schema.xml index 2292dab..225db6a 100644 --- a/test/Expectations/Crud/82/v1/etc/db_schema.xml +++ b/test/Expectations/Crud/82/v1/etc/db_schema.xml @@ -76,7 +76,7 @@ - + diff --git a/test/Expectations/Crud/82/v1/view/adminhtml/ui_component/sample_module_poster_listing.xml b/test/Expectations/Crud/82/v1/view/adminhtml/ui_component/sample_module_poster_listing.xml index 37c8a22..236e071 100644 --- a/test/Expectations/Crud/82/v1/view/adminhtml/ui_component/sample_module_poster_listing.xml +++ b/test/Expectations/Crud/82/v1/view/adminhtml/ui_component/sample_module_poster_listing.xml @@ -87,14 +87,14 @@ - + select select select - + diff --git a/test/Expectations/Crud/83/v1/Api/Data/CardInterface.php b/test/Expectations/Crud/83/v1/Api/Data/CardInterface.php index 0ba7398..7c0908f 100644 --- a/test/Expectations/Crud/83/v1/Api/Data/CardInterface.php +++ b/test/Expectations/Crud/83/v1/Api/Data/CardInterface.php @@ -66,16 +66,16 @@ public function getCategoryId(): int; public function setCategoryId(int $categoryId): self; /** - * Get is active + * Is active * @return bool */ - public function getIsActive(): bool; + public function isActive(): bool; /** - * Set is active + * Set active * @return $this */ - public function setIsActive(bool $isActive): self; + public function setActive(bool $isActive): self; /** * Get store id diff --git a/test/Expectations/Crud/83/v1/Api/Data/CartItemInterface.php b/test/Expectations/Crud/83/v1/Api/Data/CartItemInterface.php index a1c43de..6446329 100644 --- a/test/Expectations/Crud/83/v1/Api/Data/CartItemInterface.php +++ b/test/Expectations/Crud/83/v1/Api/Data/CartItemInterface.php @@ -26,14 +26,14 @@ public function getCartId(): ?int; public function setCartId(?int $cartId): self; /** - * Get is active + * Is active */ - public function getIsActive(): bool; + public function isActive(): bool; /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self; + public function setActive(bool $isActive): self; /** * Get delivery date diff --git a/test/Expectations/Crud/83/v1/Api/Data/ColumnsInterface.php b/test/Expectations/Crud/83/v1/Api/Data/ColumnsInterface.php index e9b3745..124b788 100644 --- a/test/Expectations/Crud/83/v1/Api/Data/ColumnsInterface.php +++ b/test/Expectations/Crud/83/v1/Api/Data/ColumnsInterface.php @@ -28,19 +28,19 @@ public function getId(): ?int; public function setId($id): self; /** - * Get is active + * Is active */ - public function getIsActive(): bool; + public function isActive(): bool; /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self; + public function setActive(bool $isActive): self; /** - * Get has flag + * Has flag */ - public function getHasFlag(): ?bool; + public function hasFlag(): ?bool; /** * Set has flag diff --git a/test/Expectations/Crud/83/v1/Api/Data/PosterInterface.php b/test/Expectations/Crud/83/v1/Api/Data/PosterInterface.php index 41836d2..e83e108 100644 --- a/test/Expectations/Crud/83/v1/Api/Data/PosterInterface.php +++ b/test/Expectations/Crud/83/v1/Api/Data/PosterInterface.php @@ -14,7 +14,7 @@ interface PosterInterface extends IdentityInterface public const string NAME = 'name'; public const string SUBNAME = 'subname'; public const string FAMILY = 'family'; - public const string IS_ACTIVE = 'is_active'; + public const string ACTIVE = 'active'; public const string PRODUCT_ID = 'product_id'; /** @@ -67,16 +67,16 @@ public function getFamily(): ?string; public function setFamily(?string $family): self; /** - * Get is active + * Is active * @return bool */ - public function getIsActive(): bool; + public function isActive(): bool; /** - * Set is active + * Set active * @return $this */ - public function setIsActive(bool $isActive): self; + public function setActive(bool $active): self; /** * Get product id diff --git a/test/Expectations/Crud/83/v1/Api/Data/TicketInterface.php b/test/Expectations/Crud/83/v1/Api/Data/TicketInterface.php index 3ea0569..ebd690b 100644 --- a/test/Expectations/Crud/83/v1/Api/Data/TicketInterface.php +++ b/test/Expectations/Crud/83/v1/Api/Data/TicketInterface.php @@ -29,14 +29,14 @@ public function getName(): ?string; public function setName(?string $name): self; /** - * Get is active + * Is active */ - public function getIsActive(): bool; + public function isActive(): bool; /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self; + public function setActive(bool $isActive): self; /** * Get ID diff --git a/test/Expectations/Crud/83/v1/Model/Card.php b/test/Expectations/Crud/83/v1/Model/Card.php index 5fcffbc..084d790 100644 --- a/test/Expectations/Crud/83/v1/Model/Card.php +++ b/test/Expectations/Crud/83/v1/Model/Card.php @@ -80,17 +80,17 @@ public function setCategoryId(int $categoryId): self } /** - * Get is active + * Is active */ - public function getIsActive(): bool + public function isActive(): bool { return $this->getData(self::IS_ACTIVE); } /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self + public function setActive(bool $isActive): self { return $this->setData(self::IS_ACTIVE, $isActive); } diff --git a/test/Expectations/Crud/83/v1/Model/CartItem.php b/test/Expectations/Crud/83/v1/Model/CartItem.php index 36417dd..9f44d89 100644 --- a/test/Expectations/Crud/83/v1/Model/CartItem.php +++ b/test/Expectations/Crud/83/v1/Model/CartItem.php @@ -27,17 +27,17 @@ public function setCartId(?int $cartId): self } /** - * Get is active + * Is active */ - public function getIsActive(): bool + public function isActive(): bool { return $this->getData(self::IS_ACTIVE); } /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self + public function setActive(bool $isActive): self { return $this->setData(self::IS_ACTIVE, $isActive); } diff --git a/test/Expectations/Crud/83/v1/Model/Columns.php b/test/Expectations/Crud/83/v1/Model/Columns.php index 003e13d..fc99b3f 100644 --- a/test/Expectations/Crud/83/v1/Model/Columns.php +++ b/test/Expectations/Crud/83/v1/Model/Columns.php @@ -28,25 +28,25 @@ public function setId($id): self } /** - * Get is active + * Is active */ - public function getIsActive(): bool + public function isActive(): bool { return $this->getData(self::IS_ACTIVE); } /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self + public function setActive(bool $isActive): self { return $this->setData(self::IS_ACTIVE, $isActive); } /** - * Get has flag + * Has flag */ - public function getHasFlag(): ?bool + public function hasFlag(): ?bool { return $this->getData(self::HAS_FLAG); } diff --git a/test/Expectations/Crud/83/v1/Model/Poster.php b/test/Expectations/Crud/83/v1/Model/Poster.php index cdfada8..a1280ae 100644 --- a/test/Expectations/Crud/83/v1/Model/Poster.php +++ b/test/Expectations/Crud/83/v1/Model/Poster.php @@ -81,19 +81,19 @@ public function setFamily(?string $family): self } /** - * Get is active + * Is active */ - public function getIsActive(): bool + public function isActive(): bool { - return $this->getData(self::IS_ACTIVE); + return $this->getData(self::ACTIVE); } /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self + public function setActive(bool $active): self { - return $this->setData(self::IS_ACTIVE, $isActive); + return $this->setData(self::ACTIVE, $active); } /** diff --git a/test/Expectations/Crud/83/v1/Model/Ticket.php b/test/Expectations/Crud/83/v1/Model/Ticket.php index 0c6851c..eb409e4 100644 --- a/test/Expectations/Crud/83/v1/Model/Ticket.php +++ b/test/Expectations/Crud/83/v1/Model/Ticket.php @@ -43,17 +43,17 @@ public function setName(?string $name): self } /** - * Get is active + * Is active */ - public function getIsActive(): bool + public function isActive(): bool { return $this->getData(self::IS_ACTIVE); } /** - * Set is active + * Set active */ - public function setIsActive(bool $isActive): self + public function setActive(bool $isActive): self { return $this->setData(self::IS_ACTIVE, $isActive); } diff --git a/test/Expectations/Crud/83/v1/etc/db_schema.xml b/test/Expectations/Crud/83/v1/etc/db_schema.xml index 2292dab..225db6a 100644 --- a/test/Expectations/Crud/83/v1/etc/db_schema.xml +++ b/test/Expectations/Crud/83/v1/etc/db_schema.xml @@ -76,7 +76,7 @@ - + diff --git a/test/Expectations/Crud/83/v1/view/adminhtml/ui_component/sample_module_poster_listing.xml b/test/Expectations/Crud/83/v1/view/adminhtml/ui_component/sample_module_poster_listing.xml index 37c8a22..236e071 100644 --- a/test/Expectations/Crud/83/v1/view/adminhtml/ui_component/sample_module_poster_listing.xml +++ b/test/Expectations/Crud/83/v1/view/adminhtml/ui_component/sample_module_poster_listing.xml @@ -87,14 +87,14 @@ - + select select select - +