Skip to content
This repository was archived by the owner on Jan 18, 2018. It is now read-only.

Commit b56a104

Browse files
PSR-4 namespacing
1 parent f74892c commit b56a104

11 files changed

Lines changed: 14 additions & 11 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ There is one config option:
6666

6767
**Navigation View**
6868

69-
This option (`'view'`) defines the view to use for the navigation bar. The default value for this setting is `'navigation::bootstrap'`.
69+
This option (`'view'`) defines the view to use for the navigation bar. The default value for this setting is `'graham-campbell/navigation::bootstrap'`.
7070

7171

7272
## Usage

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
"graham-campbell/testbench": "0.2.*"
4242
},
4343
"autoload": {
44-
"psr-0": {
45-
"GrahamCampbell\\Navigation": "src/",
46-
"GrahamCampbell\\Tests\\Navigation": "tests/"
44+
"psr-4": {
45+
"GrahamCampbell\\Navigation\\": "src/",
46+
"GrahamCampbell\\Tests\\Navigation\\": "tests/"
4747
}
4848
},
4949
"extra": {

phpunit.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@
1212
>
1313
<testsuites>
1414
<testsuite name="Package Test Suite">
15-
<directory suffix=".php">./tests/GrahamCampbell/Tests/Navigation</directory>
15+
<directory suffix=".php">./tests</directory>
1616
</testsuite>
1717
</testsuites>
1818
<filter>
1919
<whitelist addUncoveredFilesFromWhitelist="true">
20-
<directory suffix=".php">./src/GrahamCampbell/Navigation</directory>
20+
<directory suffix=".php">./src</directory>
2121
<exclude>
22+
<directory>./src/config</directory>
23+
<directory>./src/migrations</directory>
24+
<directory>./src/views</directory>
2225
<directory>./tests</directory>
2326
<directory>./vendor</directory>
2427
</exclude>

src/GrahamCampbell/Navigation/Classes/Navigation.php renamed to src/Classes/Navigation.php

File renamed without changes.

src/GrahamCampbell/Navigation/Facades/Navigation.php renamed to src/Facades/Navigation.php

File renamed without changes.

src/GrahamCampbell/Navigation/NavigationServiceProvider.php renamed to src/NavigationServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class NavigationServiceProvider extends ServiceProvider
4343
*/
4444
public function boot()
4545
{
46-
$this->package('graham-campbell/navigation');
46+
$this->package('graham-campbell/navigation', 'graham-campbell/navigation', __DIR__);
4747
}
4848

4949
/**
@@ -68,7 +68,7 @@ protected function registerNavigation()
6868
$request = $app['request'];
6969
$url = $app['url'];
7070
$htmlmin = $app['htmlmin'];
71-
$view = $app['config']['navigation::view'];
71+
$view = $app['config']['graham-campbell/navigation::view'];
7272

7373
return new Classes\Navigation($events, $request, $url, $htmlmin, $view);
7474
});

src/config/config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
|
2424
| This option defines the view to use for the navigation bar.
2525
|
26-
| Default: 'navigation::bootstrap'
26+
| Default: 'graham-campbell/navigation::bootstrap'
2727
|
2828
*/
2929

30-
'view' => 'navigation::bootstrap'
30+
'view' => 'graham-campbell/navigation::bootstrap'
3131

3232
);

tests/GrahamCampbell/Tests/Navigation/AbstractTestCase.php renamed to tests/AbstractTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ abstract class AbstractTestCase extends TestCase
3636
*/
3737
protected function getBasePath()
3838
{
39-
return __DIR__.'/../../../../src';
39+
return __DIR__.'/../src';
4040
}
4141

4242
/**

tests/GrahamCampbell/Tests/Navigation/Classes/NavigationTest.php renamed to tests/Classes/NavigationTest.php

File renamed without changes.

tests/GrahamCampbell/Tests/Navigation/Facades/NavigationTest.php renamed to tests/Facades/NavigationTest.php

File renamed without changes.

0 commit comments

Comments
 (0)