Skip to content
This repository has been archived by the owner on Apr 10, 2020. It is now read-only.

Commit

Permalink
Changed company name references
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrankruijter committed Mar 5, 2020
1 parent 80b5f51 commit c38ea3e
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 40 deletions.
19 changes: 6 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.0.5 - 2020-03-05
### Changed
- Changed company name references.

## 1.0.4 - 2020-01-14
### Fixed
- Added translation for callable type.
Expand All @@ -20,18 +24,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Depending on deprecated method `__toString` on ReflectionType, to `getName`.

### Deprecated
- Nothing

### Removed
- Nothing

### Fixed
- Nothing

### Security
- Nothing

## 1.0.1 - 2019-11-17

### Removed
Expand All @@ -42,7 +34,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Created the initial implementation of the ObjectFactory.

[Unreleased]: https://github.com/ulrack/object-factory/compare/1.0.4...HEAD
[Unreleased]: https://github.com/ulrack/object-factory/compare/1.0.5...HEAD
[1.0.5]: https://github.com/ulrack/object-factory/compare/1.0.4...1.0.5
[1.0.4]: https://github.com/ulrack/object-factory/compare/1.0.3...1.0.4
[1.0.3]: https://github.com/ulrack/object-factory/compare/1.0.2...1.0.3
[1.0.2]: https://github.com/ulrack/object-factory/compare/1.0.1...1.0.2
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at info@jyxon.com. All
reported by contacting the project team at info@grizzit.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) Jyxon
Copyright (c) GrizzIT

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
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ composer require ulrack/object-factory

## Usage

The package provides a [Analyser](src/Component/Analyser/ClassAnalyser.php)
The package provides a [Analyser](src/Component/Analyser/ClassAnalyser.php)
class, which retrieves an instantiation signature of a class.
This analyser is used by the [ObjectFactory](src/Factory/ObjectFactory.php) to
determine the order of the provided parameter from the configuration.
The analyser expects an implementation of the StorageInterface from the
The analyser expects an implementation of the StorageInterface from the
`ulrack/storage` package.
This implementation can be used to store previous analyses and retrieve them at
a later point (caching mechanisms e.g.).
Expand All @@ -35,7 +35,7 @@ use Ulrack\ObjectFactory\Component\Analyser\ClassAnalyser;
$factory = new ObjectFactory(new ClassAnalyser(new ObjectStorage()))
```

To create an object with the factory, simply pass the class and parameters to
To create an object with the factory, simply pass the class and parameters to
the create method.

```php
Expand All @@ -53,7 +53,7 @@ $result = $factory->create(
```

A key-value structure is used for the parameters provided to the ObjectFactory.
If (in this case the ObjectStorage class) expects a `$data` parameter of the
If (in this case the ObjectStorage class) expects a `$data` parameter of the
type array in the `__construct` method, then the structure of the `$parameter`
parameter will be as follows:
```php
Expand All @@ -66,8 +66,8 @@ For variadic parameters, this structure is the same.

### Object nesting

Some objects require other objects in their `__construct` method. With the
ObjectFactory it is also possible to create these object, with the correct
Some objects require other objects in their `__construct` method. With the
ObjectFactory it is also possible to create these object, with the correct
configuration.

There are two ways to create the objects.
Expand Down Expand Up @@ -110,7 +110,7 @@ The configuration declaration could technically be infinitely deep.

#### Object declaration

It is also possible to re-use a previously generated or instantiation instance
It is also possible to re-use a previously generated or instantiation instance
of a class. This can be done, by simply passing along the object in the parameters.

```php
Expand Down Expand Up @@ -143,7 +143,7 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE_OF_CONDUCT](CODE_OF_CONDUCT

## MIT License

Copyright (c) Jyxon
Copyright (c) GrizzIT

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
2 changes: 1 addition & 1 deletion src/Common/ClassAnalyserInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) Jyxon, Inc. All rights reserved.
* Copyright (C) GrizzIT, Inc. All rights reserved.
* See LICENSE for license details.
*/
namespace Ulrack\ObjectFactory\Common;
Expand Down
2 changes: 1 addition & 1 deletion src/Common/ObjectFactoryInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) Jyxon, Inc. All rights reserved.
* Copyright (C) GrizzIT, Inc. All rights reserved.
* See LICENSE for license details.
*/
namespace Ulrack\ObjectFactory\Common;
Expand Down
12 changes: 6 additions & 6 deletions src/Component/Analyser/ClassAnalyser.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) Jyxon, Inc. All rights reserved.
* Copyright (C) GrizzIT, Inc. All rights reserved.
* See LICENSE for license details.
*/
namespace Ulrack\ObjectFactory\Component\Analyser;
Expand Down Expand Up @@ -72,7 +72,7 @@ public function analyse(string $class): array
private function reflect(string $class): array
{
$reflection = new ReflectionClass($class);

if ($reflection->isInstantiable()) {
$constructor = $reflection->getConstructor();
$parameters = [];
Expand All @@ -81,10 +81,10 @@ private function reflect(string $class): array
foreach ($constructor->getParameters() as $parameter) {
$type = $parameter->getType();
$parameters[$parameter->getName()] = [
'type' => $type !== null ?
(array_key_exists($type->getName(), $this->translations)
? $this->translations[$type->getName()]
: $type->getName())
'type' => $type !== null ?
(array_key_exists($type->getName(), $this->translations)
? $this->translations[$type->getName()]
: $type->getName())
: 'mixed',
'builtin' => $type !== null ? $type->isBuiltin(): true,
'allowsNull' => $parameter->allowsNull(),
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/CanNotCreateObjectException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) Jyxon, Inc. All rights reserved.
* Copyright (C) GrizzIT, Inc. All rights reserved.
* See LICENSE for license details.
*/
namespace Ulrack\ObjectFactory\Exception;
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InvalidParameterTypeException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) Jyxon, Inc. All rights reserved.
* Copyright (C) GrizzIT, Inc. All rights reserved.
* See LICENSE for license details.
*/
namespace Ulrack\ObjectFactory\Exception;
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/NonInstantiableClassException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) Jyxon, Inc. All rights reserved.
* Copyright (C) GrizzIT, Inc. All rights reserved.
* See LICENSE for license details.
*/
namespace Ulrack\ObjectFactory\Exception;
Expand Down
4 changes: 2 additions & 2 deletions src/Factory/ObjectFactory.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) Jyxon, Inc. All rights reserved.
* Copyright (C) GrizzIT, Inc. All rights reserved.
* See LICENSE for license details.
*/
namespace Ulrack\ObjectFactory\Factory;
Expand Down Expand Up @@ -128,7 +128,7 @@ private function parameterByType(array $parameterConfig, $parameter)

throw new InvalidParameterTypeException($parameterConfig, $parameter);
}

if (!is_a(
$parameter,
$parameterConfig['type']
Expand Down
2 changes: 1 addition & 1 deletion tests/Component/Analyser/ClassAnalyserTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) Jyxon, Inc. All rights reserved.
* Copyright (C) GrizzIT, Inc. All rights reserved.
* See LICENSE for license details.
*/
namespace Ulrack\ObjectFactory\Tests\Component\Analyser;
Expand Down
4 changes: 2 additions & 2 deletions tests/Factory/ObjectFactoryTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) Jyxon, Inc. All rights reserved.
* Copyright (C) GrizzIT, Inc. All rights reserved.
* See LICENSE for license details.
*/
namespace Ulrack\ObjectFactory\Tests\Factory;
Expand Down Expand Up @@ -223,7 +223,7 @@ public function testVariadicParameter(): void
VariadicTestClass::class,
$result
);

$this->assertEquals(
$result->getFoo(),
['foo', 'bar', 'baz']
Expand Down
2 changes: 1 addition & 1 deletion tests/MockObjects/VariadicTestClass.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) Jyxon, Inc. All rights reserved.
* Copyright (C) GrizzIT, Inc. All rights reserved.
* See LICENSE for license details.
*/
namespace Ulrack\ObjectFactory\Tests\MockObjects;
Expand Down

0 comments on commit c38ea3e

Please sign in to comment.