Skip to content

Commit 43a44af

Browse files
authored
Merge pull request #2 from preprocess/develop
The great refactoring!
2 parents 8ff745f + 9ce8a11 commit 43a44af

File tree

10 files changed

+19
-23
lines changed

10 files changed

+19
-23
lines changed

composer.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
{
2+
"type": "pre-macro",
23
"name": "pre/class-accessors",
34
"license": "MIT",
45
"require": {
5-
"pre/plugin": "^0.6"
6+
"pre/plugin": "^0.7"
67
},
78
"autoload": {
89
"files": [
9-
"src/bootstrap.php",
1010
"src/expanders.php"
1111
],
1212
"psr-4": {
1313
"Pre\\ClassAccessors\\": "src"
1414
}
1515
},
1616
"require-dev": {
17-
"phpunit/phpunit": "^5.0"
17+
"phpunit/phpunit": "^5.0|^6.0"
1818
},
1919
"autoload-dev": {
2020
"psr-4": {
2121
"Pre\\ClassAccessors\\": "tests"
2222
}
23+
},
24+
"extra": {
25+
"macros": [
26+
"src/macros.yay"
27+
]
2328
}
2429
}

phpunit.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
convertWarningsToExceptions="false"
1010
processIsolation="false"
1111
stopOnFailure="false"
12-
syntaxCheck="false">
12+
syntaxCheck="false"
13+
>
1314
<testsuites>
1415
<testsuite>
1516
<directory suffix="Test.php">tests</directory>

readme.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
# Pre Class Accessors
22

33
Documentation can be found at [preprocess.io](https://preprocess.io/docs#class-accessors).
4-
5-
## Versioning
6-
7-
This library follows [Semver](http://semver.org). According to Semver, you will be able to upgrade to any minor or patch version of this library without any breaking changes to the public API. Semver also requires that we clearly define the public API for this library.
8-
9-
All methods, with `public` visibility, are part of the public API. All other methods are not part of the public API. Where possible, we'll try to keep `protected` methods backwards-compatible in minor/patch versions, but if you're overriding methods then please test your work before upgrading.

src/bootstrap.php

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/expanders.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
namespace Yay\DSL\Expanders;
44

55
use Yay\Engine;
6-
use Yay\Token;
76
use Yay\TokenStream;
87

9-
function class_accessors_return($stream, Engine $engine): TokenStream
8+
function class_accessors_return(TokenStream $stream, Engine $engine): TokenStream
109
{
1110
if (!empty($stream->current())) {
1211
$stream = ": {$stream}";
1312
}
1413

1514
return TokenStream::fromSource(
16-
$engine->expand($stream, '', Engine::GC_ENGINE_DISABLED)
15+
$engine->expand($stream, "", Engine::GC_ENGINE_DISABLED)
1716
);
1817
}
File renamed without changes.

tests/SpecTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Pre\ClassAccessors;
44

5-
use Pre\Testing\Runner;
5+
use Pre\Plugin\Testing\Runner;
66

77
class SpecTest extends Runner
88
{

tests/bootstrap.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
namespace Yay;
44

5-
// let's use a namespace trick, to make non-colliding variables predictable.
6-
75
function md5($value) {
86
return $value;
97
}
108

11-
putenv("PRE_BASE_DIR=" . __DIR__ . "/..");
12-
139
require __DIR__ . "/../vendor/autoload.php";
10+
11+
putenv("PRE_BASE_DIR=" . __DIR__ . "/../");
12+
13+
\Pre\Plugin\addMacroPath(__DIR__ . "/../src/macros.yay");

tests/specs/accessors.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--DESCRIPTION--
22

3-
Test accessors
3+
Test class accessors macros
44

55
--GIVEN--
66

tests/specs/fallbacks.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--DESCRIPTION--
22

3-
Test accessor fallbacks
3+
Test class accessors fallback macros
44

55
--GIVEN--
66

0 commit comments

Comments
 (0)