Completed
Pull Request — develop (#450)
by ANTHONIUS
06:55
created
module/Jobs/src/Jobs/Entity/Decorator/JsonLdProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $dateStart = $this->job->getDatePublishStart();
53 53
         $dateStart = $dateStart ? $dateStart->format('Y-m-d') : null;
54 54
 
55
-        $array=[
55
+        $array = [
56 56
             '@context'=>'http://schema.org/',
57 57
             '@type' => 'JobPosting',
58 58
             'title' => $this->job->getTitle(),
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
      *
85 85
      * @return array
86 86
      */
87
-    private function getLocations($locations){
88
-        $array=[];
89
-        foreach($locations as $location){ /* @var \Core\Entity\LocationInterface $location */
87
+    private function getLocations($locations) {
88
+        $array = [];
89
+        foreach ($locations as $location) { /* @var \Core\Entity\LocationInterface $location */
90 90
             array_push(
91 91
                 $array,
92 92
                 [
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     private function getDescription(TemplateValuesInterface $values) {
114 114
 
115
-        $description=sprintf(
115
+        $description = sprintf(
116 116
             "<p>%s</p>".
117 117
             "<h1>%s</h1>".
118 118
             "<h3>Requirements</h3><p>%s</p>".
Please login to merge, or discard this patch.
config/config.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@  discard block
 block discarded – undo
13 13
 $env = getenv('APPLICATION_ENV') ?: 'production';
14 14
 
15 15
 $coreModules = include 'common.modules.php';
16
-if (!file_exists(__DIR__ . '/autoload/yawik.config.global.php')) {
17
-    $modules = array_merge($coreModules,[
16
+if (!file_exists(__DIR__.'/autoload/yawik.config.global.php')) {
17
+    $modules = array_merge($coreModules, [
18 18
         'Install',
19 19
     ]);
20 20
 } else {
21
-    $modules = array_merge($coreModules,[
21
+    $modules = array_merge($coreModules, [
22 22
         'Core',
23 23
         'Auth',
24 24
         'Cv',
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
         // kann und über Server-Variablen oder ähnlichen steuern kann
36 36
         $allModules = False;
37 37
     }
38
-    foreach (glob(__DIR__ . '/autoload/*.module.php') as $moduleFile) {
38
+    foreach (glob(__DIR__.'/autoload/*.module.php') as $moduleFile) {
39 39
         $addModules = require $moduleFile;
40 40
         foreach ($addModules as $addModule) {
41 41
             if (strpos($addModule, '-') === 0) {
42
-                $remove = substr($addModule,1);
43
-                $modules = array_filter($modules, function ($elem) use ($remove) { return strcasecmp($elem,$remove); });
42
+                $remove = substr($addModule, 1);
43
+                $modules = array_filter($modules, function($elem) use ($remove) { return strcasecmp($elem, $remove); });
44 44
             }
45 45
             else {
46 46
                 if (!in_array($addModule, $modules)) {
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     ),
94 94
 );
95 95
 
96
-$envConfigFile = __DIR__ . '/config.' . $env . '.php';
96
+$envConfigFile = __DIR__.'/config.'.$env.'.php';
97 97
 if (file_exists($envConfigFile)) {
98 98
     if (is_readable($envConfigFile)) {
99 99
         $envConfig = include $envConfigFile;
Please login to merge, or discard this patch.
module/Install/src/Tracy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function register(array $config)
28 28
     {
29
-    	try{
29
+    	try {
30 30
 		    // enable logging of all error types globally
31 31
 		    Debugger::enable($config['mode'], $config['log'], $config['email']);
32 32
 		    Debugger::$strictMode = $config['strict'];
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 		    /** @var \Tracy\Logger $logger */
36 36
 		    $logger = Debugger::getLogger();
37 37
 		    $logger->emailSnooze = $config['email_snooze'];
38
-	    }catch (\Exception $e){
38
+	    } catch (\Exception $e) {
39 39
     		throw $e;
40 40
 	    }
41 41
      
Please login to merge, or discard this patch.
module/Install/src/Factory/Controller/LazyControllerFactory.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -28,25 +28,25 @@  discard block
 block discarded – undo
28 28
 		Translator::class => 'translator',
29 29
 	];
30 30
 	
31
-	public function canCreate( ContainerInterface $container, $requestedName )
31
+	public function canCreate(ContainerInterface $container, $requestedName)
32 32
 	{
33
-		list( $module, ) = explode( '\\', __NAMESPACE__, 2 );
34
-		return strstr( $requestedName, $module . '\Controller') !== false;
33
+		list($module,) = explode('\\', __NAMESPACE__, 2);
34
+		return strstr($requestedName, $module.'\Controller') !== false;
35 35
 	}
36 36
 	
37
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
37
+	public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
38 38
 	{
39 39
 		$class = new \ReflectionClass($requestedName);
40 40
 		$parentLocator = $container;
41
-		if( $constructor = $class->getConstructor() )
41
+		if ($constructor = $class->getConstructor())
42 42
 		{
43
-			if( $params = $constructor->getParameters() )
43
+			if ($params = $constructor->getParameters())
44 44
 			{
45 45
 				$parameter_instances = [];
46
-				foreach( $params as $p )
46
+				foreach ($params as $p)
47 47
 				{
48 48
 					
49
-					if( $p->getClass() ) {
49
+					if ($p->getClass()) {
50 50
 						$cn = $p->getClass()->getName();
51 51
 						if (array_key_exists($cn, $this->aliases)) {
52 52
 							$cn = $this->aliases[$cn];
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
 							exit;
62 62
 						}
63 63
 					}
64
-					else{
65
-						if( $p->isArray() && $p->getName() == 'config' )
64
+					else {
65
+						if ($p->isArray() && $p->getName() == 'config')
66 66
 							$parameter_instances[] = $parentLocator->get('config');
67 67
 					}
68 68
 					
Please login to merge, or discard this patch.
module/Install/src/Controller/Index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@
 block discarded – undo
136 136
 	    parent::attachDefaultListeners();
137 137
 	
138 138
 	    $events = $this->getEventManager();
139
-	    $events->attach( MvcEvent::EVENT_DISPATCH, array( $this, 'preDispatch' ), 100 );
139
+	    $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'preDispatch'), 100);
140 140
     }
141 141
 
142 142
     /**
Please login to merge, or discard this patch.
module/Behat/src/Select2Context.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
 	 * @param $field
46 46
 	 * @param $value
47 47
 	 */
48
-	public function iFillInSelect2FieldWith($field,$search,$choice=null)
48
+	public function iFillInSelect2FieldWith($field, $search, $choice = null)
49 49
 	{
50 50
 		$page = $this->getSession()->getPage();
51 51
 		$this->openField($page, $field);
52
-		$this->fillSearchField($page,$field,$search);
52
+		$this->fillSearchField($page, $field, $search);
53 53
 		$this->selectValue($page, $field, $choice);
54 54
 	}
55 55
 	
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
 		if ('Behat\Mink\Driver\Selenium2Driver' === get_class($driver)) {
68 68
 			// Can't use `$this->getSession()->getPage()->find()` because of https://github.com/minkphp/MinkSelenium2Driver/issues/188
69 69
 			
70
-			$element = $page->find('css','.select2-container--open .select2-search__field');
70
+			$element = $page->find('css', '.select2-container--open .select2-search__field');
71 71
 			$xpath = $element->getXpath();
72 72
 			$select2Input = $this->getSession()
73 73
 				->getDriver()
74 74
 				->getWebDriverSession()
75
-				->element('xpath',$xpath)
75
+				->element('xpath', $xpath)
76 76
 				//->element('xpath', "//html/descendant-or-self::*[@class and contains(concat(' ', normalize-space(@class), ' '), ' select2-search__field ')]")
77 77
 			;
78 78
 			if (!$select2Input) {
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
 	 * @param int             $time
101 101
 	 * @throws \Exception
102 102
 	 */
103
-	private function selectValue(DocumentElement $page, $field, $value, $time=5)
103
+	private function selectValue(DocumentElement $page, $field, $value, $time = 5)
104 104
 	{
105 105
 		$this->waitForLoadingResults($time);
106 106
 		
107 107
 		$chosenResults = $page->findAll('css', '.select2-results li');
108 108
 		foreach ($chosenResults as $result) {
109 109
 			$text = $result->getText();
110
-			if (false!==strpos($text,$value)) {
110
+			if (false !== strpos($text, $value)) {
111 111
 				$result->click();
112 112
 				return;
113 113
 			}
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
 	
119 119
 	private function openField(DocumentElement $page, $field)
120 120
 	{
121
-		$inputField = $page->find('css',$field);
122
-		if(!$inputField){
121
+		$inputField = $page->find('css', $field);
122
+		if (!$inputField) {
123 123
 			$fieldName = sprintf('select[name="%s"] + .select2-container', $field);
124 124
 			$inputField = $page->find('css', $fieldName);
125 125
 		}
Please login to merge, or discard this patch.
module/Behat/src/ApplicationContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 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());
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Listener/Publisher.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @param EventManagerInterface $events
47 47
      * @return $this
48 48
      */
49
-    public function attach(EventManagerInterface $events, $priority=1)
49
+    public function attach(EventManagerInterface $events, $priority = 1)
50 50
     {
51 51
         return $this;
52 52
     }
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                 $jsonLastError = json_last_error();
165 165
                 if (json_last_error() != JSON_ERROR_NONE) {
166 166
                     // not able to decode json
167
-                    $log->info('RestCall Response not Json [errorCode: ' . $jsonLastError . ']: ' . var_export($body, true));
167
+                    $log->info('RestCall Response not Json [errorCode: '.$jsonLastError.']: '.var_export($body, true));
168 168
                 } else {
169 169
                     // does the provider want to have an own ID for Identification ?
170 170
                     $response_referenceUpdate = $decodedBody->referenceUpdate;
@@ -174,10 +174,10 @@  discard block
 block discarded – undo
174 174
                     	$logInfo = 'RestCall changed externalID ['
175 175
 	                               . var_export($publisher->externalId, true)
176 176
 	                               . ' => '
177
-	                               . var_export($response_externalIdUpdate, true) . '], reference  ['
177
+	                               . var_export($response_externalIdUpdate, true).'], reference  ['
178 178
 	                               . var_export($publisher->reference, true)
179 179
 	                               . ' => '
180
-	                               . var_export($response_referenceUpdate, true) . ']';
180
+	                               . var_export($response_referenceUpdate, true).']';
181 181
                         $log->info($logInfo);
182 182
                         $publisher->reference = $response_referenceUpdate;
183 183
                         $publisher->externalId = $response_externalIdUpdate;
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Listener/MailSender.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         $this->options = array_merge($this->options, $options);
63 63
     }
64 64
 
65
-    public function attach(EventManagerInterface $events, $priority=1)
65
+    public function attach(EventManagerInterface $events, $priority = 1)
66 66
     {
67 67
         $this->listeners[] = $events->attach(JobEvent::EVENT_JOB_CREATED, array($this, 'onJobCreated'));
68 68
         $this->listeners[] = $events->attach(JobEvent::EVENT_JOB_ACCEPTED, array($this, 'onJobAccepted'));
Please login to merge, or discard this patch.