Skip to content

Commit

Permalink
Merge b7da080 into b0ccd05
Browse files Browse the repository at this point in the history
  • Loading branch information
TiSiE committed Jun 28, 2019
2 parents b0ccd05 + b7da080 commit dffd655
Show file tree
Hide file tree
Showing 83 changed files with 1,218 additions and 650 deletions.
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
*~
phpunit.xml
vendor
behat.yml
composer.lock
node_modules/
var/
/var/
package-lock.json
.idea/
.phpunit.result.cache
composer.lock
11 changes: 5 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ env:
matrix:
fast_finish: true
allow_failures:
- php: 7.2
- php: '7.2'
env: COVERAGE=yes
include:
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.2
- php: '7.2'
- php: '7.3'
- php: '7.2'
env: COVERAGE=yes

services:
Expand All @@ -42,7 +41,7 @@ install:
- pecl install -f ${PECLMONGO}
- phpenv config-add .travis/phpenv.ini
# TODO: change to --prefer-dist when CoreTestUtils become separate packages
- COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-source
- COMPOSER_MEMORY_LIMIT=-1 composer install

before_script:
# behat preparation
Expand Down
13 changes: 9 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ module.exports = function(grunt) {
targetDir: './test/sandbox/public',
nodeModulesPath: __dirname + "/node_modules"
});
grunt.loadTasks('./test/sandbox/public/modules/Core');
grunt.registerTask('default', ['yawik:core']);
grunt.registerTask('build',['yawik:core']);
};
grunt.file.recurse('./test/sandbox/public/modules',function(absPath,rootDir,subDir,fileName){
if('Gruntfile.js' === fileName){
grunt.loadTasks(rootDir+'/'+subDir);
}
});

