for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types = 1);
/**
* Created by Vitaly Iegorov <[email protected]>.
* on 20.08.16 at 12:39
*/
namespace samsonframework\container;
use samsonframework\container\metadata\ClassMetadata;
use samsonframework\container\resolver\ResolverInterface;
* Abstract class metadata collector.
*
* @author Vitaly Egorov <[email protected]>
abstract class AbstractMetadataCollector
{
* Metadata collector constructor.
* @param ResolverInterface $resolver
public function __construct(ResolverInterface $resolver)
$this->resolver = $resolver;
resolver
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
}
* Collect class metadata from source.
* @param mixed $source Input source for collecting class metadata
* @param array $classesMetadata
* @return array|metadata\ClassMetadata[] Collected class metadata collection
abstract public function collect($source, array $classesMetadata = []) : array;
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: