Skip to content

Commit

Permalink
Merge pull request #110 from koriym/cleanup
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
koriym authored Aug 20, 2017
2 parents c2e25a6 + 92b855b commit 04af5a6
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 264 deletions.
3 changes: 1 addition & 2 deletions .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ return \PhpCsFixer\Config::create()
->setFinder(
PhpCsFixer\Finder::create()
->exclude('tests/Fake')
->exclude('src-data')
->exclude('src-deprecated')
->exclude('doc')
->in(__DIR__)
)->setLineEnding("\n")
->setUsingCache(false);
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2012-2016 Akihito Koriyama
Copyright (c) 2012-2017 Akihito Koriyama

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
169 changes: 0 additions & 169 deletions build.xml

This file was deleted.

8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
"DI",
"AOP",
"REST",
"Hypermedia",
"Ray"
"Hypermedia"
],
"license": "MIT",
"authors": [
{
"name": "Akihito Koriyama",
"email": "[email protected]",
"homepage": "https://koriym.github.io/"
"homepage": "https://github.com/koriym"
},
{
"name": "BEAR.Sunday Contributors",
Expand All @@ -32,6 +31,9 @@
"autoload": {
"psr-4": {
"BEAR\\Sunday\\": "src/"
},
"autoload": {
"exclude-from-classmap": ["/docs/", "/tests/"]
}
},
"autoload-dev": {
Expand Down
22 changes: 0 additions & 22 deletions default-app/Resource/App/Greeting.php

This file was deleted.

21 changes: 0 additions & 21 deletions default-app/Resource/Page/Index.php

This file was deleted.

35 changes: 0 additions & 35 deletions default-app/www/index.php

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
* @license http://opensource.org/licenses/MIT MIT
*/
use BEAR\Sunday\Extension\Application\AppInterface;
use Composer\Autoload\ClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;
use MyVendor\HelloWorld\AppModule;
use Ray\Di\Injector;

/* @var $loader ClassLoader*/
$loader = require dirname(__DIR__) . '/vendor/autoload.php';
AnnotationRegistry::registerLoader([$loader, 'loadClass']);
require dirname(__DIR__) . '/vendor/autoload.php';
AnnotationRegistry::registerLoader('class_exists');

$app = (new Injector(new AppModule))->getInstance(AppInterface::class);
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"autoload": {
"psr-4": {
"MyVendor\\HelloWorld\\": "src/"
"MyVendor\\HelloWorld\\": "src"
}
},
"require-dev": {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
*/
use BEAR\Sunday\Extension\Application\AbstractApp;
use BEAR\Sunday\Extension\Application\AppInterface;
use Composer\Autoload\ClassLoader;
use Doctrine\Common\Annotations\AnnotationRegistry;
use MyVendor\HelloWorld\AppModule;
use Ray\Di\Injector;

/* @var $loader ClassLoader*/
$loader = require dirname(__DIR__) . '/vendor/autoload.php';
AnnotationRegistry::registerLoader([$loader, 'loadClass']);
require dirname(__DIR__) . '/vendor/autoload.php';
AnnotationRegistry::registerLoader('class_exists');

$app = (new Injector(new AppModule))->getInstance(AppInterface::class);
/* @var $app AbstractApp */
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class Index extends ResourceObject
{
public function onGet($name = 'World') : ResourceObject
public function onGet(string $name = 'World') : ResourceObject
{
$this->body['greeting'] = 'Hello ' . $name;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public function testGet()
/* @var $page Index */
$this->assertSame(200, $page->code);
$this->assertSame('Hello World', $page->body['greeting']);
$this->assertSame('{"greeting":"Hello World"}', (string) $page);
$expectJson = '{
"greeting": "Hello World"
}
';
$this->assertSame($expectJson, (string) $page);
}
}
File renamed without changes.

0 comments on commit 04af5a6

Please sign in to comment.