grunt.registerTask('default',['copy','less','concat','cssmin','uglify']);

};
6 changes: 3 additions & 3 deletions build/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
behat/*
!behat/.gitkeep
logs
*
!.gitignore
!behat/.gitkeep
49 changes: 32 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,40 +22,54 @@
}
],
"keywords": [
"yawik", "module", "zf3"
"yawik",
"module",
"zf3"
],
"config": {
"platform": {
"ext-mongo": "1.6.16"
},
"process-timeout": 0
"process-timeout": 0,
"sort-packages": true,
"preferred-install": "dist"
},
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"yawik/auth": ">=0.32",
"php": ">=7.2",
"geocoder-php/cache-provider": "^4.1",
"geocoder-php/google-maps-provider": "^4.4",
"guzzlehttp/guzzle": "^6.3",
"php-http/cache-plugin": "^1.6",
"php-http/guzzle6-adapter": "^1.1",
"php-http/message": "^1.7",
"yawik/jobs": ">=0.32",
"yawik/settings": ">=0.32",
"zendframework/zend-cache": "^2.8"
},
"require-dev": {
"yawik/applications": ">=0.32",
"yawik/cv": ">=0.32",
"yawik/organizations": ">=0.32",
"yawik/auth": ">=0.32",
"yawik/behat": "^0.32@dev",
"yawik/composer-plugin": ">=0.32",
"yawik/core": ">=0.32",
"yawik/cv": ">=0.32",
"yawik/geo": ">=0.32",
"willdurand/geocoder": "^3.3.2"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"yawik/behat": "^0.32@dev"
"yawik/install": "^0.33.14",
"yawik/organizations": ">=0.32",
"yawik/settings": ">=0.32",
"phpunit/phpunit": "^8.0",
"cross-solution/phpunit-utils": "^2.0"
},
"autoload": {
"psr-4": { "SimpleImport\\": "src/"}
"psr-4": {
"SimpleImport\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"SimpleImportTest\\": "test/SimpleImportTest/",
"CoreTestUtils\\": "vendor/yawik/core/test/CoreTestUtils/"
},
"psr-4": {
"SimpleImportTest\\": "test/SimpleImportTest/"
},
"psr-0": {
"": "test/"
}
Expand All @@ -80,6 +94,7 @@
],
"serve": "php -S localhost:8000 -t test/sandbox/public",
"start-selenium": "./vendor/bin/selenium-server-standalone -p 4444 -Dwebdriver.chrome.driver=./vendor/bin/chromedriver",
"test": "phpunit"
"test": "phpunit",
"db.init": "mongorestore --drop"
}
}
17 changes: 16 additions & 1 deletion config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use SimpleImport\Entity\Crawler;
use Zend\ServiceManager\Factory\InvokableFactory;
use SimpleImport\Bridge\Geocoder\Factory as GeocoderFactory;

/**
* create a config/autoload/SimpleImport.local.php and put modifications there.
Expand All @@ -32,13 +33,27 @@
],
'options' => [
'SimpleImport/Options/Module' => [
'class' => Options\ModuleOptions::class
'class' => Options\ModuleOptions::class,
'options' => [
'cache' => [
'adapter' => [
'name' => 'filesystem',
'options' => [
'cacheDir' => 'var/cache/geocoder',
],
],
'plugins' => ['serializer'],
],
],
],
Options\LanguageGuesserOptions::class => []
],
'service_manager' => [
'factories' => [
'SimpleImport/CrawlerProcessorManager' => Factory\CrawlerProcessor\ManagerFactory::class,
'SimpleImport/Geocoder/Cache' => GeocoderFactory\CacheFactory::class,
'SimpleImport/Geocoder/Provider' => GeocoderFactory\ProviderFactory::class,
'SimpleImport/Geocoder/CacheProvider' => GeocoderFactory\CacheProviderFactory::class,
'SimpleImport/JobGeocodeLocation' => Factory\Job\GeocodeLocationFactory::class,
Service\LanguageGuesser::class => Service\LanguageGuesserFactory::class,
]
Expand Down
Empty file.
Empty file.
1 change: 1 addition & 0 deletions dump/YAWIK_TEST/applications.files.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"YAWIK-TEST.applications.files"},{"v":2,"key":{"permissions.view":1},"name":"permissions.view_1","sparse":false,"ns":"YAWIK-TEST.applications.files"},{"v":2,"key":{"permissions.change":1},"name":"permissions.change_1","sparse":false,"ns":"YAWIK-TEST.applications.files"}],"uuid":"f245711d3f1a46fab25f18453ba97cd0"}
1 change: 1 addition & 0 deletions dump/YAWIK_TEST/applications.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"YAWIK-TEST.applications"},{"v":2,"key":{"job":1},"name":"job_1","sparse":false,"ns":"YAWIK-TEST.applications"},{"v":2,"key":{"user":1},"name":"user_1","sparse":false,"ns":"YAWIK-TEST.applications"},{"v":2,"key":{"_fts":"text","_ftsx":1},"name":"cv_cvFulltext","sparse":false,"weights":{"cv.preferredJob.desiredJob":1},"language_override":"language","ns":"YAWIK-TEST.applications","default_language":"english","textIndexVersion":3},{"v":2,"key":{"cv.status":1},"name":"cv.status_1","sparse":false,"ns":"YAWIK-TEST.applications"},{"v":2,"key":{"cv.contact.image":1},"name":"cv.contact.image_1","sparse":false,"ns":"YAWIK-TEST.applications"},{"v":2,"key":{"cv.preferredJob.desiredLocations.coordinates":"2dsphere"},"name":"cv.preferredJob.desiredLocations.coordinates_2dsphere","sparse":false,"ns":"YAWIK-TEST.applications","2dsphereIndexVersion":3},{"v":2,"key":{"cv.permissions.view":1},"name":"cv.permissions.view_1","sparse":false,"ns":"YAWIK-TEST.applications"},{"v":2,"key":{"cv.permissions.change":1},"name":"cv.permissions.change_1","sparse":false,"ns":"YAWIK-TEST.applications"}],"uuid":"3d1812f54a54496f8de425ee29852c48"}
Empty file.
1 change: 1 addition & 0 deletions dump/YAWIK_TEST/cvs.attachments.files.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"YAWIK-TEST.cvs.attachments.files"},{"v":2,"key":{"permissions.view":1},"name":"permissions.view_1","ns":"YAWIK-TEST.cvs.attachments.files","sparse":false},{"v":2,"key":{"permissions.change":1},"name":"permissions.change_1","ns":"YAWIK-TEST.cvs.attachments.files","sparse":false}],"uuid":"13837154c25f4a649778cc7d82cf9967"}
Empty file added dump/YAWIK_TEST/cvs.bson
Empty file.
Empty file.
1 change: 1 addition & 0 deletions dump/YAWIK_TEST/cvs.contact.images.files.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"YAWIK-TEST.cvs.contact.images.files"},{"v":2,"key":{"permissions.view":1},"name":"permissions.view_1","sparse":false,"ns":"YAWIK-TEST.cvs.contact.images.files"},{"v":2,"key":{"permissions.change":1},"name":"permissions.change_1","sparse":false,"ns":"YAWIK-TEST.cvs.contact.images.files"}],"uuid":"f175548bd16244458c464b06886b3341"}
1 change: 1 addition & 0 deletions dump/YAWIK_TEST/cvs.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"YAWIK-TEST.cvs"},{"v":2,"key":{"_fts":"text","_ftsx":1},"name":"cvFulltext","ns":"YAWIK-TEST.cvs","weights":{"preferredJob.desiredJob":1},"default_language":"english","language_override":"language","sparse":false,"textIndexVersion":3},{"v":2,"key":{"status":1},"name":"status_1","ns":"YAWIK-TEST.cvs","sparse":false},{"v":2,"key":{"contact.image":1},"name":"contact.image_1","sparse":false,"ns":"YAWIK-TEST.cvs"},{"v":2,"key":{"preferredJob.desiredLocations.coordinates":"2dsphere"},"name":"preferredJob.desiredLocations.coordinates_2dsphere","sparse":false,"ns":"YAWIK-TEST.cvs","2dsphereIndexVersion":3},{"v":2,"key":{"permissions.view":1},"name":"permissions.view_1","sparse":false,"ns":"YAWIK-TEST.cvs"},{"v":2,"key":{"permissions.change":1},"name":"permissions.change_1","sparse":false,"ns":"YAWIK-TEST.cvs"}],"uuid":"a0b4c254cb43474f9b64850c2aeeffbc"}
Empty file added dump/YAWIK_TEST/jobs.bson
Empty file.
1 change: 1 addition & 0 deletions dump/YAWIK_TEST/jobs.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"YAWIK-TEST.jobs"},{"v":2,"key":{"datePublishStart.date":1},"name":"datePublishStart.date_1","ns":"YAWIK-TEST.jobs","sparse":false},{"v":2,"key":{"applyId":1},"name":"applyId_1","sparse":false,"ns":"YAWIK-TEST.jobs"},{"v":2,"key":{"organization":1},"name":"organization_1","ns":"YAWIK-TEST.jobs","sparse":false},{"v":2,"key":{"user":1},"name":"user_1","sparse":false,"ns":"YAWIK-TEST.jobs"},{"v":2,"key":{"status":1},"name":"status_1","sparse":false,"ns":"YAWIK-TEST.jobs"},{"v":2,"key":{"locations.coordinates":"2dsphere"},"name":"locations.coordinates_2dsphere","sparse":false,"ns":"YAWIK-TEST.jobs","2dsphereIndexVersion":3},{"v":2,"key":{"permissions.view":1},"name":"permissions.view_1","sparse":false,"ns":"YAWIK-TEST.jobs"},{"v":2,"key":{"permissions.change":1},"name":"permissions.change_1","sparse":false,"ns":"YAWIK-TEST.jobs"},{"v":2,"key":{"_fts":"text","_ftsx":1},"name":"templateValues_fulltext","ns":"YAWIK-TEST.jobs","weights":{"templateValues.benefits":1,"templateValues.description":1,"templateValues.qualifications":1,"templateValues.requirements":1,"templateValues.title":1},"sparse":false,"language_override":"lang_index","default_language":"english","textIndexVersion":3}],"uuid":"d776edd7997345b38e2dc13d6931bb35"}
Empty file.
1 change: 1 addition & 0 deletions dump/YAWIK_TEST/jobs.snapshots2.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"YAWIK-TEST.jobs.snapshots2"},{"v":2,"key":{"datePublishStart.date":1},"name":"datePublishStart.date_1","sparse":false,"ns":"YAWIK-TEST.jobs.snapshots2"},{"v":2,"key":{"applyId":1},"name":"applyId_1","sparse":false,"ns":"YAWIK-TEST.jobs.snapshots2"},{"v":2,"key":{"organization":1},"name":"organization_1","sparse":false,"ns":"YAWIK-TEST.jobs.snapshots2"},{"v":2,"key":{"user":1},"name":"user_1","sparse":false,"ns":"YAWIK-TEST.jobs.snapshots2"},{"v":2,"key":{"status":1},"name":"status_1","sparse":false,"ns":"YAWIK-TEST.jobs.snapshots2"},{"v":2,"key":{"locations.coordinates":"2dsphere"},"name":"locations.coordinates_2dsphere","sparse":false,"ns":"YAWIK-TEST.jobs.snapshots2","2dsphereIndexVersion":3},{"v":2,"key":{"permissions.view":1},"name":"permissions.view_1","sparse":false,"ns":"YAWIK-TEST.jobs.snapshots2"},{"v":2,"key":{"permissions.change":1},"name":"permissions.change_1","sparse":false,"ns":"YAWIK-TEST.jobs.snapshots2"},{"v":2,"key":{"_fts":"text","_ftsx":1},"name":"templateValues_fulltext","sparse":false,"ns":"YAWIK-TEST.jobs.snapshots2","weights":{"templateValues.benefits":1,"templateValues.description":1,"templateValues.qualifications":1,"templateValues.requirements":1,"templateValues.title":1},"language_override":"lang_index","default_language":"english","textIndexVersion":3}],"uuid":"4701e9b311ef4fe486d2646da5682508"}
Binary file added dump/YAWIK_TEST/organizations.bson
Binary file not shown.
Empty file.
1 change: 1 addition & 0 deletions dump/YAWIK_TEST/organizations.images.files.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"YAWIK-TEST.organizations.images.files"},{"v":2,"key":{"permissions.view":1},"name":"permissions.view_1","sparse":false,"ns":"YAWIK-TEST.organizations.images.files"},{"v":2,"key":{"permissions.change":1},"name":"permissions.change_1","sparse":false,"ns":"YAWIK-TEST.organizations.images.files"}],"uuid":"32628fdd874c45a280e683caf2db41d6"}
1 change: 1 addition & 0 deletions dump/YAWIK_TEST/organizations.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"YAWIK-TEST.organizations"},{"v":2,"key":{"_fts":"text","_ftsx":1},"name":"fulltext","sparse":false,"ns":"YAWIK-TEST.organizations","weights":{"_organizationName":1},"default_language":"english","language_override":"language","textIndexVersion":3},{"v":2,"key":{"externalId":1},"name":"externalId_1","sparse":false,"ns":"YAWIK-TEST.organizations"},{"v":2,"key":{"user":1},"name":"user_1","sparse":false,"ns":"YAWIK-TEST.organizations"},{"v":2,"key":{"permissions.view":1},"name":"permissions.view_1","sparse":false,"ns":"YAWIK-TEST.organizations"},{"v":2,"key":{"permissions.change":1},"name":"permissions.change_1","sparse":false,"ns":"YAWIK-TEST.organizations"}],"uuid":"ef5e499625854e2c966f20cc75d7e188"}
Binary file added dump/YAWIK_TEST/organizations.names.bson
Binary file not shown.
1 change: 1 addition & 0 deletions dump/YAWIK_TEST/organizations.names.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"YAWIK-TEST.organizations.names"}],"uuid":"2644dc63ef1c447386c8c934fa824d73"}
Binary file added dump/YAWIK_TEST/simpleimport.crawler.bson
Binary file not shown.
1 change: 1 addition & 0 deletions dump/YAWIK_TEST/simpleimport.crawler.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"YAWIK-TEST.simpleimport.crawler"}],"uuid":"50dd6f3dcdb94db69471a000ccc3fdee"}
Binary file added dump/YAWIK_TEST/users.bson
Binary file not shown.
Empty file.
1 change: 1 addition & 0 deletions dump/YAWIK_TEST/users.images.files.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"YAWIK-TEST.users.images.files"},{"v":2,"key":{"permissions.view":1},"name":"permissions.view_1","sparse":false,"ns":"YAWIK-TEST.users.images.files"},{"v":2,"key":{"permissions.change":1},"name":"permissions.change_1","ns":"YAWIK-TEST.users.images.files","sparse":false}],"uuid":"d541a8e2874e4a958081e13980c82dd0"}
1 change: 1 addition & 0 deletions dump/YAWIK_TEST/users.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"options":{},"indexes":[{"v":2,"key":{"_id":1},"name":"_id_","ns":"YAWIK-TEST.users"},{"v":2,"key":{"_fts":"text","_ftsx":1},"name":"fulltext","sparse":false,"weights":{"info.email":1,"info.firstName":1,"info.lastName":1,"login":1,"role":1},"language_override":"language","ns":"YAWIK-TEST.users","default_language":"english","textIndexVersion":3},{"v":2,"unique":true,"key":{"login":1},"name":"login_1","sparse":true,"ns":"YAWIK-TEST.users"},{"v":2,"key":{"status":1},"name":"status_1","sparse":false,"ns":"YAWIK-TEST.users"}],"uuid":"1c93d5d600ce459195e37c640970d0f0"}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "yawik-orders",
"name": "yawik-simple-import",
"version": "0.32.0",
"scripts": {
"postinstall": "grunt"
Expand Down
33 changes: 33 additions & 0 deletions src/Bridge/Geocoder/Factory/CacheFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

declare(strict_types=1);

namespace SimpleImport\Bridge\Geocoder\Factory;


use Interop\Container\ContainerInterface;
use SimpleImport\Options\ModuleOptions;
use Zend\Cache\Psr\SimpleCache\SimpleCacheDecorator;
use Zend\Cache\StorageFactory;
use Zend\ServiceManager\Factory\FactoryInterface;

class CacheFactory implements FactoryInterface
{
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
/* @var \SimpleImport\Options\ModuleOptions $options */
$options = $container->get(ModuleOptions::SERVICE_ID);
$config = $options->getCache();

if('filesystem' === $config['adapter']['name']){
$cacheDir = $config['adapter']['options']['cacheDir'];
if(!is_dir($cacheDir)){
mkdir($cacheDir, 0777, true);
}
}
$storage = StorageFactory::factory($config);
$cache = new SimpleCacheDecorator($storage);

return $cache;
}
}
20 changes: 20 additions & 0 deletions src/Bridge/Geocoder/Factory/CacheProviderFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php


namespace SimpleImport\Bridge\Geocoder\Factory;


use Geocoder\Provider\Cache\ProviderCache;
use Interop\Container\ContainerInterface;
use Zend\ServiceManager\Factory\FactoryInterface;

class CacheProviderFactory implements FactoryInterface
{
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
$cache = $container->get('SimpleImport/Geocoder/Cache');
$realProvider = $container->get('SimpleImport/Geocoder/Provider');

return new ProviderCache($realProvider, $cache);
}
}
54 changes: 54 additions & 0 deletions src/Bridge/Geocoder/Factory/ProviderFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php


namespace SimpleImport\Bridge\Geocoder\Factory;


use Geocoder\Provider\GoogleMaps\GoogleMaps as GoogleMapsProvider;
use GuzzleHttp\Client as GuzzleClient;
use Http\Adapter\Guzzle6\Client as HttpClient;
use Http\Client\Common\PluginClient;
use Interop\Container\ContainerInterface;
use Zend\ServiceManager\Factory\FactoryInterface;

