Completed
Branch FET/extract-activation-detecti... (924a42)
by
unknown
02:59 queued 23s
created
core/services/request/middleware/Middleware.php 2 patches
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -25,52 +25,52 @@
 block discarded – undo
25 25
 abstract class Middleware implements RequestDecoratorInterface
26 26
 {
27 27
 
28
-    /**
29
-     * @var RequestDecoratorInterface $request_stack_app
30
-     */
31
-    protected $request_stack_app;
28
+	/**
29
+	 * @var RequestDecoratorInterface $request_stack_app
30
+	 */
31
+	protected $request_stack_app;
32 32
 
33
-    /**
34
-     * @var RequestInterface $request
35
-     */
36
-    protected $request;
33
+	/**
34
+	 * @var RequestInterface $request
35
+	 */
36
+	protected $request;
37 37
 
38
-    /**
39
-     * @var ResponseInterface $response
40
-     */
41
-    protected $response;
38
+	/**
39
+	 * @var ResponseInterface $response
40
+	 */
41
+	protected $response;
42 42
 
43
-    /**
44
-     * @var LoaderInterface
45
-     */
46
-    protected $loader;
43
+	/**
44
+	 * @var LoaderInterface
45
+	 */
46
+	protected $loader;
47 47
 
48 48
 
49
-    /**
50
-     * @param RequestDecoratorInterface $request_stack_app
51
-     * @param LoaderInterface           $loader
52
-     */
53
-    public function __construct(RequestDecoratorInterface $request_stack_app, LoaderInterface $loader)
54
-    {
55
-        $this->request_stack_app = $request_stack_app;
56
-        $this->loader = $loader;
57
-    }
49
+	/**
50
+	 * @param RequestDecoratorInterface $request_stack_app
51
+	 * @param LoaderInterface           $loader
52
+	 */
53
+	public function __construct(RequestDecoratorInterface $request_stack_app, LoaderInterface $loader)
54
+	{
55
+		$this->request_stack_app = $request_stack_app;
56
+		$this->loader = $loader;
57
+	}
58 58
 
59 59
 
60
-    /**
61
-     * process_request_stack
62
-     *
63
-     * @param RequestInterface  $request
64
-     * @param ResponseInterface $response
65
-     * @return ResponseInterface
66
-     */
67
-    protected function processRequestStack(RequestInterface $request, ResponseInterface $response)
68
-    {
69
-        $this->request = $request;
70
-        $this->response = $response;
71
-        if (! $this->response->requestTerminated()) {
72
-            $this->response = $this->request_stack_app->handleRequest($this->request, $this->response);
73
-        }
74
-        return $this->response;
75
-    }
60
+	/**
61
+	 * process_request_stack
62
+	 *
63
+	 * @param RequestInterface  $request
64
+	 * @param ResponseInterface $response
65
+	 * @return ResponseInterface
66
+	 */
67
+	protected function processRequestStack(RequestInterface $request, ResponseInterface $response)
68
+	{
69
+		$this->request = $request;
70
+		$this->response = $response;
71
+		if (! $this->response->requestTerminated()) {
72
+			$this->response = $this->request_stack_app->handleRequest($this->request, $this->response);
73
+		}
74
+		return $this->response;
75
+	}
76 76
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
     {
69 69
         $this->request = $request;
70 70
         $this->response = $response;
71
-        if (! $this->response->requestTerminated()) {
71
+        if ( ! $this->response->requestTerminated()) {
72 72
             $this->response = $this->request_stack_app->handleRequest($this->request, $this->response);
73 73
         }
74 74
         return $this->response;
Please login to merge, or discard this patch.
core/services/collections/LooseCollection.php 2 patches
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -16,37 +16,37 @@
 block discarded – undo
16 16
 {
17 17
 
18 18
 
19
-    /**
20
-     * setCollectionInterface
21
-     *
22
-     * @access protected
23
-     * @param  string $collection_interface
24
-     */
25
-    protected function setCollectionInterface($collection_interface)
26
-    {
27
-        $this->collection_interface = '';
28
-    }
19
+	/**
20
+	 * setCollectionInterface
21
+	 *
22
+	 * @access protected
23
+	 * @param  string $collection_interface
24
+	 */
25
+	protected function setCollectionInterface($collection_interface)
26
+	{
27
+		$this->collection_interface = '';
28
+	}
29 29
 
30 30
 
31
-    /**
32
-     * add
33
-     * attaches an object to the Collection
34
-     * and sets any supplied data associated with the current iterator entry
35
-     * by calling EE_Object_Collection::set_identifier()
36
-     *
37
-     * @access public
38
-     * @param  mixed $object
39
-     * @param  mixed $identifier
40
-     * @return bool
41
-     * @throws InvalidEntityException
42
-     */
43
-    public function add($object, $identifier = null)
44
-    {
45
-        if (! is_object($object)) {
46
-            throw new InvalidEntityException($object, 'object');
47
-        }
48
-        $this->attach($object);
49
-        $this->setIdentifier($object, $identifier);
50
-        return $this->contains($object);
51
-    }
31
+	/**
32
+	 * add
33
+	 * attaches an object to the Collection
34
+	 * and sets any supplied data associated with the current iterator entry
35
+	 * by calling EE_Object_Collection::set_identifier()
36
+	 *
37
+	 * @access public
38
+	 * @param  mixed $object
39
+	 * @param  mixed $identifier
40
+	 * @return bool
41
+	 * @throws InvalidEntityException
42
+	 */
43
+	public function add($object, $identifier = null)
44
+	{
45
+		if (! is_object($object)) {
46
+			throw new InvalidEntityException($object, 'object');
47
+		}
48
+		$this->attach($object);
49
+		$this->setIdentifier($object, $identifier);
50
+		return $this->contains($object);
51
+	}
52 52
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function add($object, $identifier = null)
44 44
     {
45
-        if (! is_object($object)) {
45
+        if ( ! is_object($object)) {
46 46
             throw new InvalidEntityException($object, 'object');
47 47
         }
48 48
         $this->attach($object);
Please login to merge, or discard this patch.
core/services/notices/NoticeConverter.php 1 patch
Indentation   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -12,71 +12,71 @@
 block discarded – undo
12 12
 abstract class NoticeConverter implements NoticeConverterInterface
13 13
 {
14 14
 
15
-    /**
16
-     * @var NoticesContainerInterface $notices
17
-     */
18
-    private $notices;
19
-
20
-    /**
21
-     * if set to true, then errors will be thrown as exceptions
22
-     *
23
-     * @var boolean $throw_exceptions
24
-     */
25
-    private $throw_exceptions;
26
-
27
-
28
-    /**
29
-     * NoticeConverter constructor.
30
-     *
31
-     * @param bool $throw_exceptions
32
-     */
33
-    public function __construct($throw_exceptions = false)
34
-    {
35
-        $this->throw_exceptions = $throw_exceptions;
36
-    }
37
-
38
-
39
-    /**
40
-     * @return NoticesContainerInterface
41
-     */
42
-    public function getNotices()
43
-    {
44
-        return $this->notices;
45
-    }
46
-
47
-
48
-    /**
49
-     * @param NoticesContainerInterface $notices
50
-     */
51
-    protected function setNotices(NoticesContainerInterface $notices)
52
-    {
53
-        $this->notices = $notices;
54
-    }
55
-
56
-
57
-    /**
58
-     * @return bool
59
-     */
60
-    public function getThrowExceptions()
61
-    {
62
-        return $this->throw_exceptions;
63
-    }
64
-
65
-
66
-    /**
67
-     * @param bool $throw_exceptions
68
-     */
69
-    public function setThrowExceptions($throw_exceptions)
70
-    {
71
-        $this->throw_exceptions = filter_var($throw_exceptions, FILTER_VALIDATE_BOOLEAN);
72
-    }
73
-
74
-
75
-    /**
76
-     * @return void;
77
-     */
78
-    public function clearNotices()
79
-    {
80
-        $this->notices = null;
81
-    }
15
+	/**
16
+	 * @var NoticesContainerInterface $notices
17
+	 */
18
+	private $notices;
19
+
20
+	/**
21
+	 * if set to true, then errors will be thrown as exceptions
22
+	 *
23
+	 * @var boolean $throw_exceptions
24
+	 */
25
+	private $throw_exceptions;
26
+
27
+
28
+	/**
29
+	 * NoticeConverter constructor.
30
+	 *
31
+	 * @param bool $throw_exceptions
32
+	 */
33
+	public function __construct($throw_exceptions = false)
34
+	{
35
+		$this->throw_exceptions = $throw_exceptions;
36
+	}
37
+
38
+
39
+	/**
40
+	 * @return NoticesContainerInterface
41
+	 */
42
+	public function getNotices()
43
+	{
44
+		return $this->notices;
45
+	}
46
+
47
+
48
+	/**
49
+	 * @param NoticesContainerInterface $notices
50
+	 */
51
+	protected function setNotices(NoticesContainerInterface $notices)
52
+	{
53
+		$this->notices = $notices;
54
+	}
55
+
56
+
57
+	/**
58
+	 * @return bool
59
+	 */
60
+	public function getThrowExceptions()
61
+	{
62
+		return $this->throw_exceptions;
63
+	}
64
+
65
+
66
+	/**
67
+	 * @param bool $throw_exceptions
68
+	 */
69
+	public function setThrowExceptions($throw_exceptions)
70
+	{
71
+		$this->throw_exceptions = filter_var($throw_exceptions, FILTER_VALIDATE_BOOLEAN);
72
+	}
73
+
74
+
75
+	/**
76
+	 * @return void;
77
+	 */
78
+	public function clearNotices()
79
+	{
80
+		$this->notices = null;
81
+	}
82 82
 }
Please login to merge, or discard this patch.
core/services/notices/AdminNotice.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     public function __construct(NoticeInterface $notice, $display_now = true)
41 41
     {
42 42
         $this->notice = $notice;
43
-        if (! did_action('admin_notices')) {
43
+        if ( ! did_action('admin_notices')) {
44 44
             add_action('admin_notices', array($this, 'displayNotice'));
45 45
         } elseif ($display_now) {
46 46
             $this->displayNotice();
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     {
109 109
         $message = $this->notice->message();
110 110
         if (WP_DEBUG && $this->getType() === AdminNotice::ERROR) {
111
-            $message .= '<br/><span class="tiny-text">' . $this->generateErrorCode() . '</span>';
111
+            $message .= '<br/><span class="tiny-text">'.$this->generateErrorCode().'</span>';
112 112
         }
113 113
         return $message;
114 114
     }
@@ -124,8 +124,8 @@  discard block
 block discarded – undo
124 124
     {
125 125
         $file = explode('.', basename($this->notice->file()));
126 126
         $error_code = ! empty($file[0]) ? $file[0] : '';
127
-        $error_code .= ! empty($error_code) ? ' - ' . $this->notice->func() : $this->notice->func();
128
-        $error_code .= ' - ' . $this->notice->line();
127
+        $error_code .= ! empty($error_code) ? ' - '.$this->notice->func() : $this->notice->func();
128
+        $error_code .= ' - '.$this->notice->line();
129 129
         return $error_code;
130 130
     }
131 131
 }
Please login to merge, or discard this patch.
Indentation   +111 added lines, -111 removed lines patch added patch discarded remove patch
@@ -15,115 +15,115 @@
 block discarded – undo
15 15
 class AdminNotice
16 16
 {
17 17
 
18
-    const ERROR = 'notice-error';
19
-
20
-    const WARNING = 'notice-warning';
21
-
22
-    const SUCCESS = 'notice-success';
23
-
24
-    const INFORMATION = 'notice-info';
25
-
26
-    const DISMISSABLE = ' is-dismissible';
27
-
28
-    /**
29
-     * generic system notice to be converted into a WP admin notice
30
-     *
31
-     * @var NoticeInterface $notice
32
-     */
33
-    private $notice;
34
-
35
-
36
-    /**
37
-     * AdminNotice constructor.
38
-     *
39
-     * @param NoticeInterface $notice
40
-     * @param bool            $display_now
41
-     */
42
-    public function __construct(NoticeInterface $notice, $display_now = true)
43
-    {
44
-        $this->notice = $notice;
45
-        if (! did_action('admin_notices')) {
46
-            add_action('admin_notices', array($this, 'displayNotice'));
47
-        } elseif ($display_now) {
48
-            $this->displayNotice();
49
-        }
50
-    }
51
-
52
-
53
-    /**
54
-     * @return void
55
-     */
56
-    public function displayNotice()
57
-    {
58
-        echo wp_kses($this->getNotice(), AllowedTags::getAllowedTags());
59
-    }
60
-
61
-
62
-    /**
63
-     * produces something  like:
64
-     *  <div class="notice notice-success is-dismissible event-espresso-admin-notice">
65
-     *      <p>YOU DID IT!</p>
66
-     *      <button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this
67
-     *      notice.</span></button>
68
-     *  </div>
69
-     *
70
-     * @return string
71
-     */
72
-    public function getNotice()
73
-    {
74
-        return sprintf(
75
-            '<div class="notice %1$s%2$s event-espresso-admin-notice"><p>%3$s</p></div>',
76
-            $this->getType(),
77
-            $this->notice->isDismissible() ? AdminNotice::DISMISSABLE : '',
78
-            $this->getMessage()
79
-        );
80
-    }
81
-
82
-
83
-    /**
84
-     * @return string
85
-     */
86
-    private function getType()
87
-    {
88
-        switch ($this->notice->type()) {
89
-            case Notice::ERROR:
90
-                return AdminNotice::ERROR;
91
-            case Notice::ATTENTION:
92
-                return AdminNotice::WARNING;
93
-            case Notice::SUCCESS:
94
-                return AdminNotice::SUCCESS;
95
-            case Notice::INFORMATION:
96
-            default:
97
-                return AdminNotice::INFORMATION;
98
-        }
99
-    }
100
-
101
-
102
-    /**
103
-     * @return string
104
-     */
105
-    protected function getMessage()
106
-    {
107
-        $message = $this->notice->message();
108
-        if (WP_DEBUG && $this->getType() === AdminNotice::ERROR) {
109
-            $message .= '<br/><span class="tiny-text">' . $this->generateErrorCode() . '</span>';
110
-        }
111
-        return $message;
112
-    }
113
-
114
-
115
-    /**
116
-     * create error code from filepath, function name,
117
-     * and line number where notice was generated
118
-     *
119
-     * @return string
120
-     */
121
-    protected function generateErrorCode()
122
-    {
123
-        $file = explode('.', basename($this->notice->file()));
124
-        $error_code = ! empty($file[0]) ? $file[0] : '';
125
-        $error_code .= ! empty($error_code) ? ' - ' . $this->notice->func() : $this->notice->func();
126
-        $error_code .= ' - ' . $this->notice->line();
127
-        return $error_code;
128
-    }
18
+	const ERROR = 'notice-error';
19
+
20
+	const WARNING = 'notice-warning';
21
+
22
+	const SUCCESS = 'notice-success';
23
+
24
+	const INFORMATION = 'notice-info';
25
+
26
+	const DISMISSABLE = ' is-dismissible';
27
+
28
+	/**
29
+	 * generic system notice to be converted into a WP admin notice
30
+	 *
31
+	 * @var NoticeInterface $notice
32
+	 */
33
+	private $notice;
34
+
35
+
36
+	/**
37
+	 * AdminNotice constructor.
38
+	 *
39
+	 * @param NoticeInterface $notice
40
+	 * @param bool            $display_now
41
+	 */
42
+	public function __construct(NoticeInterface $notice, $display_now = true)
43
+	{
44
+		$this->notice = $notice;
45
+		if (! did_action('admin_notices')) {
46
+			add_action('admin_notices', array($this, 'displayNotice'));
47
+		} elseif ($display_now) {
48
+			$this->displayNotice();
49
+		}
50
+	}
51
+
52
+
53
+	/**
54
+	 * @return void
55
+	 */
56
+	public function displayNotice()
57
+	{
58
+		echo wp_kses($this->getNotice(), AllowedTags::getAllowedTags());
59
+	}
60
+
61
+
62
+	/**
63
+	 * produces something  like:
64
+	 *  <div class="notice notice-success is-dismissible event-espresso-admin-notice">
65
+	 *      <p>YOU DID IT!</p>
66
+	 *      <button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this
67
+	 *      notice.</span></button>
68
+	 *  </div>
69
+	 *
70
+	 * @return string
71
+	 */
72
+	public function getNotice()
73
+	{
74
+		return sprintf(
75
+			'<div class="notice %1$s%2$s event-espresso-admin-notice"><p>%3$s</p></div>',
76
+			$this->getType(),
77
+			$this->notice->isDismissible() ? AdminNotice::DISMISSABLE : '',
78
+			$this->getMessage()
79
+		);
80
+	}
81
+
82
+
83
+	/**
84
+	 * @return string
85
+	 */
86
+	private function getType()
87
+	{
88
+		switch ($this->notice->type()) {
89
+			case Notice::ERROR:
90
+				return AdminNotice::ERROR;
91
+			case Notice::ATTENTION:
92
+				return AdminNotice::WARNING;
93
+			case Notice::SUCCESS:
94
+				return AdminNotice::SUCCESS;
95
+			case Notice::INFORMATION:
96
+			default:
97
+				return AdminNotice::INFORMATION;
98
+		}
99
+	}
100
+
101
+
102
+	/**
103
+	 * @return string
104
+	 */
105
+	protected function getMessage()
106
+	{
107
+		$message = $this->notice->message();
108
+		if (WP_DEBUG && $this->getType() === AdminNotice::ERROR) {
109
+			$message .= '<br/><span class="tiny-text">' . $this->generateErrorCode() . '</span>';
110
+		}
111
+		return $message;
112
+	}
113
+
114
+
115
+	/**
116
+	 * create error code from filepath, function name,
117
+	 * and line number where notice was generated
118
+	 *
119
+	 * @return string
120
+	 */
121
+	protected function generateErrorCode()
122
+	{
123
+		$file = explode('.', basename($this->notice->file()));
124
+		$error_code = ! empty($file[0]) ? $file[0] : '';
125
+		$error_code .= ! empty($error_code) ? ' - ' . $this->notice->func() : $this->notice->func();
126
+		$error_code .= ' - ' . $this->notice->line();
127
+		return $error_code;
128
+	}
129 129
 }
Please login to merge, or discard this patch.
core/services/container/CoffeeMill.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -15,59 +15,59 @@
 block discarded – undo
15 15
 class CoffeeMill
16 16
 {
17 17
 
18
-    /**
19
-     * @var CoffeeShop $coffee_shop
20
-     */
21
-    private static $coffee_shop;
18
+	/**
19
+	 * @var CoffeeShop $coffee_shop
20
+	 */
21
+	private static $coffee_shop;
22 22
 
23 23
 
24
-    /**
25
-     * @return mixed
26
-     */
27
-    public static function getCoffeeShop()
28
-    {
29
-        return self::$coffee_shop;
30
-    }
24
+	/**
25
+	 * @return mixed
26
+	 */
27
+	public static function getCoffeeShop()
28
+	{
29
+		return self::$coffee_shop;
30
+	}
31 31
 
32 32
 
33
-    /**
34
-     * @param CoffeeShop $coffee_shop
35
-     */
36
-    public static function setCoffeeShop(CoffeeShop $coffee_shop)
37
-    {
38
-        self::$coffee_shop = $coffee_shop;
39
-    }
33
+	/**
34
+	 * @param CoffeeShop $coffee_shop
35
+	 */
36
+	public static function setCoffeeShop(CoffeeShop $coffee_shop)
37
+	{
38
+		self::$coffee_shop = $coffee_shop;
39
+	}
40 40
 
41 41
 
42
-    /**
43
-     * @param string $identifier
44
-     * @param array  $arguments
45
-     * @param string $type
46
-     * @return mixed
47
-     * @throws ServiceNotFoundException
48
-     */
49
-    public static function createNew($identifier, $arguments = array(), $type = CoffeeMaker::BREW_NEW)
50
-    {
51
-        return self::$coffee_shop->brew($identifier, $arguments, $type);
52
-    }
42
+	/**
43
+	 * @param string $identifier
44
+	 * @param array  $arguments
45
+	 * @param string $type
46
+	 * @return mixed
47
+	 * @throws ServiceNotFoundException
48
+	 */
49
+	public static function createNew($identifier, $arguments = array(), $type = CoffeeMaker::BREW_NEW)
50
+	{
51
+		return self::$coffee_shop->brew($identifier, $arguments, $type);
52
+	}
53 53
 
54 54
 
55
-    /**
56
-     * IMPORTANT!!!
57
-     * Usage of this method is discouraged as it promotes service location.
58
-     * It's current use is only as a stop gap measure until the CoffeeShop
59
-     * Dependency Injection Container can be implemented properly for all classes.
60
-     * If it is at all possible, inject your dependencies via your class constructor.
61
-     * This method WILL BE DEPRECATED at some point in the near future.
62
-     *
63
-     * @param string $identifier
64
-     * @param array  $arguments
65
-     * @param string $type
66
-     * @return mixed
67
-     * @throws ServiceNotFoundException
68
-     */
69
-    public static function getService($identifier, $arguments = array(), $type = CoffeeMaker::BREW_SHARED)
70
-    {
71
-        return self::$coffee_shop->brew($identifier, $arguments, $type);
72
-    }
55
+	/**
56
+	 * IMPORTANT!!!
57
+	 * Usage of this method is discouraged as it promotes service location.
58
+	 * It's current use is only as a stop gap measure until the CoffeeShop
59
+	 * Dependency Injection Container can be implemented properly for all classes.
60
+	 * If it is at all possible, inject your dependencies via your class constructor.
61
+	 * This method WILL BE DEPRECATED at some point in the near future.
62
+	 *
63
+	 * @param string $identifier
64
+	 * @param array  $arguments
65
+	 * @param string $type
66
+	 * @return mixed
67
+	 * @throws ServiceNotFoundException
68
+	 */
69
+	public static function getService($identifier, $arguments = array(), $type = CoffeeMaker::BREW_SHARED)
70
+	{
71
+		return self::$coffee_shop->brew($identifier, $arguments, $type);
72
+	}
73 73
 }
Please login to merge, or discard this patch.
core/services/container/NewCoffeeMaker.php 2 patches
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -20,51 +20,51 @@
 block discarded – undo
20 20
 {
21 21
 
22 22
 
23
-    /**
24
-     * @return string
25
-     */
26
-    public function type()
27
-    {
28
-        return CoffeeMaker::BREW_NEW;
29
-    }
23
+	/**
24
+	 * @return string
25
+	 */
26
+	public function type()
27
+	{
28
+		return CoffeeMaker::BREW_NEW;
29
+	}
30 30
 
31 31
 
32
-    /**
33
-     * @param RecipeInterface $recipe
34
-     * @param array           $arguments
35
-     * @return mixed
36
-     */
37
-    public function brew(RecipeInterface $recipe, $arguments = array())
38
-    {
39
-        $this->resolveClassAndFilepath($recipe);
40
-        $reflector = $this->injector()->getReflectionClass($recipe->fqcn());
41
-        $method = $this->resolveInstantiationMethod($reflector);
42
-        switch ($method) {
43
-            case 'instance':
44
-            case 'new_instance':
45
-            case 'new_instance_from_db':
46
-                $injector = $this->injector();
47
-                $closure = function ($arguments) use ($recipe, $reflector, $method, $injector) {
48
-                    return call_user_func_array(
49
-                        array($reflector->getName(), $method),
50
-                        $injector->resolveDependencies($recipe, $reflector, $arguments)
51
-                    );
52
-                };
53
-                break;
54
-            case 'newInstance':
55
-                $closure = function () use ($reflector) {
56
-                    return $reflector->newInstance();
57
-                };
58
-                break;
59
-            case 'newInstanceArgs':
60
-            default:
61
-                $injector = $this->injector();
62
-                $closure = function ($arguments) use ($recipe, $reflector, $injector) {
63
-                    return $reflector->newInstanceArgs(
64
-                        $injector->resolveDependencies($recipe, $reflector, $arguments)
65
-                    );
66
-                };
67
-        }
68
-        return $this->coffeePot()->addClosure($recipe->identifier(), $closure);
69
-    }
32
+	/**
33
+	 * @param RecipeInterface $recipe
34
+	 * @param array           $arguments
35
+	 * @return mixed
36
+	 */
37
+	public function brew(RecipeInterface $recipe, $arguments = array())
38
+	{
39
+		$this->resolveClassAndFilepath($recipe);
40
+		$reflector = $this->injector()->getReflectionClass($recipe->fqcn());
41
+		$method = $this->resolveInstantiationMethod($reflector);
42
+		switch ($method) {
43
+			case 'instance':
44
+			case 'new_instance':
45
+			case 'new_instance_from_db':
46
+				$injector = $this->injector();
47
+				$closure = function ($arguments) use ($recipe, $reflector, $method, $injector) {
48
+					return call_user_func_array(
49
+						array($reflector->getName(), $method),
50
+						$injector->resolveDependencies($recipe, $reflector, $arguments)
51
+					);
52
+				};
53
+				break;
54
+			case 'newInstance':
55
+				$closure = function () use ($reflector) {
56
+					return $reflector->newInstance();
57
+				};
58
+				break;
59
+			case 'newInstanceArgs':
60
+			default:
61
+				$injector = $this->injector();
62
+				$closure = function ($arguments) use ($recipe, $reflector, $injector) {
63
+					return $reflector->newInstanceArgs(
64
+						$injector->resolveDependencies($recipe, $reflector, $arguments)
65
+					);
66
+				};
67
+		}
68
+		return $this->coffeePot()->addClosure($recipe->identifier(), $closure);
69
+	}
70 70
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             case 'new_instance':
45 45
             case 'new_instance_from_db':
46 46
                 $injector = $this->injector();
47
-                $closure = function ($arguments) use ($recipe, $reflector, $method, $injector) {
47
+                $closure = function($arguments) use ($recipe, $reflector, $method, $injector) {
48 48
                     return call_user_func_array(
49 49
                         array($reflector->getName(), $method),
50 50
                         $injector->resolveDependencies($recipe, $reflector, $arguments)
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
                 };
53 53
                 break;
54 54
             case 'newInstance':
55
-                $closure = function () use ($reflector) {
55
+                $closure = function() use ($reflector) {
56 56
                     return $reflector->newInstance();
57 57
                 };
58 58
                 break;
59 59
             case 'newInstanceArgs':
60 60
             default:
61 61
                 $injector = $this->injector();
62
-                $closure = function ($arguments) use ($recipe, $reflector, $injector) {
62
+                $closure = function($arguments) use ($recipe, $reflector, $injector) {
63 63
                     return $reflector->newInstanceArgs(
64 64
                         $injector->resolveDependencies($recipe, $reflector, $arguments)
65 65
                     );
Please login to merge, or discard this patch.
core/services/container/SharedCoffeeMaker.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -18,43 +18,43 @@
 block discarded – undo
18 18
 {
19 19
 
20 20
 
21
-    /**
22
-     * @return string
23
-     */
24
-    public function type()
25
-    {
26
-        return CoffeeMaker::BREW_SHARED;
27
-    }
21
+	/**
22
+	 * @return string
23
+	 */
24
+	public function type()
25
+	{
26
+		return CoffeeMaker::BREW_SHARED;
27
+	}
28 28
 
29 29
 
30
-    /**
31
-     * @param RecipeInterface $recipe
32
-     * @param array           $arguments
33
-     * @return mixed
34
-     */
35
-    public function brew(RecipeInterface $recipe, $arguments = array())
36
-    {
37
-        $this->resolveClassAndFilepath($recipe);
38
-        $reflector = $this->injector()->getReflectionClass($recipe->fqcn());
39
-        $method = $this->resolveInstantiationMethod($reflector);
40
-        switch ($method) {
41
-            case 'instance':
42
-            case 'new_instance':
43
-            case 'new_instance_from_db':
44
-                $service = call_user_func_array(
45
-                    array($reflector->getName(), $method),
46
-                    $this->injector()->resolveDependencies($recipe, $reflector, $arguments)
47
-                );
48
-                break;
49
-            case 'newInstance':
50
-                $service = $reflector->newInstance();
51
-                break;
52
-            case 'newInstanceArgs':
53
-            default:
54
-                $service = $reflector->newInstanceArgs(
55
-                    $this->injector()->resolveDependencies($recipe, $reflector, $arguments)
56
-                );
57
-        }
58
-        return $this->coffeePot()->addService($recipe->identifier(), $service);
59
-    }
30
+	/**
31
+	 * @param RecipeInterface $recipe
32
+	 * @param array           $arguments
33
+	 * @return mixed
34
+	 */
35
+	public function brew(RecipeInterface $recipe, $arguments = array())
36
+	{
37
+		$this->resolveClassAndFilepath($recipe);
38
+		$reflector = $this->injector()->getReflectionClass($recipe->fqcn());
39
+		$method = $this->resolveInstantiationMethod($reflector);
40
+		switch ($method) {
41
+			case 'instance':
42
+			case 'new_instance':
43
+			case 'new_instance_from_db':
44
+				$service = call_user_func_array(
45
+					array($reflector->getName(), $method),
46
+					$this->injector()->resolveDependencies($recipe, $reflector, $arguments)
47
+				);
48
+				break;
49
+			case 'newInstance':
50
+				$service = $reflector->newInstance();
51
+				break;
52
+			case 'newInstanceArgs':
53
+			default:
54
+				$service = $reflector->newInstanceArgs(
55
+					$this->injector()->resolveDependencies($recipe, $reflector, $arguments)
56
+				);
57
+		}
58
+		return $this->coffeePot()->addService($recipe->identifier(), $service);
59
+	}
60 60
 }
Please login to merge, or discard this patch.
core/services/container/LoadOnlyCoffeeMaker.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -21,23 +21,23 @@
 block discarded – undo
21 21
 class LoadOnlyCoffeeMaker extends CoffeeMaker
22 22
 {
23 23
 
24
-    /**
25
-     * @return string
26
-     */
27
-    public function type()
28
-    {
29
-        return CoffeeMaker::BREW_LOAD_ONLY;
30
-    }
24
+	/**
25
+	 * @return string
26
+	 */
27
+	public function type()
28
+	{
29
+		return CoffeeMaker::BREW_LOAD_ONLY;
30
+	}
31 31
 
32 32
 
33
-    /**
34
-     * @param RecipeInterface $recipe
35
-     * @param array           $arguments
36
-     * @return mixed
37
-     * @throws InvalidClassException
38
-     */
39
-    public function brew(RecipeInterface $recipe, $arguments = array())
40
-    {
41
-        return $this->resolveClassAndFilepath($recipe);
42
-    }
33
+	/**
34
+	 * @param RecipeInterface $recipe
35
+	 * @param array           $arguments
36
+	 * @return mixed
37
+	 * @throws InvalidClassException
38
+	 */
39
+	public function brew(RecipeInterface $recipe, $arguments = array())
40
+	{
41
+		return $this->resolveClassAndFilepath($recipe);
42
+	}
43 43
 }
Please login to merge, or discard this patch.
core/services/progress_steps/ProgressStepCollection.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@
 block discarded – undo
17 17
 class ProgressStepCollection extends Collection
18 18
 {
19 19
 
20
-    /**
21
-     * ProgressStepCollection constructor.
22
-     *
23
-     * @throws \EventEspresso\core\exceptions\InvalidInterfaceException
24
-     */
25
-    public function __construct()
26
-    {
27
-        parent::__construct('\EventEspresso\core\services\progress_steps\ProgressStepInterface');
28
-    }
20
+	/**
21
+	 * ProgressStepCollection constructor.
22
+	 *
23
+	 * @throws \EventEspresso\core\exceptions\InvalidInterfaceException
24
+	 */
25
+	public function __construct()
26
+	{
27
+		parent::__construct('\EventEspresso\core\services\progress_steps\ProgressStepInterface');
28
+	}
29 29
 }
Please login to merge, or discard this patch.