Skip to content

Commit

Permalink
fix phpstan errors
Browse files Browse the repository at this point in the history
  • Loading branch information
d8vjork committed Sep 7, 2023
1 parent cf4182b commit 6adde05
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Commands/DtoMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected function buildClass($name)
* Replace the namespace for the given stub.
*
* @param string $stub
* @param string $requestClass
* @param string|null $requestClass
* @return $this
*/
protected function replaceProperties(&$stub, $requestClass)
Expand All @@ -108,7 +108,7 @@ protected function replaceProperties(&$stub, $requestClass)
* Get the request properties for the given class.
*
* @param string $requestClass
* @return $this
* @return string
*/
protected function getProperties(string $requestClass)
{
Expand All @@ -121,7 +121,7 @@ protected function getProperties(string $requestClass)
// TODO: Sort nulls here to be prepended (need to create array first)
foreach ($requestRules as $property => $rules) {
if (str_ends_with('_id', $property)) {
$property = str_replace('/_id$/gu', '', $property);
$property = preg_replace('/_id$/', '', $property);
}

$property = Str::camel($property);
Expand Down Expand Up @@ -160,7 +160,7 @@ protected function getProperties(string $requestClass)
* Replace the request class for the given stub.
*
* @param string $stub
* @param string $requestClass
* @param string|null $requestClass
* @return string
*/
public function replaceRequestClass(&$stub, $requestClass)
Expand Down

0 comments on commit 6adde05

Please sign in to comment.