Completed
Push — develop ( cc6530...59407f )
by Mathias
08:03
created
Organizations/src/Organizations/Controller/InviteEmployeeController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     private $orgRepo;
37 37
 
38
-	public function __construct(
38
+    public function __construct(
39 39
         OrganizationRepository $orgRepo
40 40
     )
41 41
     {
Please login to merge, or discard this patch.
module/Behat/src/CommonContextTrait.php 3 patches
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,6 +51,9 @@  discard block
 block discarded – undo
51 51
 		$this->summaryFormContext = $scope->getEnvironment()->getContext(SummaryFormContext::class);
52 52
 	}
53 53
 	
54
+	/**
55
+	 * @param string $name
56
+	 */
54 57
 	public function buildUrl($name, array $params=array(), array $options=array())
55 58
 	{
56 59
 	    $defaults = ['lang'=>'en'];
@@ -71,7 +74,7 @@  discard block
 block discarded – undo
71 74
 	}
72 75
 	
73 76
 	/**
74
-	 * @param $id
77
+	 * @param string $id
75 78
 	 * @return mixed|object
76 79
 	 */
77 80
 	public function getService($id)
@@ -80,7 +83,7 @@  discard block
 block discarded – undo
80 83
 	}
81 84
 	
82 85
 	/**
83
-	 * @param $id
86
+	 * @param string $id
84 87
 	 *
85 88
 	 * @return RepositoryInterface
86 89
 	 */
Please login to merge, or discard this patch.
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -18,43 +18,43 @@  discard block
 block discarded – undo
18 18
 
19 19
 trait CommonContextTrait
20 20
 {
21
-	/**
22
-	 * @var MinkContext
23
-	 */
24
-	protected $minkContext;
21
+    /**
22
+     * @var MinkContext
23
+     */
24
+    protected $minkContext;
25 25
 	
26
-	/**
27
-	 * @var CoreContext
28
-	 */
29
-	protected $coreContext;
26
+    /**
27
+     * @var CoreContext
28
+     */
29
+    protected $coreContext;
30 30
 	
31
-	/**
32
-	 * @var UserContext
33
-	 */
34
-	protected $userContext;
31
+    /**
32
+     * @var UserContext
33
+     */
34
+    protected $userContext;
35 35
 	
36
-	/**
37
-	 * @var SummaryFormContext
38
-	 */
39
-	protected $summaryFormContext;
36
+    /**
37
+     * @var SummaryFormContext
38
+     */
39
+    protected $summaryFormContext;
40 40
 	
41
-	/**
42
-	 * @BeforeScenario
43
-	 *
44
-	 * @param BeforeScenarioScope $scope
45
-	 */
46
-	final public function gatherContexts(BeforeScenarioScope $scope)
47
-	{
48
-		$this->minkContext = $scope->getEnvironment()->getContext(MinkContext::class);
49
-		$this->coreContext = $scope->getEnvironment()->getContext(CoreContext::class);
50
-		$this->userContext = $scope->getEnvironment()->getContext(UserContext::class);
51
-		$this->summaryFormContext = $scope->getEnvironment()->getContext(SummaryFormContext::class);
52
-	}
41
+    /**
42
+     * @BeforeScenario
43
+     *
44
+     * @param BeforeScenarioScope $scope
45
+     */
46
+    final public function gatherContexts(BeforeScenarioScope $scope)
47
+    {
48
+        $this->minkContext = $scope->getEnvironment()->getContext(MinkContext::class);
49
+        $this->coreContext = $scope->getEnvironment()->getContext(CoreContext::class);
50
+        $this->userContext = $scope->getEnvironment()->getContext(UserContext::class);
51
+        $this->summaryFormContext = $scope->getEnvironment()->getContext(SummaryFormContext::class);
52
+    }
53 53
 	
54
-	public function buildUrl($name, array $params=array(), array $options=array())
55
-	{
56
-	    $defaults = ['lang'=>'en'];
57
-	    $params = array_merge($defaults,$params);
54
+    public function buildUrl($name, array $params=array(), array $options=array())
55
+    {
56
+        $defaults = ['lang'=>'en'];
57
+        $params = array_merge($defaults,$params);
58 58
         /* @var Url $urlHelper */
59 59
         $urlHelper = $this
60 60
             ->getService('ViewHelperManager')
@@ -63,36 +63,36 @@  discard block
 block discarded – undo
63 63
         $url = $urlHelper($name,$params,$options);
64 64
 
65 65
         return $this->coreContext->generateUrl($url);
66
-	}
66
+    }
67 67
 	
68
-	public function visit($url)
69
-	{
70
-		$this->coreContext->iVisit($url);
71
-	}
68
+    public function visit($url)
69
+    {
70
+        $this->coreContext->iVisit($url);
71
+    }
72 72
 	
73
-	/**
74
-	 * @param $id
75
-	 * @return mixed|object
76
-	 */
77
-	public function getService($id)
78
-	{
79
-		return $this->coreContext->getServiceManager()->get($id);
80
-	}
73
+    /**
74
+     * @param $id
75
+     * @return mixed|object
76
+     */
77
+    public function getService($id)
78
+    {
79
+        return $this->coreContext->getServiceManager()->get($id);
80
+    }
81 81
 	
82
-	/**
83
-	 * @param $id
84
-	 *
85
-	 * @return RepositoryInterface
86
-	 */
87
-	public function getRepository($id)
88
-	{
89
-		return $this->coreContext->getRepositories()->get($id);
90
-	}
82
+    /**
83
+     * @param $id
84
+     *
85
+     * @return RepositoryInterface
86
+     */
87
+    public function getRepository($id)
88
+    {
89
+        return $this->coreContext->getRepositories()->get($id);
90
+    }
91 91
 
92 92
     /**
93 93
      * @return UserContext
94 94
      */
95
-	public function getUserContext()
95
+    public function getUserContext()
96 96
     {
97 97
         return $this->userContext;
98 98
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,16 +51,16 @@
 block discarded – undo
51 51
 		$this->summaryFormContext = $scope->getEnvironment()->getContext(SummaryFormContext::class);
52 52
 	}
53 53
 	
54
-	public function buildUrl($name, array $params=array(), array $options=array())
54
+	public function buildUrl($name, array $params = array(), array $options = array())
55 55
 	{
56 56
 	    $defaults = ['lang'=>'en'];
57
-	    $params = array_merge($defaults,$params);
57
+	    $params = array_merge($defaults, $params);
58 58
         /* @var Url $urlHelper */
59 59
         $urlHelper = $this
60 60
             ->getService('ViewHelperManager')
61 61
             ->get('url')
62 62
         ;
63
-        $url = $urlHelper($name,$params,$options);
63
+        $url = $urlHelper($name, $params, $options);
64 64
 
65 65
         return $this->coreContext->generateUrl($url);
66 66
 	}
Please login to merge, or discard this patch.
module/Behat/src/SettingsContext.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -14,26 +14,26 @@
 block discarded – undo
14 14
 
15 15
 class SettingsContext implements Context
16 16
 {
17
-	use CommonContextTrait;
17
+    use CommonContextTrait;
18 18
 	
19
-	/**
20
-	 * @Given I go to settings page
21
-	 */
22
-	public function iGoToSettingsPage()
23
-	{
24
-		//$this->visit('/settings');
19
+    /**
20
+     * @Given I go to settings page
21
+     */
22
+    public function iGoToSettingsPage()
23
+    {
24
+        //$this->visit('/settings');
25 25
         $url = $this->buildUrl('lang/settings');
26 26
         $this->visit($url);
27
-	}
27
+    }
28 28
 	
29
-	/**
30
-	 * @Given I go to email template settings page
31
-	 */
32
-	public function iGoToEmailTemplatePage()
33
-	{
34
-	    $url = $this->buildUrl('lang/settings',[
35
-	        'module' => 'Applications'
29
+    /**
30
+     * @Given I go to email template settings page
31
+     */
32
+    public function iGoToEmailTemplatePage()
33
+    {
34
+        $url = $this->buildUrl('lang/settings',[
35
+            'module' => 'Applications'
36 36
         ]);
37
-		$this->visit($url);
38
-	}
37
+        $this->visit($url);
38
+    }
39 39
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 	 */
32 32
 	public function iGoToEmailTemplatePage()
33 33
 	{
34
-	    $url = $this->buildUrl('lang/settings',[
34
+	    $url = $this->buildUrl('lang/settings', [
35 35
 	        'module' => 'Applications'
36 36
         ]);
37 37
 		$this->visit($url);
Please login to merge, or discard this patch.
module/Behat/src/ApplicationContext.php 2 patches
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -22,37 +22,37 @@
 block discarded – undo
22 22
  */
23 23
 class ApplicationContext implements Context
24 24
 {
25
-	use CommonContextTrait;
25
+    use CommonContextTrait;
26 26
 	
27
-	/**
28
-	 * @Given I apply for :title job
29
-	 *
30
-	 * @param string $title
31
-	 * @throws \Exception when the titled job not exists
32
-	 */
33
-	public function iApplyAJob($title)
34
-	{
35
-		/* @var $repo JobRepository */
36
-		$repo = $this->getRepository('Jobs/Job');
37
-		$job = $repo->findOneBy(['title' => $title]);
38
-		if(!$job instanceof Job){
39
-			throw new \Exception('There is no job titled: "'.$title.'"');
40
-		}
41
-		$job->setApplyId($job->getId());
42
-		$repo->store($job);
27
+    /**
28
+     * @Given I apply for :title job
29
+     *
30
+     * @param string $title
31
+     * @throws \Exception when the titled job not exists
32
+     */
33
+    public function iApplyAJob($title)
34
+    {
35
+        /* @var $repo JobRepository */
36
+        $repo = $this->getRepository('Jobs/Job');
37
+        $job = $repo->findOneBy(['title' => $title]);
38
+        if(!$job instanceof Job){
39
+            throw new \Exception('There is no job titled: "'.$title.'"');
40
+        }
41
+        $job->setApplyId($job->getId());
42
+        $repo->store($job);
43 43
 
44
-		$url = $this->buildUrl('lang/apply',[
45
-		    'applyId' => $job->getApplyId()
44
+        $url = $this->buildUrl('lang/apply',[
45
+            'applyId' => $job->getApplyId()
46 46
         ]);
47
-		$this->visit($url);
48
-	}
47
+        $this->visit($url);
48
+    }
49 49
 	
50
-	/**
51
-	 * @Given I visit job categories
52
-	 */
53
-	public function visitJobsCategories()
54
-	{
55
-		$url = '/admin/jobs/categories';
56
-		$this->visit($url);
57
-	}
50
+    /**
51
+     * @Given I visit job categories
52
+     */
53
+    public function visitJobsCategories()
54
+    {
55
+        $url = '/admin/jobs/categories';
56
+        $this->visit($url);
57
+    }
58 58
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@
 block discarded – undo
35 35
 		/* @var $repo JobRepository */
36 36
 		$repo = $this->getRepository('Jobs/Job');
37 37
 		$job = $repo->findOneBy(['title' => $title]);
38
-		if(!$job instanceof Job){
38
+		if (!$job instanceof Job) {
39 39
 			throw new \Exception('There is no job titled: "'.$title.'"');
40 40
 		}
41 41
 		$job->setApplyId($job->getId());
42 42
 		$repo->store($job);
43 43
 
44
-		$url = $this->buildUrl('lang/apply',[
44
+		$url = $this->buildUrl('lang/apply', [
45 45
 		    'applyId' => $job->getApplyId()
46 46
         ]);
47 47
 		$this->visit($url);
Please login to merge, or discard this patch.
module/Behat/src/CvContext.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -22,23 +22,23 @@
 block discarded – undo
22 22
  */
23 23
 class CvContext implements Context
24 24
 {
25
-	use CommonContextTrait;
25
+    use CommonContextTrait;
26 26
 	
27 27
 	
28
-	/**
29
-	 * @Given I go to manage my resume page
30
-	 */
31
-	public function iGoToManageResumePage()
32
-	{
33
-	    $url = $this->buildUrl('lang/my-cv');
34
-		$this->visit($url);
35
-	}
28
+    /**
29
+     * @Given I go to manage my resume page
30
+     */
31
+    public function iGoToManageResumePage()
32
+    {
33
+        $url = $this->buildUrl('lang/my-cv');
34
+        $this->visit($url);
35
+    }
36 36
 	
37
-	/**
38
-	 * @When I click edit on my personal information
39
-	 */
40
-	public function iClickEditOnPersonalInformations()
41
-	{
42
-		$this->summaryFormContext->iClickEditOnForm('resumePersonalInformations');
43
-	}
37
+    /**
38
+     * @When I click edit on my personal information
39
+     */
40
+    public function iClickEditOnPersonalInformations()
41
+    {
42
+        $this->summaryFormContext->iClickEditOnForm('resumePersonalInformations');
43
+    }
44 44
 }
Please login to merge, or discard this patch.
module/Core/src/Core/Factory/Controller/LazyControllerFactory.php 3 patches
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -27,48 +27,48 @@  discard block
 block discarded – undo
27 27
  */
28 28
 class LazyControllerFactory implements AbstractFactoryInterface
29 29
 {
30
-	protected $aliases = [
31
-		FormElementManager::class => 'FormElementManager',
32
-		ValidatorPluginManager::class => 'ValidatorManager',
33
-		Translator::class => 'translator',
34
-		ModuleManagerInterface::class => 'ModuleManager',
35
-		EventManager::class => 'Core/EventManager',
30
+    protected $aliases = [
31
+        FormElementManager::class => 'FormElementManager',
32
+        ValidatorPluginManager::class => 'ValidatorManager',
33
+        Translator::class => 'translator',
34
+        ModuleManagerInterface::class => 'ModuleManager',
35
+        EventManager::class => 'Core/EventManager',
36 36
         RepositoryService::class => 'repositories',
37
-	];
37
+    ];
38 38
 	
39
-	public function canCreate( ContainerInterface $container, $requestedName )
40
-	{
41
-		return strstr( $requestedName,'\Controller') !== false;
42
-	}
39
+    public function canCreate( ContainerInterface $container, $requestedName )
40
+    {
41
+        return strstr( $requestedName,'\Controller') !== false;
42
+    }
43 43
 
44
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
45
-	{
44
+    public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
45
+    {
46 46
         $className = $this->getClassName($requestedName);
47
-		$class = new \ReflectionClass($className);
47
+        $class = new \ReflectionClass($className);
48 48
 
49
-		if( $constructor = $class->getConstructor() )
50
-		{
51
-			if( $params = $constructor->getParameters() )
52
-			{
53
-				$constructorArgs = [];
54
-				foreach( $params as $p )
55
-				{
56
-					$serviceName = '';
57
-					if( $p->getClass() ) {
58
-						$serviceName = $p->getClass()->getName();
59
-						if (array_key_exists($serviceName, $this->aliases)) {
60
-							$serviceName = $this->aliases[$serviceName];
61
-						}
62
-					}
63
-					else{
64
-						if( $p->getName() == 'config' ){
49
+        if( $constructor = $class->getConstructor() )
50
+        {
51
+            if( $params = $constructor->getParameters() )
52
+            {
53
+                $constructorArgs = [];
54
+                foreach( $params as $p )
55
+                {
56
+                    $serviceName = '';
57
+                    if( $p->getClass() ) {
58
+                        $serviceName = $p->getClass()->getName();
59
+                        if (array_key_exists($serviceName, $this->aliases)) {
60
+                            $serviceName = $this->aliases[$serviceName];
61
+                        }
62
+                    }
63
+                    else{
64
+                        if( $p->getName() == 'config' ){
65 65
                             $serviceName = 'config';
66 66
                         }
67
-					}
67
+                    }
68 68
 
69
-					if(!$container->has($serviceName)){
70
-					    throw new ServiceNotCreatedException(sprintf(
71
-					        'Can\'t create constructor argument "%s" for service "%s"',
69
+                    if(!$container->has($serviceName)){
70
+                        throw new ServiceNotCreatedException(sprintf(
71
+                            'Can\'t create constructor argument "%s" for service "%s"',
72 72
                             $p->getName(),$requestedName
73 73
                         ));
74 74
                     }
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
                         echo __CLASS__ . " couldn't create an instance of {$p->getName()} to satisfy the constructor for $requestedName.";
80 80
                         exit;
81 81
                     }
82
-				}
83
-				return $class->newInstanceArgs($constructorArgs);
84
-			}
85
-		}
82
+                }
83
+                return $class->newInstanceArgs($constructorArgs);
84
+            }
85
+        }
86 86
 		
87
-		return new $className;
88
-	}
87
+        return new $className;
88
+    }
89 89
 
90 90
     /**
91 91
      * Generate class name
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -36,47 +36,47 @@  discard block
 block discarded – undo
36 36
         RepositoryService::class => 'repositories',
37 37
 	];
38 38
 	
39
-	public function canCreate( ContainerInterface $container, $requestedName )
39
+	public function canCreate(ContainerInterface $container, $requestedName)
40 40
 	{
41
-		return strstr( $requestedName,'\Controller') !== false;
41
+		return strstr($requestedName, '\Controller') !== false;
42 42
 	}
43 43
 
44
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
44
+	public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
45 45
 	{
46 46
         $className = $this->getClassName($requestedName);
47 47
 		$class = new \ReflectionClass($className);
48 48
 
49
-		if( $constructor = $class->getConstructor() )
49
+		if ($constructor = $class->getConstructor())
50 50
 		{
51
-			if( $params = $constructor->getParameters() )
51
+			if ($params = $constructor->getParameters())
52 52
 			{
53 53
 				$constructorArgs = [];
54
-				foreach( $params as $p )
54
+				foreach ($params as $p)
55 55
 				{
56 56
 					$serviceName = '';
57
-					if( $p->getClass() ) {
57
+					if ($p->getClass()) {
58 58
 						$serviceName = $p->getClass()->getName();
59 59
 						if (array_key_exists($serviceName, $this->aliases)) {
60 60
 							$serviceName = $this->aliases[$serviceName];
61 61
 						}
62 62
 					}
63
-					else{
64
-						if( $p->getName() == 'config' ){
63
+					else {
64
+						if ($p->getName() == 'config') {
65 65
                             $serviceName = 'config';
66 66
                         }
67 67
 					}
68 68
 
69
-					if(!$container->has($serviceName)){
69
+					if (!$container->has($serviceName)) {
70 70
 					    throw new ServiceNotCreatedException(sprintf(
71 71
 					        'Can\'t create constructor argument "%s" for service "%s"',
72
-                            $p->getName(),$requestedName
72
+                            $p->getName(), $requestedName
73 73
                         ));
74 74
                     }
75 75
                     try {
76 76
                         $constructorArgs[] = $container->get($serviceName);
77 77
                     }
78 78
                     catch (\Exception $x) {
79
-                        echo __CLASS__ . " couldn't create an instance of {$p->getName()} to satisfy the constructor for $requestedName.";
79
+                        echo __CLASS__." couldn't create an instance of {$p->getName()} to satisfy the constructor for $requestedName.";
80 80
                         exit;
81 81
                     }
82 82
 				}
@@ -95,10 +95,10 @@  discard block
 block discarded – undo
95 95
      */
96 96
     private function getClassName($requestedName)
97 97
     {
98
-        $exp = explode('/',$requestedName);
98
+        $exp = explode('/', $requestedName);
99 99
 
100
-        $className = array_shift($exp).'\\Controller\\'.implode('\\',$exp).'Controller';
101
-        if(!class_exists($className)){
100
+        $className = array_shift($exp).'\\Controller\\'.implode('\\', $exp).'Controller';
101
+        if (!class_exists($className)) {
102 102
             throw new ServiceNotCreatedException(
103 103
                 sprintf(
104 104
                     'Can\'t find correct controller class for "%s"',
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@  discard block
 block discarded – undo
59 59
 						if (array_key_exists($serviceName, $this->aliases)) {
60 60
 							$serviceName = $this->aliases[$serviceName];
61 61
 						}
62
-					}
63
-					else{
62
+					} else{
64 63
 						if( $p->getName() == 'config' ){
65 64
                             $serviceName = 'config';
66 65
                         }
@@ -74,8 +73,7 @@  discard block
 block discarded – undo
74 73
                     }
75 74
                     try {
76 75
                         $constructorArgs[] = $container->get($serviceName);
77
-                    }
78
-                    catch (\Exception $x) {
76
+                    } catch (\Exception $x) {
79 77
                         echo __CLASS__ . " couldn't create an instance of {$p->getName()} to satisfy the constructor for $requestedName.";
80 78
                         exit;
81 79
                     }
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/IndexController.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -25,24 +25,24 @@  discard block
 block discarded – undo
25 25
  */
26 26
 class IndexController extends AbstractActionController
27 27
 {
28
-	/** @var  DefaultListener */
29
-	private $defaultListener;
28
+    /** @var  DefaultListener */
29
+    private $defaultListener;
30 30
 	
31
-	private $config;
31
+    private $config;
32 32
 	
33
-	/**
34
-	 * @var ModuleManager
35
-	 */
36
-	private $moduleManager;
33
+    /**
34
+     * @var ModuleManager
35
+     */
36
+    private $moduleManager;
37 37
 	
38
-	public function __construct(
38
+    public function __construct(
39 39
         ModuleManagerInterface $moduleManager,
40 40
         $config
41 41
     )
42
-	{
43
-		$this->config = $config;
44
-		$this->moduleManager = $moduleManager;
45
-	}
42
+    {
43
+        $this->config = $config;
44
+        $this->moduleManager = $moduleManager;
45
+    }
46 46
 
47 47
     /**
48 48
      * Home site
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     {
107 107
         $viewModel = new ViewModel();
108 108
         $viewModel->setTemplate('error/index')
109
-                  ->setVariable('message', 'An unexpected error had occured. Please try again later.');
109
+                    ->setVariable('message', 'An unexpected error had occured. Please try again later.');
110 110
         return $viewModel;
111 111
     }
112 112
 }
Please login to merge, or discard this patch.
module/Core/config/module.config.php 2 patches
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 use Core\Factory\Controller\LazyControllerFactory;
18 18
 use Zend\I18n\Translator\Resources;
19 19
 
20
-$doctrineConfig = include __DIR__ . '/doctrine.config.php';
20
+$doctrineConfig = include __DIR__.'/doctrine.config.php';
21 21
 
22 22
 
23 23
 return array(
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     'doctrine' => $doctrineConfig,
26 26
 
27 27
     'options' => [
28
-        'Core/MailServiceOptions' => [ 'class' => '\Core\Options\MailServiceOptions' ],
28
+        'Core/MailServiceOptions' => ['class' => '\Core\Options\MailServiceOptions'],
29 29
         ],
30 30
     
31 31
     'Core' => array(
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
                      'name' => 'stream',
46 46
                     'priority' => 1000,
47 47
                     'options' => array(
48
-                         'stream' => __DIR__ .'/../../../log/yawik.log',
48
+                         'stream' => __DIR__.'/../../../log/yawik.log',
49 49
                     ),
50 50
                  ),
51 51
             ),
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                      'name' => 'stream',
57 57
                     'priority' => 1000,
58 58
                     'options' => array(
59
-                         'stream' => __DIR__ .'/../../../log/mails.log',
59
+                         'stream' => __DIR__.'/../../../log/mails.log',
60 60
                     ),
61 61
                  ),
62 62
             ),
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         'mode' => true, // true = production|false = development|null = autodetect|IP address(es) csv/array
74 74
         'bar' => false, // bool = enabled|Toggle nette diagnostics bar.
75 75
         'strict' => true, // bool = cause immediate death|int = matched against error severity
76
-        'log' => __DIR__ . '/../../../log/tracy', // path to log directory (this directory keeps error.log, snoozing mailsent file & html exception trace files)
76
+        'log' => __DIR__.'/../../../log/tracy', // path to log directory (this directory keeps error.log, snoozing mailsent file & html exception trace files)
77 77
         'email' => null, // in production mode notifies the recipient
78 78
         'email_snooze' => 900 // interval for sending email in seconds
79 79
     ],
@@ -218,16 +218,16 @@  discard block
 block discarded – undo
218 218
             'Core/JsonEntityHydrator' => 'Core\Entity\Hydrator\JsonEntityHydratorFactory',
219 219
             'Core/EntityHydrator' => 'Core\Entity\Hydrator\EntityHydratorFactory',
220 220
             'Core/Options' => 'Core\Factory\ModuleOptionsFactory',
221
-            'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class,'factory'],
222
-            'DefaultListeners' => ['Core\Listener\DefaultListener','factory'],
223
-            'templateProviderStrategy'   => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy','factory'],
224
-            'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class,'factory'],
221
+            'Core/DoctrineMongoODM/RepositoryEvents' => [\Core\Repository\DoctrineMongoODM\Event\RepositoryEventsSubscriber::class, 'factory'],
222
+            'DefaultListeners' => ['Core\Listener\DefaultListener', 'factory'],
223
+            'templateProviderStrategy'   => ['Core\Form\Hydrator\Strategy\TemplateProviderStrategy', 'factory'],
224
+            'Core/Listener/DeferredListenerAggregate' => [\Core\Listener\DeferredListenerAggregate::class, 'factory'],
225 225
             'Core/Listener/CreatePaginator' => 'Core\Listener\CreatePaginatorListener::factory',
226 226
             'Core/Locale' => 'Core\I18n\LocaleFactory',
227 227
             \Core\Listener\AjaxRouteListener::class => \Core\Factory\Listener\AjaxRouteListenerFactory::class,
228 228
             \Core\Listener\DeleteImageSetListener::class => \Core\Factory\Listener\DeleteImageSetListenerFactory::class,
229 229
             'Imagine' => \Core\Factory\Service\ImagineFactory::class,
230
-            'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class,'factory'],
230
+            'Core/Listener/Notification' => [\Core\Listener\NotificationListener::class, 'factory'],
231 231
         ),
232 232
         'abstract_factories' => array(
233 233
             'Core\Factory\OptionsAbstractFactory',
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
         'translation_file_patterns' => array(
251 251
             [
252 252
                 'type' => 'gettext',
253
-                'base_dir' => __DIR__ . '/../language',
253
+                'base_dir' => __DIR__.'/../language',
254 254
                 'pattern' => '%s.mo',
255 255
             ],
256 256
             [
@@ -305,9 +305,9 @@  discard block
 block discarded – undo
305 305
             'Core/SearchForm' => 'Core\Factory\Controller\Plugin\SearchFormFactory',
306 306
             'listquery' => 'Core\Controller\Plugin\ListQuery::factory',
307 307
             'mail' => 'Core\Controller\Plugin\Mail::factory',
308
-            'Core/Mailer' => ['Core\Controller\Plugin\Mailer','factory'],
309
-            'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class,'factory'],
310
-            'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class,'factory'],
308
+            'Core/Mailer' => ['Core\Controller\Plugin\Mailer', 'factory'],
309
+            'Core/CreatePaginator' => [\Core\Controller\Plugin\CreatePaginator::class, 'factory'],
310
+            'Core/PaginatorService' => [\Core\Controller\Plugin\CreatePaginatorService::class, 'factory'],
311 311
         ),
312 312
         'invokables' => array(
313 313
             'Core/FileSender' => 'Core\Controller\Plugin\FileSender',
@@ -337,32 +337,32 @@  discard block
 block discarded – undo
337 337
         'exception_template' => 'error/index',
338 338
         // Map template to files. Speeds up the lookup through the template stack.
339 339
         'template_map' => array(
340
-            'noscript-notice' => __DIR__ . '/../view/layout/_noscript-notice.phtml',
341
-            'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
342
-            'error/404' => __DIR__ . '/../view/error/404.phtml',
343
-            'error/403' => __DIR__ . '/../view/error/403.phtml',
344
-            'error/index' => __DIR__ . '/../view/error/index.phtml',
345
-            'main-navigation' => __DIR__ . '/../view/partial/main-navigation.phtml',
346
-            'pagination-control' => __DIR__ . '/../view/partial/pagination-control.phtml',
347
-            'core/loading-popup' => __DIR__ . '/../view/partial/loading-popup.phtml',
348
-            'core/notifications' => __DIR__ . '/../view/partial/notifications.phtml',
349
-            'form/core/buttons' => __DIR__ . '/../view/form/buttons.phtml',
350
-            'core/social-buttons' => __DIR__ . '/../view/partial/social-buttons.phtml',
351
-            'form/core/privacy' => __DIR__ . '/../view/form/privacy.phtml',
352
-            'core/form/permissions-fieldset' => __DIR__ . '/../view/form/permissions-fieldset.phtml',
353
-            'core/form/permissions-collection' => __DIR__ . '/../view/form/permissions-collection.phtml',
354
-            'core/form/container-view' => __DIR__ . '/../view/form/container.view.phtml',
355
-            'core/form/tree-manage.view' => __DIR__ . '/../view/form/tree-manage.view.phtml',
356
-            'core/form/tree-manage.form' => __DIR__ . '/../view/form/tree-manage.form.phtml',
357
-            'core/form/tree-add-item' => __DIR__ . '/../view/form/tree-add-item.phtml',
358
-            'mail/header' =>  __DIR__ . '/../view/mail/header.phtml',
359
-            'mail/footer' =>  __DIR__ . '/../view/mail/footer.phtml',
360
-            'mail/footer.en' =>  __DIR__ . '/../view/mail/footer.en.phtml',
340
+            'noscript-notice' => __DIR__.'/../view/layout/_noscript-notice.phtml',
341
+            'layout/layout' => __DIR__.'/../view/layout/layout.phtml',
342
+            'error/404' => __DIR__.'/../view/error/404.phtml',
343
+            'error/403' => __DIR__.'/../view/error/403.phtml',
344
+            'error/index' => __DIR__.'/../view/error/index.phtml',
345
+            'main-navigation' => __DIR__.'/../view/partial/main-navigation.phtml',
346
+            'pagination-control' => __DIR__.'/../view/partial/pagination-control.phtml',
347
+            'core/loading-popup' => __DIR__.'/../view/partial/loading-popup.phtml',
348
+            'core/notifications' => __DIR__.'/../view/partial/notifications.phtml',
349
+            'form/core/buttons' => __DIR__.'/../view/form/buttons.phtml',
350
+            'core/social-buttons' => __DIR__.'/../view/partial/social-buttons.phtml',
351
+            'form/core/privacy' => __DIR__.'/../view/form/privacy.phtml',
352
+            'core/form/permissions-fieldset' => __DIR__.'/../view/form/permissions-fieldset.phtml',
353
+            'core/form/permissions-collection' => __DIR__.'/../view/form/permissions-collection.phtml',
354
+            'core/form/container-view' => __DIR__.'/../view/form/container.view.phtml',
355
+            'core/form/tree-manage.view' => __DIR__.'/../view/form/tree-manage.view.phtml',
356
+            'core/form/tree-manage.form' => __DIR__.'/../view/form/tree-manage.form.phtml',
357
+            'core/form/tree-add-item' => __DIR__.'/../view/form/tree-add-item.phtml',
358
+            'mail/header' =>  __DIR__.'/../view/mail/header.phtml',
359
+            'mail/footer' =>  __DIR__.'/../view/mail/footer.phtml',
360
+            'mail/footer.en' =>  __DIR__.'/../view/mail/footer.en.phtml',
361 361
             //'startpage' => __DIR__ . '/../view/layout/startpage.phtml',
362 362
         ),
363 363
         // Where to look for view templates not mapped above
364 364
         'template_path_stack' => array(
365
-            __DIR__ . '/../view',
365
+            __DIR__.'/../view',
366 366
         ),
367 367
     ),
368 368
     'view_helpers' => array(
Please login to merge, or discard this patch.
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -42,24 +42,24 @@  discard block
 block discarded – undo
42 42
     'log' => array(
43 43
         'Core/Log' => array(
44 44
             'writers' => array(
45
-                 array(
46
-                     'name' => 'stream',
45
+                    array(
46
+                        'name' => 'stream',
47 47
                     'priority' => 1000,
48 48
                     'options' => array(
49
-                         'stream' => __DIR__ .'/../../../log/yawik.log',
49
+                            'stream' => __DIR__ .'/../../../log/yawik.log',
50
+                    ),
50 51
                     ),
51
-                 ),
52 52
             ),
53 53
         ),
54 54
         'Log/Core/Mail' => array(
55 55
             'writers' => array(
56
-                 array(
57
-                     'name' => 'stream',
56
+                    array(
57
+                        'name' => 'stream',
58 58
                     'priority' => 1000,
59 59
                     'options' => array(
60
-                         'stream' => __DIR__ .'/../../../log/mails.log',
60
+                            'stream' => __DIR__ .'/../../../log/mails.log',
61
+                    ),
61 62
                     ),
62
-                 ),
63 63
             ),
64 64
         ),
65 65
     ),
@@ -290,12 +290,12 @@  discard block
 block discarded – undo
290 290
     ),
291 291
     // Configuration of the controller service manager (Which loads controllers)
292 292
     'controllers' => array(
293
-	    'factories' => [
294
-		    'Core/Index'   => LazyControllerFactory::class,
293
+        'factories' => [
294
+            'Core/Index'   => LazyControllerFactory::class,
295 295
             'Core/Admin'   => AdminControllerFactory::class,
296
-		    'Core/File'    => FileControllerFactory::class,
296
+            'Core/File'    => FileControllerFactory::class,
297 297
             'Core/Content' => LazyControllerFactory::class,
298
-	    ],
298
+        ],
299 299
     ),
300 300
     // Configuration of the controller plugin service manager
301 301
     'controller_plugins' => array(
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
             'paginatorservice' => 'Core/PaginatorService',
326 326
             'paginationParams' => 'Core/PaginationParams',
327 327
             'searchform'       => 'Core/SearchForm',
328
-	        'notification'     => 'Notification',
328
+            'notification'     => 'Notification',
329 329
         )
330 330
     ),
331 331
     // Configure the view service manager
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
         ),
424 424
         'aliases' => [
425 425
             'snippet' => \Core\View\Helper\Snippet::class,
426
-	        'ajaxUrl' => \Core\View\Helper\AjaxUrl::class,
426
+            'ajaxUrl' => \Core\View\Helper\AjaxUrl::class,
427 427
             'proxy' => \Core\View\Helper\Proxy::class,
428 428
             'form_element' => 'formElement',
429 429
         ],
@@ -521,17 +521,17 @@  discard block
 block discarded – undo
521 521
         ],
522 522
 
523 523
         'Core/Ajax/Events' => [
524
-	        'service' => 'Core/EventManager',
525
-	        'event'   => \Core\Listener\Events\AjaxEvent::class,
524
+            'service' => 'Core/EventManager',
525
+            'event'   => \Core\Listener\Events\AjaxEvent::class,
526 526
         ],
527 527
 	    
528
-	    'Core/File/Events' => [
529
-		    'service' => 'Core/EventManager',
530
-		    'event' => \Core\Listener\Events\FileEvent::class,
528
+        'Core/File/Events' => [
529
+            'service' => 'Core/EventManager',
530
+            'event' => \Core\Listener\Events\FileEvent::class,
531 531
             'listeners' => [
532 532
                 \Core\Listener\DeleteImageSetListener::class => [\Core\Listener\Events\FileEvent::EVENT_DELETE, -1000],
533 533
             ],
534
-	    ]
534
+        ]
535 535
     ],
536 536
     
537 537
 );
Please login to merge, or discard this patch.
module/Behat/src/OrganizationContext.php 3 patches
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
  */
31 31
 class OrganizationContext implements Context
32 32
 {
33
-	use CommonContextTrait;
33
+    use CommonContextTrait;
34 34
 
35 35
     /**
36 36
      * @var JobContext
37 37
      */
38
-	private $jobContext;
38
+    private $jobContext;
39 39
 
40 40
     /**
41 41
      * @BeforeScenario
@@ -47,51 +47,51 @@  discard block
 block discarded – undo
47 47
         $this->jobContext = $scope->getEnvironment()->getContext(JobContext::class);
48 48
     }
49 49
 
50
-	/**
51
-	 * @Given I go to my organization page
52
-	 */
53
-	public function iGoToMyOrganizationPage()
54
-	{
50
+    /**
51
+     * @Given I go to my organization page
52
+     */
53
+    public function iGoToMyOrganizationPage()
54
+    {
55 55
         $url = $this->buildUrl('lang/my-organization');
56
-		$this->visit($url);
57
-	}
56
+        $this->visit($url);
57
+    }
58 58
 	
59
-	/**
60
-	 * @When I hover over name form
61
-	 */
62
-	public function iMouseOverOrganizationNameForm()
63
-	{
64
-		$locator = '#sf-nameForm .sf-summary';
65
-		$this->coreContext->iHoverOverTheElement($locator);
66
-	}
59
+    /**
60
+     * @When I hover over name form
61
+     */
62
+    public function iMouseOverOrganizationNameForm()
63
+    {
64
+        $locator = '#sf-nameForm .sf-summary';
65
+        $this->coreContext->iHoverOverTheElement($locator);
66
+    }
67 67
 	
68
-	/**
69
-	 * @Given I go to create new organization page
70
-	 */
71
-	public function iGoToCreateNewOrganizationPage()
72
-	{
73
-		//$this->visit('/organizations/edit');
68
+    /**
69
+     * @Given I go to create new organization page
70
+     */
71
+    public function iGoToCreateNewOrganizationPage()
72
+    {
73
+        //$this->visit('/organizations/edit');
74 74
         $url = $this->buildUrl('lang/organizations/edit');
75 75
         $this->visit($url);
76
-	}
76
+    }
77 77
 	
78
-	/**
79
-	 * @Given I go to organization overview page
80
-	 */
81
-	public function iGoToOrganizationOverviewPage()
82
-	{
83
-		//$this->visit('/organizations');
84
-		$url = $this->buildUrl('lang/organizations');
85
-		$this->visit($url);
86
-	}
78
+    /**
79
+     * @Given I go to organization overview page
80
+     */
81
+    public function iGoToOrganizationOverviewPage()
82
+    {
83
+        //$this->visit('/organizations');
84
+        $url = $this->buildUrl('lang/organizations');
85
+        $this->visit($url);
86
+    }
87 87
 
88 88
     /**
89 89
      * @Given I want to see list organization profiles
90 90
      */
91
-	public function iWantToSeeListOrganizationProfiles()
91
+    public function iWantToSeeListOrganizationProfiles()
92 92
     {
93
-       $url = $this->buildUrl('lang/organizations/profile');
94
-       $this->visit($url);
93
+        $url = $this->buildUrl('lang/organizations/profile');
94
+        $this->visit($url);
95 95
     }
96 96
 
97 97
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      * @internal param string $name
101 101
      * @internal param TableNode|null $table
102 102
      */
103
-	public function iHaveOrganization($name)
103
+    public function iHaveOrganization($name)
104 104
     {
105 105
         $user = $this->getUserContext()->getCurrentUser();
106 106
         $organization = $this->findOrganizationByName($name,false);
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
 	public function iHaveOrganization($name)
104 104
     {
105 105
         $user = $this->getUserContext()->getCurrentUser();
106
-        $organization = $this->findOrganizationByName($name,false);
106
+        $organization = $this->findOrganizationByName($name, false);
107 107
         $repo = $this->getRepository('Organizations/Organization');
108
-        if(!$organization instanceof Organization){
108
+        if (!$organization instanceof Organization) {
109 109
 
110 110
             $organization = new Organization();
111 111
             $organizationName = new OrganizationName($name);
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $organization->setParent($parent);
119 119
         $organization->setProfileSetting(Organization::PROFILE_ALWAYS_ENABLE);
120 120
         $permissions = $organization->getPermissions();
121
-        $permissions->grant($user,Permissions::PERMISSION_ALL);
121
+        $permissions->grant($user, Permissions::PERMISSION_ALL);
122 122
 
123 123
         $repo->store($organization);
124 124
         $repo->getDocumentManager()->refresh($organization);
@@ -128,19 +128,19 @@  discard block
 block discarded – undo
128 128
     /**
129 129
      * @Given organization :name have jobs:
130 130
      */
131
-    public function organizationHavePublishedJob($name,TableNode $table)
131
+    public function organizationHavePublishedJob($name, TableNode $table)
132 132
     {
133 133
         $user = $this->getUserContext()->getCurrentUser();
134
-        if(is_null($user)){
134
+        if (is_null($user)) {
135 135
             throw new FailedExpectationException('Need to login first');
136 136
         }
137 137
 
138 138
         $organization = $this->findOrganizationByName($name);
139
-        foreach($table->getColumnsHash() as $index=>$definitions){
139
+        foreach ($table->getColumnsHash() as $index=>$definitions) {
140 140
             $definitions['user'] = $user->getLogin();
141
-            $status = isset($definitions['status']) ? $definitions['status']:'draft';
141
+            $status = isset($definitions['status']) ? $definitions['status'] : 'draft';
142 142
             unset($definitions['status']);
143
-            $this->jobContext->buildJob($status,$definitions,$organization);
143
+            $this->jobContext->buildJob($status, $definitions, $organization);
144 144
         }
145 145
     }
146 146
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      * @param $name
150 150
      * @param $setting
151 151
      */
152
-    public function profileSetting($name,$setting)
152
+    public function profileSetting($name, $setting)
153 153
     {
154 154
         $repo = $this->getRepository('Organizations/Organization');
155 155
         $organization = $this->findOrganizationByName($name);
@@ -169,12 +169,12 @@  discard block
 block discarded – undo
169 169
         $contact = $organization->getContact();
170 170
 
171 171
         $definitions = $table->getRowsHash();
172
-        foreach($definitions as $name=>$value){
172
+        foreach ($definitions as $name=>$value) {
173 173
             $field = Inflector::camelize($name);
174 174
             $method = 'set'.$field;
175
-            $callback = array($contact,$method);
176
-            if(is_callable($callback)){
177
-                call_user_func_array($callback,[$value]);
175
+            $callback = array($contact, $method);
176
+            if (is_callable($callback)) {
177
+                call_user_func_array($callback, [$value]);
178 178
             }
179 179
         }
180 180
         $this->getRepository('Organizations/Organization')->store($organization);
@@ -186,14 +186,14 @@  discard block
 block discarded – undo
186 186
      * @param string $name
187 187
      * @throws FailedExpectationException
188 188
      */
189
-    public function iGoToOrganizationProfilePage($name=null)
189
+    public function iGoToOrganizationProfilePage($name = null)
190 190
     {
191
-        if(is_null($name)){
191
+        if (is_null($name)) {
192 192
             $organization = $this->getUserContext()->getCurrentUser()->getOrganization()->getOrganization();
193
-        }else{
193
+        } else {
194 194
             $organization = $this->findOrganizationByName($name);
195 195
         }
196
-        $url = $this->buildUrl('lang/organizations/profileDetail',[
196
+        $url = $this->buildUrl('lang/organizations/profileDetail', [
197 197
             'id' => $organization->getId()
198 198
         ]);
199 199
 
@@ -210,10 +210,10 @@  discard block
 block discarded – undo
210 210
         /* @var OrganizationRepository $repo */
211 211
         $repo = $this->getRepository('Organizations/Organization');
212 212
         $result = $repo->findByName($name);
213
-        $organization = count($result) > 0 ? $result[0]:null;
214
-        if(!$organization instanceof Organization && $throwException){
213
+        $organization = count($result) > 0 ? $result[0] : null;
214
+        if (!$organization instanceof Organization && $throwException) {
215 215
             throw new FailedExpectationException(
216
-                sprintf('Organization %s is not found.',$name)
216
+                sprintf('Organization %s is not found.', $name)
217 217
             );
218 218
         }
219 219
         return $organization;
@@ -232,8 +232,8 @@  discard block
 block discarded – undo
232 232
         $jobRepo = $this->getRepository('Jobs/Job');
233 233
         $result = $jobRepo->findByOrganization($org->getId());
234 234
 
235
-        foreach($result as $job){
236
-            $jobRepo->remove($job,true);
235
+        foreach ($result as $job) {
236
+            $jobRepo->remove($job, true);
237 237
         }
238 238
     }
239 239
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     {
245 245
         $user = $this->getUserContext()->getCurrentUser();
246 246
         $organization = $user->getOrganization()->getOrganization();
247
-        $url = $this->buildUrl('lang/organizations/edit',['id' => $organization->getId()]);
247
+        $url = $this->buildUrl('lang/organizations/edit', ['id' => $organization->getId()]);
248 248
         $this->visit($url);
249 249
     }
250 250
 
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
     public function iAttachLogoFromFile($file)
256 256
     {
257 257
         $elementId = 'organizationLogo-original';
258
-        $this->minkContext->attachFileToField($elementId,$file);
258
+        $this->minkContext->attachFileToField($elementId, $file);
259 259
     }
260 260
 
261 261
     /**
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
     public function iRemoveLogoFromOrganization()
265 265
     {
266 266
         $elementId = '#organizationLogo-original-delete';
267
-        $element = $this->minkContext->getSession()->getPage()->find('css',$elementId);
267
+        $element = $this->minkContext->getSession()->getPage()->find('css', $elementId);
268 268
         $element->click();
269 269
     }
270 270
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@
 block discarded – undo
190 190
     {
191 191
         if(is_null($name)){
192 192
             $organization = $this->getUserContext()->getCurrentUser()->getOrganization()->getOrganization();
193
-        }else{
193
+        } else{
194 194
             $organization = $this->findOrganizationByName($name);
195 195
         }
196 196
         $url = $this->buildUrl('lang/organizations/profileDetail',[
Please login to merge, or discard this patch.