Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

Commit f4b1c3c

Browse files
committed
find feature namespace through Finder
1 parent 94cc9d3 commit f4b1c3c

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/Commands/FeatureMakeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function fire()
6363
return false;
6464
}
6565

66-
$namespace = $this->findServiceNamespace($service).'\\Features';
66+
$namespace = $this->findFeatureNamespace($service);
6767

6868
$content = file_get_contents($this->getStub());
6969
$content = str_replace(

src/Finder.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,18 @@ public function findFeaturePath($service, $feature)
9999
return $this->findServicePath($service).'/Features/'.$feature.'.php';
100100
}
101101

102+
/**
103+
* Find the namespace for features in the given service.
104+
*
105+
* @param string $service
106+
*
107+
* @return string
108+
*/
109+
public function findFeatureNamespace($service)
110+
{
111+
return $this->findServiceNamespace($service).'\\Features';
112+
}
113+
102114
/**
103115
* Find the path for the given domain.
104116
*
@@ -140,7 +152,7 @@ public function findDomainNamespace($domain)
140152
* Find the namespace for the given domain's Jobs.
141153
*
142154
* @param string $domain
143-
*
155+
*
144156
* @return string
145157
*/
146158
public function findDomainJobsNamespace($domain)

0 commit comments

Comments
 (0)