#39 - generate timesheet #56
@@ -48,12 +48,6 @@ enum Month: string
|
|||||||
|
|
|||||||
|
|
||||||
public static function fromNameOrCurrent(string $name): Month
|
public static function fromNameOrCurrent(string $name): Month
|
||||||
{
|
{
|
||||||
$month = Month::tryFrom($name);
|
return Month::tryFrom($name) ?? Month::current();
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
if ($month === null) {
|
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
return Month::current();
|
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
}
|
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
|
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
return $month;
|
|
||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
I think we can simplify it: I think we can simplify it:
```suggestion
return Month::tryFrom($name) ?? Month::current();
```
|
|||||||
Reference in New Issue
Block a user
I think we can simplify it:
I think we can simplify it: