Skip to content

Commit bca9732

Browse files
committed
Align fixes, missing file headers, comment fixes
1 parent 033c51d commit bca9732

File tree

6 files changed

+50
-20
lines changed

6 files changed

+50
-20
lines changed

src/ClassDiscovery.php

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

3+
/*
4+
* This file is part of the Http Discovery package.
5+
*
6+
* (c) PHP HTTP Team <[email protected]>
7+
*
8+
* For the full copyright and license information, please read the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Http\Discovery;
413

514
/**
@@ -10,7 +19,7 @@
1019
abstract class ClassDiscovery
1120
{
1221
/**
13-
* Add a condition (and class) to the discovery registry
22+
* Add a class (and condition) to the discovery registry
1423
*
1524
* @param string $name
1625
* @param string $class Class that will be instantiated if found
@@ -21,13 +30,13 @@ public static function register($name, $class, $condition = null)
2130
static::$cache = null;
2231

2332
static::$classes[$name] = [
24-
'class' => $class,
33+
'class' => $class,
2534
'condition' => $condition ?: $class,
2635
];
2736
}
2837

2938
/**
30-
* Finds a Factory
39+
* Finds a Class
3140
*
3241
* @return object
3342
*

src/HttpAdapterDiscovery.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
class HttpAdapterDiscovery extends ClassDiscovery
2222
{
2323
/**
24-
* Cached adapter
25-
*
2624
* @var HttpAdapter
2725
*/
2826
protected static $cache;
@@ -32,12 +30,12 @@ class HttpAdapterDiscovery extends ClassDiscovery
3230
*/
3331
protected static $classes = [
3432
'guzzle6' => [
35-
'class' => 'Http\Adapter\Guzzle6HttpAdapter',
33+
'class' => 'Http\Adapter\Guzzle6HttpAdapter',
3634
'condition' => 'Http\Adapter\Guzzle6HttpAdapter'
3735

3836
],
3937
'guzzle5' => [
40-
'class' => 'Http\Adapter\Guzzle5HttpAdapter',
38+
'class' => 'Http\Adapter\Guzzle5HttpAdapter',
4139
'condition' => 'Http\Adapter\Guzzle6HttpAdapter'
4240
],
4341
];

src/MessageFactoryDiscovery.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
class MessageFactoryDiscovery extends ClassDiscovery
2222
{
2323
/**
24-
* Cached factory
25-
*
2624
* @var MessageFactory
2725
*/
2826
protected static $cache;
@@ -32,17 +30,17 @@ class MessageFactoryDiscovery extends ClassDiscovery
3230
*/
3331
protected static $classes = [
3432
'guzzle' => [
35-
'class' => 'Http\Discovery\MessageFactory\GuzzleFactory',
36-
'condition'=> 'GuzzleHttp\Psr7\Request',
33+
'class' => 'Http\Discovery\MessageFactory\GuzzleFactory',
34+
'condition' => 'GuzzleHttp\Psr7\Request',
3735
],
3836
'diactoros' => [
39-
'class' => 'Http\Discovery\MessageFactory\DiactorosFactory',
37+
'class' => 'Http\Discovery\MessageFactory\DiactorosFactory',
4038
'condition' => 'Zend\Diactoros\Request',
4139
],
4240
];
4341

4442
/**
45-
* Find Message Factory
43+
* Finds a Message Factory
4644
*
4745
* @return MessageFactory
4846
*

src/UriFactory/DiactorosFactory.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
<?php
22

3+
/*
4+
* This file is part of the Http Discovery package.
5+
*
6+
* (c) PHP HTTP Team <[email protected]>
7+
*
8+
* For the full copyright and license information, please read the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Http\Discovery\UriFactory;
413

5-
use Zend\Diactoros\Uri;
614
use Http\Message\UriFactory;
15+
use Zend\Diactoros\Uri;
716

817
/**
918
* Creates a zend/diactoros URI object

src/UriFactory/GuzzleFactory.php

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

3+
/*
4+
* This file is part of the Http Discovery package.
5+
*
6+
* (c) PHP HTTP Team <[email protected]>
7+
*
8+
* For the full copyright and license information, please read the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Http\Discovery\UriFactory;
413

514
use GuzzleHttp\Psr7;

src/UriFactoryDiscovery.php

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

3+
/*
4+
* This file is part of the Http Discovery package.
5+
*
6+
* (c) PHP HTTP Team <[email protected]>
7+
*
8+
* For the full copyright and license information, please read the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Http\Discovery;
413

514
use Http\Message\UriFactory;
@@ -12,28 +21,26 @@
1221
class UriFactoryDiscovery extends ClassDiscovery
1322
{
1423
/**
15-
* Cached factory
16-
*
1724
* @var UriFactory
1825
*/
19-
public static $cache;
26+
protected static $cache;
2027

2128
/**
2229
* @var array
2330
*/
2431
protected static $classes = [
2532
'guzzle' => [
26-
'class' => 'Http\Discovery\UriFactory\GuzzleFactory',
33+
'class' => 'Http\Discovery\UriFactory\GuzzleFactory',
2734
'condition' => 'GuzzleHttp\Psr7\Uri',
2835
],
2936
'diactoros' => [
30-
'class' => 'Http\Discovery\UriFactory\DiactorosFactory',
37+
'class' => 'Http\Discovery\UriFactory\DiactorosFactory',
3138
'condition' => 'Zend\Diactoros\Uri',
3239
],
3340
];
3441

3542
/**
36-
* Find URI Factory
43+
* Finds a URI Factory
3744
*
3845
* @return UriFactory
3946
*/

0 commit comments

Comments
 (0)