<commit_before><?php

namespace Innmind\Neo4j\ONM\Tests;

use Innmind\Neo4j\ONM\MetadataRegistry;
use Innmind\Neo4j\ONM\MetadataRegistryCacheBuilder;
use Innmind\Neo4j\ONM\Mapping\NodeMetadata;
use Innmind\Neo4j\ONM\Mapping\RelationshipMetadata;
use Innmind\Neo4j\ONM\Mapping\Property;
use Innmind\Neo4j\ONM\Mapping\Id;

class MetadataRegistryCacheBuilderTest extends \PHPUnit_Framework_TestCase
{
    public function testGetRegistryCode()
    {
        $registry = new MetadataRegistry;
        $node = new NodeMetadata;
        $node
            ->setClass('Resource')
            ->setRepositoryClass('stdClassRepo')
            ->setAlias('N')
            ->addLabel('Foo')
            ->setId(
                (new Id)
                    ->setProperty('id')
                    ->setType('int')
                    ->setStrategy('AUTO')
            )
            ->addproperty(
                (new Property)
                    ->setName('foo')
                    ->setType('int')
                    ->setNullable(true)
                    ->addOption('foo', ['bar' => 'baz'])
            );
        $registry->addMetadata($node);
        $relationship = new RelationshipMetadata;
        $relationship
            ->setClass('Referer')
            ->setType('FOO')
            ->setId(
                (new Id)
                    ->setProperty('id')
                    ->setType('int')
                    ->setStrategy('AUTO')
            );<commit_msg>change syntax so scrutinizer can't be confused on object instance<commit_after><?php

namespace Innmind\Neo4j\ONM\Tests;

use Innmind\Neo4j\ONM\MetadataRegistry;
use Innmind\Neo4j\ONM\MetadataRegistryCacheBuilder;
use Innmind\Neo4j\ONM\Mapping\NodeMetadata;
use Innmind\Neo4j\ONM\Mapping\RelationshipMetadata;
use Innmind\Neo4j\ONM\Mapping\Property;
use Innmind\Neo4j\ONM\Mapping\Id;

class MetadataRegistryCacheBuilderTest extends \PHPUnit_Framework_TestCase
{
    public function testGetRegistryCode()
    {
        $registry = new MetadataRegistry;
        $node = new NodeMetadata;
        $node
            ->setClass('Resource')
            ->setRepositoryClass('stdClassRepo')
            ->setAlias('N')
            ->setId(
                (new Id)
                    ->setProperty('id')
                    ->setType('int')
                    ->setStrategy('AUTO')
            )
            ->addproperty(
                (new Property)
                    ->setName('foo')
                    ->setType('int')
                    ->setNullable(true)
                    ->addOption('foo', ['bar' => 'baz'])
            );
        $node->addLabel('Foo');
        $registry->addMetadata($node);
        $relationship = new RelationshipMetadata;
        $relationship
            ->setClass('Referer')
            ->setId(
                (new Id)
                    ->setProperty('id')
                    ->setType('int')
                    ->setStrategy('AUTO')
            );
        $relationship->setType('FOO');
{'fraction_non_alphanumeric': 0.12383177570093458, 'fraction_numerical': 0.004672897196261682, 'mean_word_length': 1.6428571428571428, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5989431', 'n_tokens_mistral': 843, 'n_tokens_neox': 825, 'n_words': 131}