class ProviderFactory implements FactoryInterface
{
/**
* @param ContainerInterface $container
* @param string $requestedName
* @param array|null $options
*
* @return GoogleMapsProvider|object
*/
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
/** @var \SimpleImport\Options\ModuleOptions $moduleOptions */
$moduleOptions = $container->get('SimpleImport/Options/Module');

$httpAdapter = $this->createHttpAdapter();
$region = $moduleOptions->getGeocodeRegion();
$apiKey = $moduleOptions->getGeocodeGoogleApiKey();
$pluginClient = new PluginClient($httpAdapter);

$provider = new GoogleMapsProvider(
$pluginClient,
$region,
$apiKey
);

return $provider;
}

private function createHttpAdapter()
{
$config = [
'timeout' => 2.0,
'verify' => false,
];

$guzzle = new GuzzleClient($config);
$adapter = new HttpClient($guzzle);

return $adapter;
}
}
5 changes: 3 additions & 2 deletions src/Controller/DeleteCrawlerConsoleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license MIT
* @copyright 2013 - 2018 Cross Solution <http://cross-solution.de>
*/

/** */
namespace SimpleImport\Controller;

Expand All @@ -16,7 +16,8 @@

/**
* ${CARET}
*
*
* @method siLoadCrawler
* @author Mathias Gelhausen <gelhausen@cross-solution.de>
* @todo write test
*/
Expand Down
11 changes: 5 additions & 6 deletions src/Controller/Plugin/LoadCrawlerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license MIT
* @copyright 2013 - 2018 Cross Solution <http://cross-solution.de>
*/

/** */
namespace SimpleImport\Controller\Plugin;

Expand All @@ -15,7 +15,7 @@

/**
* Factory for \SimpleImport\Controller\Plugin\LoadCrawler
*
*
* @author Mathias Gelhausen <gelhausen@cross-solution.de>
*/
class LoadCrawlerFactory implements FactoryInterface
Expand All @@ -30,12 +30,11 @@ class LoadCrawlerFactory implements FactoryInterface
*
* @return LoadCrawler
*/
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null)
{
$repositories = $container->get('repositories');
$repository = $repositories->get('SimpleImport/Crawler');
$service = new LoadCrawler($repository);

return $service;

return new LoadCrawler($repository);
}
}

0 comments on commit dffd655

Please sign in to comment.