Skip to content

Commit 0cd13c3

Browse files
Merge pull request #10 from monstar-lab-oss/develop
Develop
2 parents 4a51b02 + ae36bed commit 0cd13c3

File tree

6 files changed

+42
-44
lines changed

6 files changed

+42
-44
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/vendor
2-
.idea
2+
.idea
3+
.phpunit.result.cache

composer.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,22 @@
99
"laravel"
1010
],
1111
"license": "MIT",
12-
"homepage": "http://nodesagency.com",
12+
"homepage": "https://monstar-lab.com",
1313
"authors": [
1414
{
1515
"name": "Casper Rasmussen",
1616
"email": "[email protected]",
1717
"role": "CTO & Partner"
18+
},
19+
{
20+
"name": "Rasmus Ebbesen",
21+
"email": "[email protected]",
22+
"role": ""
1823
}
1924
],
2025
"require": {
21-
"php": "^7.1",
22-
"monstar-lab-oss/n-meta-php": "^1.0.0"
26+
"php": "^8.0",
27+
"monstar-lab-oss/n-meta-php": "^2.0.0"
2328
},
2429
"require-dev": {
2530
"phpunit/phpunit": "^9.0",

composer.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpunit.xml

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
colors="true"
5-
bootstrap="vendor/autoload.php"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="true">
11-
<testsuites>
12-
<testsuite name="Application Test Suite">
13-
<directory suffix="Test.php">./tests</directory>
14-
</testsuite>
15-
</testsuites>
16-
<filter>
17-
<whitelist processUncoveredFilesFromWhitelist="true">
18-
<directory suffix=".php">./src</directory>
19-
<exclude>
20-
<directory suffix=".php">./tests</directory>
21-
</exclude>
22-
</whitelist>
23-
</filter>
24-
<php>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" colors="true" bootstrap="vendor/autoload.php" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3+
<coverage processUncoveredFiles="true">
4+
<include>
5+
<directory suffix=".php">./src</directory>
6+
</include>
7+
<exclude>
8+
<directory suffix=".php">./tests</directory>
9+
</exclude>
10+
</coverage>
11+
<testsuites>
12+
<testsuite name="Application Test Suite">
13+
<directory suffix="Test.php">./tests</directory>
14+
</testsuite>
15+
</testsuites>
16+
<php>
2517
</php>
2618
</phpunit>

src/helpers.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
<?php
22

3+
use NMeta\BadRequestException;
4+
use NMeta\NMeta;
5+
36
if (!function_exists('nmeta')) {
47
/**
58
* nmeta
69
*
7-
* @return \NMeta\NMeta
8-
* @throws \NMeta\BadRequestException
10+
* @return NMeta
11+
* @throws BadRequestException
912
* @author Casper Rasmussen <[email protected]>
1013
*/
11-
function nmeta(): \NMeta\NMeta
14+
function nmeta(): NMeta
1215
{
1316
try {
14-
return app(\NMeta\NMeta::class);
17+
return app(NMeta::class);
1518
} catch (Illuminate\Contracts\Container\BindingResolutionException $e) {
16-
throw new \NMeta\BadRequestException('NMeta is not attached, is the middleware added?');
19+
throw new BadRequestException('NMeta is not attached, is the middleware added?');
1720
}
1821
}
1922
}

tests/NMetaTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ class NMetaTest extends LaravelTestCase
66
{
77
public function testConstruct()
88
{
9-
10-
11-
129
$this->assertTrue(true);
1310
}
1411
}

0 commit comments

Comments
 (0)